History log of /drivers/net/wireless/iwlwifi/iwl-shared.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
885765f148b69b0269a50d0d89d2f20fe018fb8d 15-Dec-2011 Venkataraman, Meenakshi <meenakshi.venkataraman@intel.com> iwlwifi: Execute runtime calibration always

Runtime DC calibration was previously conditional. Remove this
behaviour, as new devices support runtime DC calibration,
while older devices ignore the runtime DC calibration request.

This patch addresses low TX throughput issues seen with the 6205.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
7428994d7991c662d77fc5212a9e42de34c05335 13-Dec-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: finer-grained HT disable

At least while debugging, a lot of people use
11n_disable=1 to disable HT completely. To be
able to figure out what parts of HT cause the
problems we see, make the parameter a bitmap,
allowing to disable all of HT and aggregation
(TX/RX) separately.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
23fd7b029fa58c265bfa757603fd2af27c7af3ad 07-Dec-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: add missing documentation for iwl_shared

A few descriptions were missing

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
fdf426a34afe7b1c17a6783f273062e3464cceaa 07-Dec-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: kill iwl_{start,stop}_tx_ba_trans_ready

Since my latest patches, the upper layer reports to mac80211 that the
driver is ready to continue the start / stop BA flow as opposed to
the transport layer. Hence, iwl_{start,stop}_tx_ba_trans_ready are
not needed any more.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
04cf6824a5e92e6f86c0abcb38ac65ee744c3d34 23-Nov-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: tid_data moves to iwl_priv

The transport doesn't need to access it any more.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
76bc10fcd128ad028cf77c62e179cd20dc2ffecf 21-Nov-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: tid_data logic move to upper layer - txqid

The tid_data is not related to the transport layer, so move
the logic that depends on it to the upper layer.
This patch deals with the mapping of RA / TID to HW queues in AGG.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
eb9a372a73ea3e2b7e795a7ea03a5b8d92815672 21-Nov-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: don't count the tfds in HW queue any more

Since packets sent to an RA / TID in AGG are sent from a
separate HW Tx queue, we may get into a race:
the regular queue isn't empty while we already begin to
send packets from the AGG queue. This would result in sending
packets out of order.

In order to cope with this, mac80211 waits until the driver
reports that the legacy queue is drained before it can send
packets to the AGG queue. During that time, mac80211 buffers
packets for the driver. These packets will be sent in order
after the driver reports it is ready.

The way this was implemented in the driver is as follows:
We held a counter that monitors the number of packets for
an RA / TID in the HW queues. When this counter reached 0,
we knew that the HW queues were drained and we reported to
mac80211 that were ready to proceed.

This patch changes the implementation described above. We
now remember what is the wifi sequence number of the first
packet that will be sent in the AGG queue (lets' call it
ssn). When we reclaim the packet before ssn, we know that
the queue is drained, and we are ready to proceed.

This will allow us to move this logic in the upper layer and
eventually remove the tid_data from the shared area.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
3862241945026a8fa165ab73c57739df77b8e1fb 16-Dec-2011 Don Fry <donald.h.fry@intel.com> iwlwifi: move iwl_cfg from iwl_priv to iwl_shared

Move the configuration pointer from the upper level iwl_priv to the
lower level iwl_shared structure, with associated code fixes.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
ae6130fc9b5e9957aaf26355b80e0a5ef7f8f537 01-Dec-2011 Don Fry <donald.h.fry@intel.com> iwlwifi: move device_pointers from iwl_priv to iwl_shared

Move the low level ucode device_pointers structure to iwl_shared.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
ab36eab24e7847d6d92872c55b46554c8ac4c4b3 01-Dec-2011 Don Fry <donald.h.fry@intel.com> iwlwifi: move eeprom pointer from iwl_priv to iwl_shared

The eeprom image is a device level component, move from iwl_priv
to iwl_shared, with associated code changes.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
79e3b16b7123018610f2754ce1bd219c5dd844f5 02-Dec-2011 Don Fry <donald.h.fry@intel.com> iwlwifi: move ucode notification from iwl_priv to iwl_shared

Move the notification structures for ucode operations from the
iwl_priv structure to the iwl_shared structure, with associated
code changes.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
a96b724d5ad7d44184d6a871bc1d35b005f2d53e 02-Dec-2011 Don Fry <donald.h.fry@intel.com> iwlwifi: move ucode_type from iwl_priv to iwl_shared

Move the ucode_type variable from the iwl_priv to the iwl_shared
structure with associated code changes.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
d7a4858c0fde8383f7aa494eda0fba6bef3f2fec 02-Dec-2011 John W. Linville <linville@tuxdriver.com> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless

Conflicts:
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/libertas/cfg.c
9995ffe5f5fdddcc73e4465cc3f8b38714df8108 02-Dec-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: change the default behavior of watchdog timer

The current default watchdog timer is enabled, but we are seeing issues on
legacy devices. So change the default setting of watchdog timer to per
device based. But user still can use the "wd_disable" module parameter
to overwrite the system setting

Cc: stable@vger.kernel.org #3.0+
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
c27bdc84d6310914cfdd59280c2e663588392d01 25-Nov-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: remove calibration knowledge

The init microcode knows very well which calibrations
are required and sends us results for those that are.
Consequently, we can just send all of those to the RT
uCode again.

The problem with having the driver know about this is
that it is a uCode feature, not a hardware feature so
the config is completely unsuitable.

The only thing we need to check is whether the device
needs crystal calibration or not, add a new parameter
to the configuration for that.

This makes new uCode work on 6000 series devices.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
3eae4bb176d3d51f6c61b8b1679116e58586d669 10-Oct-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: kill hw_params.max_stations

Not needed since driver split.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
3c607d27c818cf4a5d28f2c73b18a88f8fbdfa33 30-Sep-2011 Don Fry <donald.h.fry@intel.com> iwlagn: rename iwlagn module iwlwifi and alias to iwlagn.

Rename the iwlagn module as iwlwifi in preparation for future
changes. Add an alias to iwlagn for backward compatibility.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
84b1bec6d716fc8c289e2530cab109a6e097455b 23-Sep-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: fix scan complete processing

When we cancel a scan, the completion runs
only from the workqueue. This can cause the
remain-on-channel scan to fail when another
one was just canceled, because we're still
aborting it.

To fix this, run the completion inline with
the lock still held before returning from
iwl_scan_cancel_timeout().

Also, to avoid the scan complete work from
completing a new scan prematurely, add a
new STATUS_SCAN_COMPLETE bit.

Reported-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Tested-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
247c61d625154e18a105d663281c52376a882762 21-Sep-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: remove the callback in host commands

Before this patch, the upper layer could register a callback for each
host command. This mechanism allowed the upper layer to have
different callbacks for the same command ID. In fact, it wasn't used
and the rx_handlers is enough: same callback for all the command with
a specific command ID.

The iwl_send_add_station needs the access the command that was sent
while handling the response (regardless if the command was sent in
SYNC or ASYNC mode). So now, all the handlers receive the host
command that was sent. This implies a change in the handler signature.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
fd90b3c1bab995f9225d8048d6d60e39dedac7ed 15-Sep-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: remove unused function declarations

iwl_suspend and iwl_resume don't exist.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
403ba56aedf2b3092e12219188e5c248f04c5acc 15-Sep-2011 Don Fry <donald.h.fry@intel.com> iwlagn: replace beacon_time_fsf_bits variable with #define

All devices use the same value for beacon_time_tsf_bits. Use the #define

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
21023e2696679bea2a42aa963de74ce37c049b13 15-Sep-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: add documentation to the transport layer

and do a few clean up fixes on the way

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
14991a9d8469ccac12c5d243e975d3ab78c8238a 15-Sep-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: use enum iwl_rxon_context_id instead of u8

enum iwl_rxon_context_id is the right type to use when we need a
rxon_context_id.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
859cfb0a99369cf51dc2125ebc3476382a15c322 15-Sep-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: move iwl_stop / wake_queue to the upper layer

Add a wrapper in the upper layer to call the mac80211's function.
This allows not to have the transport layer call mac80211 directly.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
909e9b23e4b1d4a783e8d2e5e2c865b7ebdb0675 15-Sep-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: free the Tx cmd when a non empty Tx queue is freed

When a non-empty Tx queueis freed, the buffer it contains must be
freed too. Since the Tx cmd are now allocated from a pool, the Tx
cmd must be freed too.

This patch avoids to destroy a non-empty pool of Tx cmd.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
ff620849110649b5f94989ddfd7a72b2bd43bd42 06-Sep-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: fix compilation when debug flags is unset

Trivial fixes to allow compilation without warnings when debug
compilation flag isn't set.
Also fix the compilation when debugfs flag isn't set.
Fix a warning: unused priv pointer on the way.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
7a10e3e4076d09779da5a02b0ab6ce551d964d48 06-Sep-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: iwl-trans.c can't dereference iwl_priv any more

This reaches encapsulation for this file. In order to reach this:
* move priv->valid_context to iwl_shared
* move the last_rejected initialization to the upper layer
* define a wrapper iwl_nic_config in the upper layer that calls to
cfg->lib->ops->nic_config

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
522376d206da66cecc90929134ad70c0446e874b 06-Sep-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: clean up of transport layer

Move a few declarations needed by the transport layer to iwl-shared.h
Move iwl_cmd_meta, iwl_tx_queue and friends to the internal transport
header file.
Move iwl_device_cmd iwl_host_cmd and friends to iwl-trans.h since
these structs are used in the API to the transport layer.
Move get_cmd_string to the upper layer with a declaration in
iwl-shared.h.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
3e10caeb55b2693b38f1f80c67c79d918fc42e42 06-Sep-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: remove priv dereferences from the transport layer

Another round of clean up on the transport layer.
Define a wrapper around wiphy_rfkill_set_hw_state to prevent the
transport layer from accessing priv->hw.
Also move wait_command_queue to the transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
e20d434170c3a7f388d5e916825499c9c0738606 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: move the stop / wake queue logic to transport layer

priv->mac80211_registered and priv->hw needed to move to shared.
stop_queue API was added in order to allow the upper layer to stop
the SW queues for regulatory purposes.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
f22be624c29b7f714e5a82ad13dc33a0cd1443a2 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: move check_stuck_queue to transport layer

This one is really transport related.

==== moves Stanislaw's code to BSD area ====

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
464021ffc1c080283e67729d966d76612728a08c 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: move the check_empty logic to the transport layer

This logic is responsible to tell mac80211 when the HW queues are
empty and the BA session can be started / torn down.

Fix a bug on the way:
When the the Tx BA session is stopped and the HW queues aren't empty,
we stop the SW queue to drain the HW queue and then switch to the
legacy HW queue. This is the IWL_EMPTYING_HW_QUEUE_DELBA state.

While in this state, we never wake the SW queue, even when the HW
queue is almost empty, since we need to drain it completely. Look
at iwl_trans_pcie_reclaim regarding this.

Once the HW queue is really empty, we must wake the SW queue in order
to get traffic to the legacy queue.
This step was missing leading to an odd situation were the traffic
would just stall after we tore down a Tx BA session while the HW
queue was not empty.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
288712a6ccf47b9df104f800616f6659ecadc940 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: allocate resources for TX BA session in transport

The queues and all the related logic suits to the transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
ba562f71198a2cb03bb8d20640ffdf996275c3f0 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: set tx_fifo for ampdu in transport layer

the mapping tx_queue -> fifo is really transport related. The upper
layer should be involved in such things.

Note that upon agg_disable, the queue is always mapped to fifo 0, but
this doesn't matter since when the queue will be setup again for a
new BA session, it will be configured to the good fifo anyway.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
fd656935cd05f522d7db97386633f6a0d7751218 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: remove dereferences of priv from transport

There are still quite a few, but much less.
A few fields have been moved /copied to hw_params which sits in the
shared area:
* priv->cfg->base_params->num_of_ampdu_queues
* priv->cfg->base_params->shadow_reg_enable
* priv->cfg->sku
* priv->ucode_owner

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
5f85a7890cbfd2be8f4c6620b2a6774d6b5ac647 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: iwl_tid_data moves to iwl-shared

The rate scaling and the transport need to access the data in
iwl_tid_data, hence the move.

Note that the only component in the upper layer that needs this data
is the rate scaling. Refactoring the rate scaling may help to move
iwl_tid_data from the shared area to the transport area.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
332a4bad975616f33c2d1bf94c4ace2ea4113835 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: iwl-pci doesn't include iwl-dev any more

Move all the iwlXXX_abgn_cfg forward declaration to a separate file
so that iwl-pci.c doesn't need to include iwl-agn.h that includes
all iwl-dev.h
This allows to provide real encapsulation. Dereferencing iwl_priv
in the bus layer will now lead to a compilation error.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
a72b8b088c3465b28192c1a14ba97be8223a8cec 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: add missing includes

a few h files weren't self contained. Fix that.
Move iwl_dma_ptr to transport layer since it is not used by the upper layer
any more.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
ab9e212e92aa2820a5b961c42142d36257b0742c 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: remove unused parameters from hw_params

Some of them weren't used at all, the others always had the same value since
the driver split.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
790428b6552c698b2f295457b5dee686323cb732 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: move iwl_free_pages to iwl-shared.h

This helper is used by the transport and the upper layer.
Kill __iwl_free_pages which was used in the transport only.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
845a9c0d8acea87dede740bc5feb9ec2d00505d9 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: move all iwl_is_XXX helpers to iwl-shared.h

Logic move after all priv->status moved to struct iwl_shared

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
e4ef84d94b0dbb75b4da6628611341af5812360f 26-Aug-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: add comments to module parameters

Add more comments to iwl_mod_params

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
fee84f0dc45f40eabbddf619d5ec18d456c5185a 26-Aug-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: more comments for bt channel inhibition

Add comments for better description

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
dd5b6d0a2059027366028630746d951b1e1e24b3 26-Aug-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: enable 11n aggregation without checking traffic load

Enable HT aggregation when it reach reasonable traffic without
checking traffic load which delay enabling the aggregation and lower
the throughput

but this behavior can be overwrite by module parameter

this address
https://bugzilla.kernel.org/show_bug.cgi?id=40042

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
57210f7c9f04a2509ee54a0f454003a714db96dd 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: move iwl_suspend / iwl_resume to the transport layer

These flows needs to access the APM and a few other registers that can differ
between different transports.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
5a878bf60b2bb1f1509f49b8b1784e3c9f204c64 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: iwl_rx_queue moves to the iwl_trans_pcie

Since this struct is specific to pcie transport, move it the the pcie
specific transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
e6bb4c9c00892c488f3218ea317dc6a71674faf4 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: bus layer chooses its transport layer

Remove iwl_transport_register which was a W/A. The bus layer knows what
transport to use. So now, the bus layer gives the upper layer a pointer to the
iwl_trans_ops struct that it wants to use. The upper layer then, allocates the
desired transport layer using iwl_trans_ops->alloc function.

As a result of this, priv->trans, no longer exists, priv holds a pointer to
iwl_shared, which holds a pointer to iwl_trans. This required to change all the
calls to the transport layer from upper layer. While we were at it, trans_X
inlines have been renamed to iwl_trans_X to avoid confusions, which of course
required to rename the functions inside the transport layer because of
conflicts in names. So the static API functions inside the transport layer
implementation have been renamed to iwl_trans_pcie_X.

Until now, the IRQ / Tasklet were initialized in iwl_transport_layer. This is
confusing since the registration doesn't mean to request IRQ, so I added a
handler for that.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
f39c95e8d7a152b409977687a999356f0e54bde6 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: priv->sta_lock moves to iwl_shared

Since it is used by all the layers, it needs to move to iwl_shared.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
6ac2f839b0b21225a65f41802c5f0df5eff4f16c 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: priv->mutex moves to iwl_shared

Since it is used by all the layers, it needs to move to iwl_shared.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
10b15e6f67ba4d9abb8788100a5267341cc98b7b 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: priv->lock moves to iwl_shared

Since it is used by all the layers, it needs to move to iwl_shared.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
63013ae30159c90d2a873e20e680e7810fa533fa 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: priv->status moves to iwl_shared

Since it is used by all the layers, it needs to move to iwl_shared.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
74e28e44095e30ffd2d0258e4fe91826a15247e7 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: workqueue moves to iwl_shared

Since it is used by all the layers, it needs to move to iwl_shared.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
cefeaa5fa0be02cd51968975fec9cfaf7973bb3a 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: cmd_queue moves to iwl_shared

Since it is used by all the layers, it needs to move to iwl_shared.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
d618912417fbce4f6514fe1cbef7df2e73bdb6c2 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: hw_params moves to iwl_shared

Since it is used by all the layers, it needs to move to iwl_shared.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
8f470ce31de1a9dfe6b53e0967eaa7e72b741714 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: debug_level moves to struct iwl_shared

This will allow all the modules to look at it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
cac988a682d45d07276fef1cc1e035ef86d39849 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: introduce struct iwl-shared - known by all layers

This struct will hold pointers to all the layers, so that every layer will find
the pointers it needs when calling another layer.

Note that the drv_data set to struct device is now a pointer to
struct iwl_shared.
This solves of bug that I introduced in

iwlagn: simplify the bus architecture

Bug description:

sysfs gets the the driver data from struct device. Till the aforementioned
patch, dev_get_drvdata would return iwl_priv. After the patch, dev_get_drvdata
return iwl_bus which is buggy since the sysfs handlers rely on this value, and
sysfs handlers need iwl_priv.

Now, dev_get_drvdata return iwl-shared. Since we have pointers to all the
layers in iwl_shared, every layer will be able to get the pointer it needs:
bus layer will gets iwl_bus from the PCI suspend callbacks, and the sysfs
handlers will get the iwl_priv they need.

In order to keep good encapsulation, we need to avoid to dereference iwl_priv
from a different layer. This is why instead of including iwl-dev.h from
iwl-shared.h, I added a forward declaration to iwl_priv. Moreover we keep type
safety while providing encapsulation.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h
48f20d354e729afcfb29ff41aca7583ebb94613d 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: introduce iwl-shared.h

It will hold declaration of functions and forward declaration of struct that
are used by several layers.
This will allow modules not to include iwl_priv. iwl_bus and iwl_trans are
still visible to all.

All the layers share the module parameters, move the struct to iwl-shared.h.
Also add all module parameters to iwl_mod_params instead of having them as
global static. This includes

* debug_level
* ant_coupling
* bt_ch_announce
* wanted_ucode_alternative

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/iwlwifi/iwl-shared.h