History log of /drivers/net/wireless/iwlwifi/iwl-1000.c
Revision Date Author Comments
78cbcf2b9dbe0565820dc7721316f9c401000a68 22-Apr-2012 Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> iwlwifi: use correct released ucode version

Report correctly the latest released version
of the iwlwifi firmware for all
iwlwifi-supported devices.

Cc: stable@vger.kernel.org #3.3+
Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
1745e4405b2c0da6db2ec4b6bc0ad930612d8295 09-Mar-2012 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: fix the delta for remove max_txq_num patch

BIg portion of "iwlwifi: remove max_txq_num from hw_params" was
missing during merge, here is the fix for it.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9563fe1696fa0ced8cfa3f935736d4662a81c1c3 07-Mar-2012 Johannes Berg <johannes.berg@intel.com> iwlwifi: remove unused max_nrg_cck from sensitivity and constify

The sensitivity parameters are never modified, so they
should be const. Also remove the unused max_nrg_cck
value to save some space.

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>
eae63b858f9a238a8868846dc5f27fc5e1865659 06-Mar-2012 Johannes Berg <johannes.berg@intel.com> iwlwifi: don't include iwl-prph.h everywhere

It's only needed in a few places.

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>
6794f3ee1dc4a2f7ebed99a4c075f00bbebbcfdc 06-Mar-2012 Johannes Berg <johannes.berg@intel.com> iwlwifi: constify remaining config data

The HW configuration settings base_params, ht_params
and bt_params all should be const, make it so.

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>
ae9625a1a947f33579c244b730001f2ea7d15045 06-Mar-2012 Johannes Berg <johannes.berg@intel.com> iwlwifi: remove num_of_queues module parameter

This is a hardware parameter, so it shouldn't
be configurable by the user. Users can disable
aggregation (which is the only thing affected)
with 11n_disable.

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>
706c4ff67cb86134a3a93413a595a7c5559b7cc2 05-Mar-2012 Johannes Berg <johannes.berg@intel.com> iwlwifi: make config const

Writing to the global config structures
is always wrong. To protect against such
mistakes in the future, mark them const.

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>
7e79a3937a44b1dc5f457e6dbb8c50e93719286a 05-Mar-2012 Johannes Berg <johannes.berg@intel.com> iwlwifi: use valid TX/RX antenna from hw_params

It's not really a good idea to write to the
global static configuration. Use the valid
TX/RX antenna information only from the HW
params struct except in the case where the
values from the config are used to override
the values from the EEPROM.

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>
dae66d0d2ee1a188fcfd437c4e6b2bf32dc7a1b2 06-Feb-2012 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: SRAM size moves from hw_params to cfg

This will allow to set the hw_params after we fetch the uCode.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
6d4dec7ba4b0275c97c39b694cfe60e9aeafdf60 17-Feb-2012 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: iwl_set_hw_params returns always 0

Remove the return value.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
87272af74e98225672c9165a20b0604a7db758cf 26-Jan-2012 Don Fry <donald.h.fry@intel.com> iwlwifi: move bcast_sta_id init to common routine

There is nothing device specific in the initialization of the
bcast_sta_id so move it to the common inititalization routine.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
1042db2af183b96cdce5972014d85e8bca0634ad 03-Jan-2012 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: give trans to all the read / write functions

From now on, the transport layer in charge of providing access to the
device. So change all the driver to give a pointer to the transport
to all the low level functions that actually access the device.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
fb4961dbc27d40cdbed297aa9bd74fa4a0e2ba6c 06-Jan-2012 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: update Copyright

Update Copyright to 2012

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4e3182626a914443a5e0fbe014813f03e51a75df 27-Dec-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: update Copyright

Update Copyright to 2012

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
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>
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>
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>
93b64105e5642728cfc441e20a42164323fe4ad0 17-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>
6a686c600268b71619f93d35f9373e2b6ab5947b 10-Oct-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: move iwl_enable_rfkill_int and kill iwl-helpers.h

Move iwl_enable_rfkill_int to iwl-core.h, and remove the empty
iwl-helpers.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>
c745f55baf63d08d6e9bb20682102fb8bae8f67a 10-Oct-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: merge station management functions

After driver split, no need to separate station management functions
in two files, merge it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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>
cebcbd752a2e8b3a4da1d554cc570fc5310af057 15-Sep-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: rename iwl-pci.h to iwl-cfg.h

There's nothing PCI(E) specific in this file.

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>
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>
b8c2b05e14fbe1ba3fffa31931a1a9ef8da933f9 15-Sep-2011 Fry, Donald H <donald.h.fry@intel.com> iwlagn: simplify chain_noise_num_beacons indirection

chain_noise_num_beacons is set and never changes. Use the #define
rather than 3 levels of indirection.

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>
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>
83ed90155f98bd949735c2cc22d832b557a6d7d1 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: all function iwl-io.c receive iwl_bus

Which means that iwl-io.c doesn't need to include iwl-dev.h 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>
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>
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>
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>
ca9a46056908d3cade6957b3d5b2e698356b29fc 23-Jul-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: bump firmware API for some devices

We're working on improvements for the firmware
for some devices, and need to bump the API for
those since they won't be backward compatible
completely (the earlier patch reserving queue
10 for P2P).

Bump the API version to 6 for those devices
but don't warn users of version 5 yet.

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>
306584c038c2d801a2be772807a89d6a397f0938 23-Jul-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: Remove ht40 support from 5.2GHz for _bgn devices

For _bgn device, remove ht40 support for 5.2GHz, it is probably ok since
the "band" is not support but just feel strange.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
946572b294ccc3e68dabd89e262bbff7685f7a2e 23-Jul-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: default smps mode for 1000 series device

1000 series are 1x2 devices, the old default using static smps which only
use single antenna for rx, set the default to dynamic smps.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
29a34f92b5f1776f011272da315daba827a2d950 13-Jul-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: remove wireless extensions inclusions

linux/wireless.h and net/iw_handler.h headers are
for wireless extensions only, so mac80211 drivers
shouldn't be including them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6bd4dba3d2b8a90d27dfd32b306fa965650599b4 03-Jul-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: kill iwlagn_setup_deferred_work

Since iwlagn_setup_deferred_work is always called, fold it into
iwl_setup_deferred_work. BT related works are setup by the new
bt_setup_deferred_work lib_ops.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
8d30119346d52516f289016e1c57f853a835cb4a 03-Jul-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: kill iwlagn_rx_handler_setup

Since iwlagn_rx_handler_setup is always called, fold it into
iwl_rx_handler_setup. BT related handlers are setup by the new
bt_rx_handler_setup lib_ops.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
4caab328eeea02b244765c355f9d875f8f5f6093 08-Jul-2011 Fry, Donald H <donald.h.fry@intel.com> iwlagn: remove indirection for iwlagn_hw_valid_rtc_data_addr

Not needed since the driver split.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
90c300cbd89e76789dbff101a1cb1ec226af277f 07-Jul-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: remove dual-indirect call to simply the code

After driver split, no need to make the code so complex

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
5c3d29fc0d083e674c09407f1bc78e9dbf4ae8a5 08-Jul-2011 Don Fry <donald.h.fry@intel.com> iwlagn: remove iwlagn_hcmd_utils structure and call directly

Not needed since the driver split. Move single use routines to
calling location and keep static where possible.

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>
909fc3cba374560ada33a7dc3ab242d0f1d2a135 08-Jul-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: remove double level temperature indirect call

No need to do double level indirect call after driver split
no functional changes

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
70e3e8a6e831bf58a7eb98187c186221f01d5b64 08-Jul-2011 Fry, Donald H <donald.h.fry@intel.com> iwlagn: remove indirection for eeprom_query_addr

Not needed since the driver split. Eliminate redundant routine.

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>
e4c598b7ce36f4416f7672617265bc1fa92e5a5f 08-Jul-2011 Fry, Donald H <donald.h.fry@intel.com> iwlagn: remove the indirection for iwl_apm_init

Not needed since the driver split.

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>
6b6db91c8aa14fa9bd041321026d69b9f6ea42ff 08-Jul-2011 Fry, Donald H <donald.h.fry@intel.com> iwlagn: remove the indirection for update_chain_flags

Not needed since the driver split.

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>
02f6f659b0080e60021aae3503163576f88c5ba8 08-Jul-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: remove the indirection for the dma channel num

Not needed since the driver split.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
252e735d64880b011f6cdeb41ebcac2eaeb58fd3 28-Jun-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: remove the indirection for the rx write pointer

Not needed 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>
e3f10cea039b235c1de12648ea87b752990c11bf 01-Jul-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: remove hcmd ops

All "agn" devices use the same hcmd functions, no need to call indirectly.
remove hcmd_ops

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
8fcbd4dc7a1b338b393dcd6869deb1725cf1a9f3 12-Jun-2011 Evgeni Golov <sargentd@die-welt.net> iwlagn: fix *_UCODE_API_MAX output in the firmware field

Currently (3.0-rc2), modinfo iwlagn shows:
firmware: iwlwifi-5150-IWL5150_UCODE_API_MAX.ucode
firmware: iwlwifi-5000-IWL5000_UCODE_API_MAX.ucode
firmware: iwlwifi-6000g2b-IWL6000G2_UCODE_API_MAX.ucode
firmware: iwlwifi-6000g2a-IWL6000G2_UCODE_API_MAX.ucode
firmware: iwlwifi-6050-IWL6050_UCODE_API_MAX.ucode
firmware: iwlwifi-6000-IWL6000_UCODE_API_MAX.ucode
firmware: iwlwifi-100-IWL100_UCODE_API_MAX.ucode
firmware: iwlwifi-1000-IWL1000_UCODE_API_MAX.ucode
firmware: iwlwifi-105-IWL105_UCODE_API_MAX.ucode
firmware: iwlwifi-2030-IWL2030_UCODE_API_MAX.ucode
firmware: iwlwifi-2000-IWL2000_UCODE_API_MAX.ucode

which is obviously wrong, the user should not see the *_UCODE_API_MAX
macros but the actual ucode API versions here.

The problem are the
#define *_MODULE_FIRMWARE(api) *_FW_PRE #api ".ucode"
which do not expand api correctly (because this is a macro itself).

Fixed by using __stringify() from linux/stringify.h.

Further information about macro stringification can be found here:
http://gcc.gnu.org/onlinedocs/cpp/Stringification.html

Signed-off-by: Evgeni Golov <sargentd@die-welt.net>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c6ca8bc46cc320e31e8fcb8b104eeed044febd6f 30-May-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: remove uneeded include to pci.h and dma_mapping.h from a few files

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
c68744fb935400964f7af4835017cad5014c8c88 18-Jun-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: Remove un-necessary indirect call

After driver split, no need to make indirect call to txfifo flush function

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
15b3f3b006b42a678523cad989bfd60b76bf4403 03-Jun-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: set smps mode after assoc for 1000 device

For some timing reason, 1000 device having problem to kick-in to aggregation
without sending rxon assoc command. This is a W/A until find the real reason

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5beaaf3756aef42f31747d81b0676c8ccf59c6c4 27-May-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: remove un-necessary tx power ops

All agn devices use the same tx power function, remove the ops

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
214d14d4d323aab5d455b409e279f9e1e6631123 04-May-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: clean up TXQ indirection

All of these functions no longer need to be
accessed indirectly since they're shared in
all AGN devices.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
94b00658ffc719427c9c09d7920957bc35915c6f 28-Apr-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: remove bytecount indirection

All AGN devices need the bytecount table, so
remove the indirection and make the functions
static again.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
d6d023a1948d13652d719238f8039c09acceda8c 30-Apr-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: remove un-necessary debugfs callback

After driver split, no need for debugfs callback, remove those

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
16b80b714f8ef86d47680e4afa0eeb8cc61daef4 21-Apr-2011 Don Fry <donald.h.fry@intel.com> iwlagn: semaphore and calib cleanup

All agn devices use the same eeprom semaphore and calib version routines.
Delete the indirection and move the semaphore routines to where they are
used and make static.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
9d143e9a0d68025efe902d86eb6207cbec36dcdb 21-Apr-2011 Don Fry <donald.h.fry@intel.com> iwlagn: mod param cleanup

All agn devices use the same module parameter structure. Delete the
indirection and access the structure diretly.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
119ea186cad7643ea82b7290374ebb8e780c35b6 18-Apr-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: remove un-necessary ieee80211_ops

After driver split, no need to use ieee80211_ops, remove it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
5cab35e7f4feda1a0bfd4f48b7686391004be9de 07-Apr-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: no 5.2GHz/HT40 support for bgn devices

For bgn devices, there were no HT40 channels value in EEPROM

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
f42e7662815647c1a6f73e160abcdf812d3057d2 18-Apr-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: temperature should be measure for all _agn devices

Thermal throttling functions are available for all _agn devices, call the
functions directly.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
b7af6a99690503a48c63ce5e587b4e4555f31cdb 07-Apr-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: always support uCode trace

All _agn devices support continuous uCode trace, remove checking

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
e79b1ca75bb48111e8d93fc576f50e24671f5f9d 05-Apr-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: use direct call for led functions

After driver split, no need to call led functions through callback

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
703bc583cb98a24eeedd297ee59dfa12852897d1 03-Apr-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: sensitivity and chain noise done by driver

_agn driver should perform both sensitivity and chain noise calib.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
15ade3ca647d95611814333cfe0885fd0184481e 02-Apr-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: remove un-needed configuration

After driver split, set_l0s config is no longer needed, remove it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
3ecccbcd3c67374aeee447c08fcb9e39a99f7ee5 30-Mar-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: remove un-necessary function pointer

After driver split, no need to use function pointer for those event and
register dump function.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
1d5cc5559aaf5273cc1f9aac9b428e3a99d41de6 29-Mar-2011 root <root@wtplsrv02.(none)> iwlwifi: remove extranious macro from firmware define

define of firmware filenames use extra macro to build the files name.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
519d8abd358afad825a1b919a2421d76779f23cd 05-Apr-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: remove ISR ops

The ISR (interrupt service routine) ops are now
no longer necessary since they are the same for
all devices this driver now handles.

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>
917b6777b45ac49c436570e36eb09d9b8b84c434 05-Apr-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: remove BSM clock setting

Again, a 4965 specific code path that we no
longer need in iwlagn.

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>
901069c71415a76d731857ccda814e18ded062f7 05-Apr-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: change Copyright to 2011

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
1fc352765fb461e4afafff4d650624df8ab6b6d6 05-Apr-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: remove bootstrap code

Only 4965 had a bootstrap microcode image, so
the agn driver can completely ignore that and
we can remove some code from it.

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>
7102762ef0ef330ab0601b6c3bc92bf9be5b1317 05-Apr-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: clean up ucode loading

All agn devices behave the same, so there's no
need to go through function pointers for any
of the ucode loading functionality.

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>
7ffef13d7a24654292c4641450f2794224b9eb5d 15-Mar-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: clean up TX aggregation code

Since the driver split, there's no need for
function pointers any more for aggregation
queue setup and teardown as all devices now
share the same code. Simplify this.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
fea41cc9b1af5f65fecf4013ad62284e6ae3a78c 25-Feb-2011 Fry, Donald H <donald.h.fry@intel.com> iwlagn: Support new 1000 microcode.

iwlagn: Support new 1000 microcode.

New iwlwifi-1000 microcode requires driver support for API version 5.
(There is no version 4)

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
ad6e82a5348e494c0023d77fa55933f23b55711c 28-Feb-2011 Stanislaw Gruszka <sgruszka@redhat.com> iwlwifi: move check health code into iwl-rx.c

Remove check_plcp_health and check_ack_health ops methods, they are
unneeded after iwlegacy driver split. Merge check health code into to
iwl-rx.c and make functions static.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9dc2153315650eae220898668b6aa56a25c130be 17-Jan-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: always support idle mode for agn devices

For agn devices, always support idle mode which help power
consumption in idle unassociated state.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
9d4dea7259d2fccf447f20788300121cf1d014bb 13-Jan-2011 Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> iwlagn: Enable idle powersave mode in 1000 series

The iwlagn powersave algorithm uses the supports_idle parameter
to tell the device to save power when it is not associated with
an AP and is idle.

Enable this feature for the 1000 series of devices.

Reported-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
65af8dea26aa89ae4a810bdaa05545a8e670b636 08-Dec-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: code clean up to remove duplicate code

Multiple devices use almost the same .cfg with minor differences.
Use macro and remove the duplication. By doing this, reduce
the chance for mistake while modify .cfg parameters

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
c6fc108776e77e38e099d5b13c4f57a2172c6698 09-Dec-2010 Johannes Berg <johannes.berg@intel.com> iwlagn: remove old EEPROM TX power reading

This removes the old TX power reading code, it isn't
necessary since the new code is able to read all the
various EEPROM layouts due to relying on information
contained in the EEPROM.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
8d6748ca73a0caffed4304a47a9cb4cd0aba361e 09-Dec-2010 Johannes Berg <johannes.berg@intel.com> iwlagn: implement layout-agnostic EEPROM reading

The current EEPROM reading code has some layout
assumptions that now turned out to be false with
some newer versions of the EEPROM. Luckily, we
can avoid all such assumptions by using data in
the EEPROM itself, so implement using that.

However, for risk mitigation purposes, keep the
old reading code for current hardware for now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
17423ea8776362100b0a9a162cdd4b16b886a4a2 06-Dec-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: rx antenna diversity

For the new 1x1 devices, hw and uCode will support rx
antenna diversity, but we need to indicate 1x1 device to
AccessPoint to make sure it won't use MIMO.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
6942fec92d3d1b6918425730de31b4c6d0d5c196 09-Dec-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: implement layout-agnostic EEPROM reading

From: Johannes Berg <johannes.berg@intel.com>

The current EEPROM reading code has some layout
assumptions that now turned out to be false with
some newer versions of the EEPROM. Luckily, we
can avoid all such assumptions by using data in
the EEPROM itself, so implement using that.

However, for risk mitigation purposes, keep the
old reading code for current hardware for now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
22de94de7de78b8de2fb1f2df5aa85b5556cfcfd 03-Dec-2010 Stanislaw Gruszka <sgruszka@redhat.com> iwlwifi: jiffies based tx queues watchdog

This patch replace monitor/recover timer by watchdog based on time
stamp. New code allow to discover hangs more precisely.

Timeout values are currently doubled monitoring period values of
previous timer. This have to be tuned based of firmware timing
capabilities.

Tested on 3945, 4965, 5300, 6300.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
638514ff5d5845c6eba8c266ea04325be6e7d106 17-Nov-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: Offical name for 100/130 device

Change to offical name for 100 devices:
"Intel(R) Centrino(R) Wireless-N 100"

Change to offical name for 130 devices:
"Intel(R) Centrino(R) Wireless-N 130"

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
dbbf1755b09eef8ff6dd21c8dafe1606f051ce12 15-Nov-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: use antenna information in EEPROM

The valid tx/rx antenna information is part of EEPROM, so use it
to configure the device.

For few cases, the EEPROM did not reflect the correct antenna, but
it is too late to modify the EEPROM, so overwrite with .cfg parameters

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
21a5b3c6b19a8b8972ccdd55389be28a8b7c9180 10-Nov-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: use SKU information in the EEPROM

EEPROM contain the SKU information for the device, use it.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
564b344c10b694d433cef5b89f8ff8ac5e33898d 09-Nov-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: change default led mode for different devices

Set the default led mode for different devices.

For the newer devices such as 6000g2a, 6000g2b and newer,
the default led mode is On/Off instead of blinking.

The led_mode still can be control through module parameter
0: system default
1: On/Off
2: blinking

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
e39fdee1d7856817619326fa114438c146d74510 10-Nov-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: put all the isr related function under ops

There were two type of isr supported by iwlwifi devices.
legacy isr - only used by legacy devices (3945 & 4965)
ict isr - used by all new generation of iwlwifi devices

Move all the isr related functions into ops, the ict type of isr
supports only needed for newer devices.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2295c66b68ae160dde2e6e2dc4f3061105153bfc 23-Oct-2010 Johannes Berg <johannes.berg@intel.com> iwlagn: new RXON processing for modern devices

In order to simplify the flow, and make new
enhancements easier, separate out the RXON
processing for modern AGN (5000 and newer)
from RXON processing for the older 3945 and
4965 devices. Avoid changing these old ones
to avoid regressions and move their code to
a new file (iwl-legacy.c). 4965 gets the
commit_rxon that used to be common for all
AGN devices, but with removed PAN support.

The new RXON processing is more central and
does more work in committing, so that it is
easier to follow.

To make it more evident what is split out
for legacy, split the necessary operations
for that into a new struct iwl_legacy_ops.
Those parts that still exist in the new AGN
code don't need to be parametrized.

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>
dc21b5453249e7e9b8878fab356fd60b731cf04d 23-Oct-2010 Johannes Berg <johannes.berg@intel.com> iwlwifi: make mac80211 ops a device config

In the future, 4965 and modern AGN devices will
need to have different mac80211 callbacks since
they have different capabilities. Prepare for
that by making the mac80211 operations a device
config.

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>
14e8e4afeb7e90f1f2d3f2d3b54da57c27f59f38 22-Sep-2010 Johannes Berg <johannes.berg@intel.com> iwlwifi: remove apm_ops.stop

Since all devices share the same operation here,
there's no need to call it indirectly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
9597ebac91e5a88f558d236a51d776508d42a237 22-Sep-2010 Johannes Berg <johannes.berg@intel.com> iwlwifi: remove set_pwr_src operation

The set_pwr_src operation is only ever used from
within the same sub-driver that it is declared
in, so it can just be called directly instead of
being an operation. Also, it is never called to
set the power source to V_aux, so change the two
functions accordingly (but keep the V_aux code
for documentation purposes in a comment).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
0453674c90be7b39c8925ba5e1d746447905f8ee 22-Sep-2010 Johannes Berg <johannes.berg@intel.com> iwlwifi: remove set_ct_kill operation

This operation is only ever called from set_hw_params,
which is also already based on the config/ops, so that
there's no need to have a separate set_ct_kill op and
we can just call the right ct_threshold function.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
d3f5ba958d6c425a87535c6fa2a69ca90eb6e930 22-Sep-2010 Johannes Berg <johannes.berg@intel.com> iwlwifi: remove verify_signature eeprom operation

All drivers share the same implementation, so
there's no need to call this via a function
pointer nor to export it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
7cb1b0887fcc61918e3d64827fbef968bb67a57a 06-Oct-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: reduce redundant parameter definitions

move paramater definitions to a device paramater structure only
leaving the device name, which antennas are used and what firmware
file to use in the iwl_cfg structure. this will not completely
remove the redundancies but greatly reduce them for devices that
only vary by name or antennas. the parameters that are more
likely to change within a given device family are left in iwl_cfg.
also separate bt param structure added to help reduce more.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
1de19eccb3fe634e939cb40f30fdfda93a67fe93 15-Sep-2010 Jay Sternberg <jay.e.sternberg@intel.com> iwlwifi: define 100 devices

add new structures and defines need to identify 100 devices.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
54a9aa65f749673f851ef86481940394185c1b0e 05-Sep-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: keep track of failure tx status

Tx command response sent to host by uCode after completed
the transmission attempt. The status parameter indicates
whether the transmission was successful, or else why if failed.

Here we keep the counters to help understand the different failure
cases.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
a194e3249baf954dc34c67cdad5b8bed36f49e72 27-Aug-2010 Johannes Berg <johannes.berg@intel.com> iwlwifi: contextify broadcast station

The broadcast station ID is per context, so
add a variable for the ID in the context and
use it everywhere we previously hardcoded it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
0975cc8fbf5b61b188734f2edd9e588c7edff2a1 31-Jul-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: separate thermal throttling function

"Thermal Throttling" is an advance feature which only available for
newer _agn devices. Move from iwl-core to iwl-agn for better code
organization.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ce60659ad838a77d71aa817a6781659799970ae1 23-Jul-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: long monitor timer

Change the name for monitor timer, also adding define for long monitor
timer; long monitor timer can be used for the type of devices require longer
time to determine the uCode is stuck on tx and needed reload.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
94597ab23ea10b3bdcba534be00a9f7b35791c07 09-Aug-2010 Johannes Berg <johannes.berg@intel.com> iwlagn: fix rts cts protection

Currently the driver will try to protect all frames,
which leads to a lot of odd things like sending an
RTS with a zeroed RA before multicast frames, which
is clearly bogus.

In order to fix all of this, we need to take a step
back and see what we need to achieve:
* we need RTS/CTS protection if requested by
the AP for the BSS, mac80211 tells us this
* in that case, CTS-to-self should only be
enabled when mac80211 tells us
* additionally, as a hardware workaround, on
some devices we have to protect aggregated
frames with RTS

To achieve the first two items, set up the RXON
accordingly and set the protection required flag
in the transmit command when mac80211 requests
protection for the frame.

To achieve the last item, set the rate-control
RTS-requested flag for all stations that we have
aggregation sessions with, and set the protection
required flag when sending aggregated frames (on
those devices where this is required).

Since otherwise bugs can occur, do not allow the
user to override the RTS-for-aggregation setting
from sysfs any more.

Finally, also clean up the way all these flags get
set in the driver and move everything into the
device-specific functions.

Cc: stable@kernel.org [2.6.35]
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>
ffb7d896b3bc21e09d77fed45b52b2ff4ce213e5 14-Jul-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: add bluetooth stats to debugfs

For WiFi/BT combo devices, add bluetooth statistics counter
read function to debugfs.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
bf3c7fddf9dffb0e5c76da3a94b8f5817a72f92c 24-Jun-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: generic parameter define for _agn device

Code clean up to change name from having 5000 as part of name which easy
to confuse and think it is for 5000 series devices to more
generic _agn name since it is being used by multiple _agn devices.

No functional changes.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
6555063666fea1fc81a14396aca53ab021ccb4f2 24-Jun-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: add support for device tx flush request

"Flush" request can come from two different sources, it can either from
mac80211, or from device when the operation is needed. Here
adding the support for device issue "flush" request.

When receive tx complete with status is TX_STATUS_FAIL_RFKILL_FLUSH,
issue REPLY_TXFIFO_FLUSH command to uCode to flush out all the tx frames
in queues.

In this condition, since mac80211 has no knowledge of "flush" operation,
driver need to stop all the tx queues and wait for the operation
completed before wake up the queues for frames transmission.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
716c74b00717ad9caedb4a46059fb64a3da99808 24-Jun-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: add mac80211 flush callback support

Adding flush callback support in the driver. Two type of flush can be
issued by mac80211:
1. drop = true: frame drop is ok, issue REPLY_TXFIFO_FLUSH host command
to uCode to drop all the frames in tx fifo queues; then return the
control back to mac80211
2. drop = false: wait for either all the frames in tx fifo queues been
transmitted, or timeout; then return the control back to mac80211

If the flush request coming from mac80211, mac80211 will make sure there
are no additional frames push down to driver before flush operation is
completed.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
278c2f6faafebe28b9776918ce5fbaef9795c141 14-Jun-2010 Daniel Halperin <dhalperi@cs.washington.edu> iwlwifi: update LQ for bcast station on channel change

The rate table in the bcast LQ is computed only when the station is
allocated, and chooses the lowest rate for the band. Because of when this
occurs, this is the 2.4 GHz band and uses the 0x420a (CCK, 1 Mbps) rate. In 5 GHz
beaconing mode, this rate will prevent beacons from being sent and any other
packets from being received.

We can fix this by re-initializing the bcast station's LQ command when the
channel is changed.

Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
178d1596073e81927a24221dba6c55ae0048a207 16-Jun-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: enable DC calibration based on config parameter

Different devices have different calibration requirement,
some need DC calibration and some don't; make it a cfg parameter
for easy management.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
a0ee74cf080389aee4fbf198ffa7e85b3480b661 06-May-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: beacon format related helper function

Move the ucode beacon formation related helper function from 3945 to
iwlcore, so both _3945 and _agn devices can utilize those functions.

When driver pass the beacon related timing information to uCode in both
spectrum measurement and channel switch commands, the beacon timing
parameter require in uCode beacon format; those helper functions will do
the conversation from uSec to the correct uCode format

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2c810ccdbac434ae38f4ec5331d3f047dc90f98a 29-Apr-2010 Johannes Berg <johannes.berg@intel.com> iwlwifi: rework broadcast station management

Currently, the broadcast station is managed along
with the interface type, rather than always being
present. That leads to a bug with injection -- it
is currently not possible to inject frames when
the only virtual interface is a monitor, because
in that the required broadcast station is missing.

Additionally, allocating and deallocating the
broadcast station's LQ all the time is wasteful,
and the code to support this is fairly complex.

So this changes completely the way we manage the
broadcast station. Rather than manage it along
with any interface, we now allocate it when we
bring the device up, and remove it again when we
bring the device down. When we bring the device
up, we don't immediately program the broadcast
station into it, instead we just mark it active
and rely on the next restore cycle to upload it
to the device. This works because an unassociated
RXON is always required at least once to set up
device parameters, which implies a reprogramming
of stations into the device.

As we now manage all stations properly, there no
longer is a need for forcing a clearing of them
via iwl_clear_ucode_stations(), which can become
a lot simpler.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
22adba2a6995dc24663251ffb954f8856968f26e 28-Apr-2010 Johannes Berg <johannes.berg@intel.com> iwlwifi: remove ucode virtual functions

AGN devices all use the same ucode operations,
except for 4965, because 4965 uses only v1 file
headers.

Therefore, we can remove all the indirection
we have here and just code the API distinction
in place, with a small special case for 4965.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
1fa61b2e793dad51271c7ce39377daade51261d7 28-Apr-2010 Johannes Berg <johannes.berg@intel.com> iwlwifi: manage IBSS station properly

Currently iwlwifi will eventually exhaust the station
table when adding the BSSID station for IBSS mode,
unless the interface is set down.

The new mac80211 ibss joined/left notification allows
us to fix that easily by moving the code to add the
IBSS station to the notification, and also adding
code to remove it again when we leave the IBSS.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
65d1f89682acf4d61dec7a8b771ed34afb7c17d9 26-Apr-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: use cfg to configure calibration operation

sensitivity calibration and chain noise calibration are not available
for all the devices; use .cfg to configure the availability of those
calibration functions

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
6e5c800e75fad95f2a12d45d9b548b23834a13ff 27-Apr-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: use .cfg to enable/disable continuous ucode trace

Instead of checking device type for enable/disable continuous ucode
trace function; put it in .cfg for better control and more
flexibilities.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
f8478df1eab2f11aefc4b6668c5867949ab96bd7 20-Apr-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: greenfield support only true for 11n devices

Greenfield is a 11n feature, remove it from non-11n devices
configuration parameters list

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
b8c76267cfb9a025afdd122bc2a8942dbf493dd1 09-Apr-2010 Abhijeet Kolekar <abhijeet.kolekar@intel.com> iwlwifi: add debugfs ops to iwlwifi

Seperate debugfs functions into iwlagn specific
debugfs file and Add debugfs ops to iwlwifi.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
678b385d07835c6c21371c12eaaa3fba4de05168 26-Mar-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: default max event log size

Size of event log is determined by uCode which is different per NICs.
Set the maximum event log size per device to better match uCode
configuration.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
348ee7cd57831c47373dd157f138c558daaf129d 16-Mar-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: move agn module parameter structure to common place

agn module parameter data structure shared by all agn devices, move it
iwl-agn-lib.c file.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
00e70590dc2707043b82c0cf9a6929b81e640fee 16-Mar-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: each device has its own eeprom tx power version

Each device has it own eeprom, so the tx power version could be
different, define TX_POWER_VERSION per device.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
e04ed0a5bb62520345c73587d7ebf51e426642ee 17-Mar-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: move agn common code to iwlagn library file

Multiple iwlagn based devices share the same common functions.
Move those functions from iwl-5000.c to iwl-agn-lib.c file.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
741a626627e42812afd957f875c34c89be8a103e 16-Mar-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: move ucode alive related code to separate file

uCode alive for iwlagn based devices share the same functions.
Move those functions from iwl-5000.c to iwl-agn-ucode.c.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
19e6cda094002e9756a3d181cbb4c31ef2a9b6bb 17-Mar-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: move hw related defines to separate file

Multiple iwlagn based devices shared the same hw definitions.
Move device hardware related defines from iwl-5000-hw.h to iwl-agn-hw.h
file.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
b305a08058f794c8a99c5ee87827b92d6b8c24ae 17-Mar-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: move tx queue related code to separate file

Multiple iwlagn based devices shared the same tansmit queue functions.
Move tx queue related code from iwl-5000.c to iwl-agn-tx.c file.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
7dc77dba6a8bde512996824643da5669d73cbcdc 16-Mar-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: move hcmd related code to separate file

Multiple iwlagn based devices shared the same hcmd related functions.
Move from iwl-5000.c to iwl-agn-hcmd.c file.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
81b8176eb8edac7d2135db2af03ab5fe0cb3b6f7 16-Mar-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: code cleanup for "load ucode" function

Loading uCode functions are shared across multiple agn devices.
Move those functions to iwl-agn-ucode.c file with other uCode
related functions.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
792bc3cbe06cddabd865acc3122ee0415f854a11 16-Mar-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: move ucode loading related code to separated file

Multiple iwlagn based devices shared the same ucode loading procedure.
Move loading related code from iwl-5000.c to iwl-agn-ucode.c file.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
fa8f130c504223d25c116b3d23787f465dfb1317 05-Mar-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: code cleanup for connectivity recovery

Split the connectivity check and recovery routine into separated
functions based on the types
1. iwl_good_ack_health() - check for ack count
2. iwl_good_plcp_health() - check for plcp error

Based on the type of errors being detected, different recovery methods
will be used to bring the system back to normal operational state.

Because different NIC has different HW and uCode, the behavior is also
different; these functions thus now form part of the ops infrastructure,
so we can have more control on how to monitor and recover from error condition
case per device.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
beac5498b792ed8420885ee23e8d4f2885ee2d13 04-Mar-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: move plcp check to separated function

Move the plcp error checking into stand alone function and pointed by ops
to accommodate devices not needing this recovery.

Signed-off-by: Trieu 'Andrew' Nguyen <trieux.t.nguyen@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
b74e31a9bc1013e69b85b139072485dc153453dd 02-Mar-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: Recover TX flow stall due to stuck queue

Monitors the internal TX queues periodically. When a queue is stuck
for some unknown conditions causing the throughput to drop and the
transfer is stop, the driver will force firmware reload and bring the
system back to normal operational state.

The iwlwifi devices behave differently in this regard so this feature is
made part of the ops infrastructure so we can have more control on how to
monitor and recover from tx queue stall case per device.

Signed-off-by: Trieu 'Andrew' Nguyen <trieux.t.nguyen@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
c11362c01b280f8b2c728bc64793d484282b8734 06-Mar-2010 Shanyu Zhao <shanyu.zhao@intel.com> iwlwifi: clean up driver names for 1000/5000/6000

Align the driver names with official product names for 1000/5000/6000
series. This change mainly affects the debug messages show up in system
log. No functional changes.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
a1175124f34a4b859b5064efb84a197e4f6794a6 21-Jan-2010 Johannes Berg <johannes.berg@intel.com> iwlagn: move ICT code into separate file

All the ICT ISR code is iwlagn specific, and doesn't
need to be in iwlcore. So create a new iwl-agn.h
header file that will hold agn specific function
declarations etc., and move the ICT code into a new
iwl-agn-ict.c file that is linked into iwlagn. This
also gets rid of exporting those symbols.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
6c3872e1d52290dcd506473028867cacc6b7393d 08-Feb-2010 Trieu 'Andrew' Nguyen <trieux.t.nguyen@intel.com> iwlwifi: Adjusting PLCP error threshold for 1000 NIC

While testing the station with the NIC 1000 family, it is found that
the plcp error can easily exceed 50 value in 100mSecs. This creates
unneccessary radio reset/tuning. This patch raises the PLCP error
threshold of the NIC 1000 from 50 to 200 error count.

Signed-off-by: Trieu 'Andrew' Nguyen <trieux.t.nguyen@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
d4fe5ac9e04e6e175a7bd7e29844b351533be591 05-Feb-2010 Ben Cahill <ben.m.cahill@intel.com> iwlwifi: Add chain noise scaling factor

6x50 device requires a different scaling factor for Rx gain values sent to
device via PHY_CALIBRATION_CMD (CHAIN_NOISE_GAIN_CMD). Rather than create
a new iwlXXXX_gain_computation() function, add new chain_noise_scale member
to struct iwl_cfg, and keep using iwl5000_gain_computation().

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
fac06108701a2a081a47d4dc6f03220aaab54486 20-Jan-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: update sensitivity calibration data for 1000 series

Update sensitivity range values for 1000 series

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
3459ab5a1c92eaf8b76e9fa1b6ca529cf83066f3 22-Jan-2010 Reinette Chatre <reinette.chatre@intel.com> iwlwifi: make broadcast station addition generic

Add function pointer for broadcast station addition so that we can call it
in from iwlcore at a later time. We only distinguish between iwlagn and
iwl3945 broadcast station addition. For the iwl3945 station addition we add
that function to iwlcore since that is where most station functionality
resides, making it part of iwl3945 will require significant code
reorganization that will dilute station management functionality. This
seems to be an efficient solution.

It may seem as though we are removing error checking when adding the 3945
broadcast station but this error checking was never really necessary since
the function returns the station id and the broadcast station id is always
set.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
3e4fb5faefb57824f2e42305b3d5907845af978c 22-Jan-2010 Trieu 'Andrew' Nguyen <trieux.t.nguyen@intel.com> iwlwifi: Tune radio to prevent unexpected behavior

We have seen the throughput dropped due to external noisy environment
and the radio is out of tune. There are lot of plcp errors indicating
this condition. Eventually the station can get de-authenticated by the
Access Point. By resetting and tuning the radio, the plcp errors are
reduced or eliminated and the throughput starts to rise.

To prevent unexpected behavior such as drop in throughput or deauthentication,
- The change provides the driver feature to monitor and tune the radio base on
the statistics notification from the uCode.
- It also allows the setting of the plcp error rate threshold via
the plcp_delta under debugfs interface.

Signed-off-by: Trieu 'Andrew' Nguyen <trieux.t.nguyen@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
1f44780827c6bbbcd1f12d5c6b6ce84f49a96bc0 15-Jan-2010 Reinette Chatre <reinette.chatre@intel.com> iwlwifi: update copyright year to 2010

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
1b3eb8236ad9369ae519216b61a3d22806370115 15-Jan-2010 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: display flowhandler register when sw error or on-demand

Flowhandler handle the communication between driver and uCode, when any
uCode error happen, we also like to know what is the status of the
flowhandler; it can help to debug flowhandler related problem.

Also adding debugfs file to dump current value of flowhandler registers.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
45d5d805988f1f3c0b24dac59fbba771b1f106a8 14-Dec-2009 Emese Revfy <re.emese@gmail.com> iwlwifi: Constify struct iwl_ops

Signed-off-by: Emese Revfy <re.emese@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ba37a3d0395a66b3c9164c4f4d1318317da32e96 10-Dec-2009 Johannes Berg <johannes@sipsolutions.net> iwlwifi: use new mac80211 SMPS

Instead of hard-coding the SM PS mode per hardware,
this makes iwlwifi support the new mac80211 API for
controlling the SM PS mode.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
696bdee3ba216186e21997d20a839b76158346e6 10-Dec-2009 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: dump "Control and Status Register" when detect uCode HW/SW error

When uCode HW/SW error detected, dumping important CSR (Control and Status
Registers) values.
Also add "csr" debugfs file to dump the current values of CSR defined in
CSR table to syslog.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c15d20c1d19616f73b6fee4befd254d0c37b4d87 20-Nov-2009 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: set sm_ps_mode as part of cfg parameters

Setting "Spatial multiplexing Power Save" as part of
per device configuration parameter.

Report to uCode based on priv->conf setting, so driver can
have more control of how different devices should operate
in power save mode.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ddd21046e7b5e112b5a4722b7e071ae9d4c96a2b 11-Nov-2009 John W. Linville <linville@tuxdriver.com> iwlwifi: fix iwl1000 "RTS/CTS for HT" merge damage

I may have botched my merge conflict resolution instructions for Dave...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
f060face819401fb1f6456d362c5bc6672bba655 06-Nov-2009 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: Fix issue on file transfer stalled in HT mode

Turn on RTS/CTS for HT to prevent uCode TX fifo underrun

This is fix for
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2103

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Tested-by: Jiajia Zheng <jiajia.zheng@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d01032e4fd33110f9f3a085a36cb819c1dfc5827 07-Nov-2009 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: Fix issue on file transfer stalled in HT mode

Turn on RTS/CTS for HT to prevent uCode TX fifo underrun

This is fix for
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2103

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Tested-by: Jiajia Zheng <jiajia.zheng@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a6c5c731c3f783f60ed79dcf41efa8b5b3af2f22 30-Oct-2009 Ben Cahill <ben.m.cahill@intel.com> iwlagn: invoke L0S workaround for 6000/1000 series

Invoke workaround to avoid instability in L0->L0S->L1 transition on PCIe bus.
Workaround disables L0S state so device moves directly from L0->L1.
Workaround needed on all devices since and including 4965; add to 6000/1000.

Describe bug and workaround better in comments.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
480e8407dc0bccdd8d7cfe29b8fcaaa21dd20e68 23-Oct-2009 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: issue ct_kill host command based on device config

Using device configuration structure to decide how to configure
ct_kill host command.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
fadb3582a38c33d0f7c58ab7905d4dbc67f4c4d9 23-Oct-2009 Ben Cahill <ben.m.cahill@intel.com> iwlwifi: consolidate apm_init() functions

Consolidate most iwlXXXX_apm_init() functions into single iwl_apm_init().
Keep iwl3945_apm_init(), but leverage iwl_apm_init() for most functionality.
Update 4965 init sequence to follow most recent factory recommendations.

Add following members to struct iwl_cfg to guide the init sequence:
pll_cfg_val (replaces needs_pll_cfg), set_l0s, use_bsm

Move L0S enable/disable from nic_config() functions to iwl_apm_init().
This satisifies the "FIXME: put here L1A -L0S w/a" notice, and complies
with factory-recommended sequence.

Add debug info message in iwl_apm_init(), and symmetrical message
in iwl_apm_stop().

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
88804e2b33b6ab3974ff2330cd045ca53d6750c5 09-Oct-2009 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: dynamic allocate tx queue structure

Instead of always allocate the max number of tx queue structure,
use dynamic allocation based on the number of queues in device
configuration. With these changes, device does not have to allocate more
memory than the h/w can support.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b660d3adb8dd4ead54744c9269bae9338163020a 09-Oct-2009 Ben Cahill <ben.m.cahill@intel.com> iwlagn, iwl3945: remove apm_reset() functions

Clean up device-specific apm_reset() functions and library infrastructure,
now that these reset() functions are no longer being used.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d68b603cf01a6e7d8c85c5a86db751ed3960c0c7 02-Oct-2009 Abhijeet Kolekar <abhijeet.kolekar@intel.com> iwlwifi/iwl3945 : unify apm stop operation

Unify the usage of apm_stop_master and apm_stop
across all hardwares.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e932a609e9759cc75db0c234f465a5fd6e20d362 02-Oct-2009 Johannes Berg <johannes@sipsolutions.net> iwlwifi: LED cleanup

The iwlwifi drivers have LED blinking requirements that
mac80211 cannot fulfill due to the use of just a single
LED instead of different ones for TX, RX, radio etc.
Instead, the single LED blinks according to transfers
and is solid on the rest of the time. As such, having
LED class devices registered that mac80211 triggers are
connected to is pointless as we don't use the triggers
anyway.

Remove all the useless code and add hooks into the
driver itself. At the same time, make the LED code
abstracted so the core code that determines blink rate
etc. can be shared between 3945 and agn in iwlcore.

At the same time, the fact that we removed the use of
the mac80211 LED triggers means we can also remove the
IWLWIFI_LEDS Kconfig symbol since the LED support is
now self-contained.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9554b34ad5817f424253aab265d0e2a54207f810 25-Sep-2009 Huaxu Wan <huaxu.wan@linux.intel.com> iwlwifi: add module firmware info for 1000 series

The module firmware information of 1000 series is missing from iwlagn.

Signed-off-by: Huaxu Wan <huaxu.wan@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d8c07e7a84950b5fdef424c6dabe6bed3a9ffa19 25-Sep-2009 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: Chain Noise Calibration for 6000 series

Adding support of Chain Noise Calibration for 6000 series NICs.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4bd0914fa2a09d655c54fb0355aed7f9182b2187 17-Sep-2009 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: update PCI Subsystem ID for 1000 series

Update PCI Subsystem ID for 1000 series based on HW SKU. Adding new SKU
for "BG" only devices.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
1f4b9665032c4a1d60efd9ceaad2781cae6c7e92 17-Sep-2009 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: EEPROM version for 1000 and 6000 series

Update EEPROM version requirement for 1000 and 6000 series of NIC
for EEPROM version verification.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
f2d0d0e2bab7a325071dbaba3bef51c90868e1e6 11-Sep-2009 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: Adjust blink rate to compensate Clock difference

Adjust led blink rate to compensate on a MAC Clock difference on every
HW. Led blink rate analysis showed an average deviation of 0% on 3945,
5% on 4965 HW and 20% on 5000 series and up.
Need to compensate on the led on/off time per HW according to the
deviation to achieve the desired led frequency
The calculation is: (100-averageDeviation)/100 * blinkTime
For code efficiency the calculation will be:
compensation = (100 - averageDeviation) * 64 / 100
NewBlinkTime = (compensation * BlinkTime) / 64

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9371d4ed79c1c2efefa00226f7f6b95e0e0b8f2b 11-Sep-2009 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: separate nic_config for different NIC

Different NIC has different requirements for configuration. Currently all
5000 series hardware and later share the same configuration function even
though they do not need the same configurations. Fix this by separating the
needed configuration actions for each hardware model.

.5000 series: L1-ASPM H/W bug work-around
configure radio
write CSR_HW_IF_CONFIG_REG for uCode use
work-around for NIC get stuck after early PCIe power off

.1000 series: write CSR_HW_IF_CONFIG_REG for uCode use
setting digital SVR for 1000 card to 1.32V

.6000 series: configure radio
write CSR_HW_IF_CONFIG_REG for uCode use
write CSR_GP_DRIVER_REG to indicate radio sku

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b7a794048ff30d53764c1e41ccb2bff7f7bec2a8 25-Sep-2009 Reinette Chatre <reinette.chatre@intel.com> iwlwifi: fix 3945 ucode info retrieval after failure

When hardware or uCode problem occurs driver captures significant
information from device to enable debugging. The format of this information
is different between 3945 and 4965 and later devices, yet currently the
3945 uses the 4965 and later format. Fix this by adding a new library call
that is initialized to the correct formatting routine based on device.

This moves the iwlagn event and error log handling back to iwl-agn.c to
make it part of iwlagn module.

Also remove the 3945 sysfs file that triggers dump of event log - there is
already a debugfs file that can do it for all drivers.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b261793da587160d12ce6d63db60493342ddce20 13-Aug-2009 Daniel C Halperin <daniel.c.halperin@intel.com> iwlwifi: use station HT capabilities and BSS operating mode for Green-field

Green-field mode should be configured in the HT station table. This patch uses
both the per-station GF support flag as well as the current BSS HT operation
mode (non-GF stations present flag).

Added the "ht_greenfield_support" field to struct iwl_cfg to replace the
device-specific check in rs_use_green(). That check has been moved to
iwlcore_init_ht_hw_capab().

Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
415e49936b4b29b34c2fb561eeab867d41fc43a6 13-Aug-2009 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: traverse linklist to find the valid OTP block

For devices using OTP memory, EEPROM image can start from
any one of the OTP blocks. If shadow RAM is disabled, we need to
traverse link list to find the last valid block, then start the EEPROM
image reading.

If OTP is not full, the valid block is the block _before_ the last block
on the link list; the last block on the link list is the empty block
ready for next OTP refresh/update.

If OTP is full, then the last block is the valid block to be used for
configure the device.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7aafef1c6e2e24f9a10dc2972bf0ee70624ccc47 08-Aug-2009 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: name changed from "fat" to "ht40"

Rename "fat" to "ht40"
The term "fat channel" is deprecated in favor of "HT40"

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
65b7998a9be418482493e9448bb83ff2914ed050 31-Jul-2009 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: Distinguish power amplifier for 6000 series

For 6x00 2x2 NIC, two types of Power Amplifier are available.
In order for uCode to apply correct tx power,
driver needs to program the CSR_GP_DRIVER_REG register and
let uCode know the type of PA.
If driver do not program CSR_GP_DRIVER_REG register (default to 0),
then it is uCode's decision for tx power

2x2 Hybrid card: use both internal and external PA
2x2 IPA(Internal Power Amplifier) card: internal PA only

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
f7ea097d9b4e61a816c041c92548aad7c7ed7915 24-Jul-2009 Reinette Chatre <reinette.chatre@intel.com> iwlagn: fix null pointer access during ucode load on 1000

Commit "iwlwifi: Handle new firmware file with ucode build number
in header" introduced new ucode header parsing routines, but
neglected to initialize these routines for 1000. The system thus goes
into infinite loop trying to load ucode, failing every time with a null
pointer exception as it tries to parse the header.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
672639de13c4db92ed6a47e68043a4317e219902 24-Jul-2009 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: critical temperature enter/exit condition

If advance thermal throttling is used the driver need to pass both
"enter" and "exit" temperature to uCode.

Using different critical temperature threshold for legacy and advance
thermal throttling management based on the type of thermal throttling
method is used except 1000.
For 1000, it use advance thermal throttling critical temperature
threshold, but with legacy thermal management implementation until ucode
has the necessary implementations in place.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
cce53aa347c1e023d967b1cb1aa393c725aedba5 17-Jul-2009 Jay Sternberg <jay.e.sternberg@intel.com> iwlwifi: update 1000 series API version to match firmware

firmware file now contains build number so API needs to be updated.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
77dcb6a9526b1e0d159a9300e512c7271bff3163 06-Mar-2009 Jay Sternberg <jay.e.sternberg@linux.intel.com> iwlwifi: correct device name for 1000 series

device name was changed from 100 to 1000

Signed-off-by: Jay Sternberg <jay.e.sternberg@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>