aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-6000.c
Commit message (Collapse)AuthorAgeFilesLines
* iwlagn: fix *_UCODE_API_MAX output in the firmware fieldEvgeni Golov2011-06-271-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* iwlagn: fix channel switch lockingStanislaw Gruszka2011-06-031-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | We use priv->mutex to avoid race conditions between iwl_chswitch_done() and iwlagn_mac_channel_switch(), when marking channel switch in progress. But iwl_chswitch_done() can be called in atomic context from iwl_rx_csa() or with mutex already taken from iwlagn_commit_rxon(). These bugs were introduced by: commit 79d07325502e73508f917475bc1617b60979dd94 Author: Wey-Yi Guy <wey-yi.w.guy@intel.com> Date: Thu May 6 08:54:11 2010 -0700 iwlwifi: support channel switch offload in driver To fix remove mutex from iwl_chswitch_done() and use atomic bitops for marking channel switch pending. Also remove iwl2030_hw_channel_switch() since 2000 series adapters are 2.4GHz only devices. Cc: stable@kernel.org # 2.6.36+ 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>
* iwlagn: fix incorrect PCI subsystem id for 6150 devicesWey-Yi Guy2011-05-311-10/+18
| | | | | | | | For 6150 devices, modify the supported PCI subsystem ID. Cc: stable@kernel.org Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: clean up TXQ indirectionJohannes Berg2011-05-131-8/+0
| | | | | | | | | 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>
* iwlagn: prepare for multi-TB commandsJohannes Berg2011-05-131-2/+2
| | | | | | | | | | In a subsequent patch, I want to make commands use multiple TBs in a TFD. This is a simple change to prepare the data structures for this, with as of now still just a single TB supported. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: remove bytecount indirectionJohannes Berg2011-05-061-4/+0
| | | | | | | | | 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>
* iwlagn: remove un-necessary debugfs callbackWey-Yi Guy2011-04-301-15/+0
| | | | | | After driver split, no need for debugfs callback, remove those Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: semaphore and calib cleanupDon Fry2011-04-301-8/+2
| | | | | | | | | 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>
* iwlagn: mod param cleanupDon Fry2011-04-301-9/+3
| | | | | | | | 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>
* iwlagn: remove un-necessary ieee80211_opsWey-Yi Guy2011-04-181-4/+0
| | | | | | After driver split, no need to use ieee80211_ops, remove it Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: temperature should be measure for all _agn devicesWey-Yi Guy2011-04-181-10/+0
| | | | | | | 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>
* iwlagn: always support uCode traceWey-Yi Guy2011-04-181-3/+0
| | | | | | All _agn devices support continuous uCode trace, remove checking Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: use direct call for led functionsWey-Yi Guy2011-04-181-5/+0
| | | | | | After driver split, no need to call led functions through callback Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: clean up & autodetect statisticsJohannes Berg2011-04-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to keep both normal and BT statistics versions around all the time in memory when we only use a subset of both. So keep only the subsets that we need in memory, depending on the debug config). Also, in doing so, we can remove all the calls to iwl_bt_statistics() in the driver as we'll just access the copied statistics now. Finally, also remove this call from the one place where it might still be needed and automatically detect what kind of statistics the device is sending based on their size. This way, we don't need to keep track of which devices do what any more, which is good since this is subject to change based on the ucode version (as some ucode even for non-BT devices will in fact use BT statistics). Warn upon encountering a statistics command from the ucode that isn't known, so we will find such issues earlier in the future. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Tested-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: sensitivity and chain noise done by driverWey-Yi Guy2011-04-081-6/+0
| | | | | | _agn driver should perform both sensitivity and chain noise calib. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: remove un-needed configurationWey-Yi Guy2011-04-081-3/+0
| | | | | | After driver split, set_l0s config is no longer needed, remove it Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: remove un-necessary function pointerWey-Yi Guy2011-04-081-8/+0
| | | | | | | 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>
* iwlwifi: remove extranious macro from firmware defineroot2011-04-081-8/+4
| | | | | | | 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>
* iwlagn: remove ISR opsJohannes Berg2011-04-071-14/+0
| | | | | | | | | | 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>
* iwlagn: remove BSM clock settingJohannes Berg2011-04-071-3/+0
| | | | | | | | | 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>
* iwlagn: change Copyright to 2011Wey-Yi Guy2011-04-071-1/+1
| | | | | Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: remove bootstrap codeJohannes Berg2011-04-071-1/+0
| | | | | | | | | | 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>
* iwlagn: clean up ucode loadingJohannes Berg2011-04-071-6/+0
| | | | | | | | | | 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>
* iwlagn: clean up TX aggregation codeJohannes Berg2011-03-251-4/+0
| | | | | | | | | | 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>
* iwlagn: use 6030 configuration for 6035 seriesWey-Yi Guy2011-03-251-0/+16
| | | | | | | 6035 series of devices should use the same uCode as 6030 series, change it. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: move check health code into iwl-rx.cStanislaw Gruszka2011-02-281-4/+0
| | | | | | | | | | 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>
* Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6John W. Linville2011-02-181-0/+2
|\ | | | | | | | | | | Conflicts: drivers/bluetooth/ath3k.c drivers/bluetooth/btusb.c
| * iwlagn: overwrite EEPROM chain setting for 6250 devicesWey-Yi Guy2011-02-021-0/+2
| | | | | | | | | | | | | | | | | | | | 6250 2x2 devices have 2 tx chain and 2 rx chain. For some reason, the EEPROM contain incorrect information and indicate it only has single tx chain. overwrite it with .cfg parameter to make sure both chain 'A' and chain 'B' can be used for transmit and receive Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwlwifi: always support idle mode for agn devicesWey-Yi Guy2011-01-311-3/+0
| | | | | | | | | | | | | | 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>
* | iwlagn: remove reference to gen2a and gen2bWey-Yi Guy2011-01-211-26/+26
|/ | | | | | | Since 6005, 6030 and 6150 series are offical released, remove the reference to gen2x and use the product number instead. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: fix scan tx antenna setting on 5Ghz bandStanislaw Gruszka2011-01-041-6/+1
| | | | | | | | | | | | | | Looks that we do not set correctly antennas when scanning on 5Ghz band and when bluetooth is enabled, because priv->cfg->scan_tx_antennas[band] is only defined for IEEE80211_BAND_2GHZ. To fix we check band before limiting antennas to first one. This allow to remove hard coded cfg->scan_tx_antennas[band]. 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>
* iwlagn: code clean up to remove duplicate codeWey-Yi Guy2010-12-131-226/+93
| | | | | | | | 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>
* iwlwifi: do not reload fw if WiMAX own the RFWey-Yi Guy2010-12-131-0/+3
| | | | | | | | For WiFi/WiMAX combo devices, if WiMAX own the RF, WiFi driver try to access RF and fail. This is the W/A to To avoid WiFi keep reloading firmware and try to access RF again. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: remove old EEPROM TX power readingJohannes Berg2010-12-131-12/+0
| | | | | | | | | | 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>
* iwlagn: implement layout-agnostic EEPROM readingJohannes Berg2010-12-131-0/+12
| | | | | | | | | | | | | | 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>
* iwlagn: rx antenna diversityWey-Yi Guy2010-12-131-1/+7
| | | | | | | | 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>
* iwlagn: change led compensation for 6005 and 6030 devicesWey-Yi Guy2010-12-131-13/+13
| | | | | | For both 6005 and 6030 devices, change the led compensation to 57 Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: jiffies based tx queues watchdogStanislaw Gruszka2010-12-061-5/+3
| | | | | | | | | | | | | | | 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>
* iwlagn: remove structure name reference to gen2Wey-Yi Guy2010-12-021-10/+10
| | | | | | Give the corresponding name for .cfg data structure Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: Offical name for 100/130 deviceWey-Yi Guy2010-11-241-2/+2
| | | | | | | | | | 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>
* iwlagn: Offical name for 6000g2b deviceWey-Yi Guy2010-11-241-6/+6
| | | | | | | | Change to offical name for 6000g2b devices: "Intel(R) Centrino(R) Wireless-N 1030" "Intel(R) Centrino(R) Advanced-N 6230" Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: Offical name for 6000g2a deviceWey-Yi Guy2010-11-241-3/+3
| | | | | | | Change to offical name for 6000g2a devices: "Intel(R) Centrino(R) Advanced-N 6205" Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: Offical name for 6050g2 deviceWey-Yi Guy2010-11-241-1/+1
| | | | | | | Change to offical name for 6050g2 devices: "Intel(R) Centrino(R) Wireless-N 6150" Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: use antenna information in EEPROMWey-Yi Guy2010-11-241-36/+6
| | | | | | | | | | 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>
* iwlwifi: advance power management supportWey-Yi Guy2010-11-241-0/+8
| | | | | | | | For 6000g2b and up, adding advance power management support for better power consumption Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: consider BT for power managementWey-Yi Guy2010-11-241-0/+1
| | | | | | | Check the BT PSPoll flag when fill PM command to uCode Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: use SKU information in the EEPROMWey-Yi Guy2010-11-161-18/+0
| | | | | | EEPROM contain the SKU information for the device, use it. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: change default led mode for different devicesWey-Yi Guy2010-11-161-0/+18
| | | | | | | | | | | | | | 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>
* iwlagn: support dynamic aggregation for BT coexWey-Yi Guy2010-11-161-0/+1
| | | | | | | Use dynamic aggregation threshold if bt traffic load is high to reduce the impact on aggregated frame. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: enable shadow registerWey-Yi Guy2010-11-151-0/+3
| | | | | | | | For 6000 series devices and up, enable automatic update MAC's register for better power usage in PSP mode Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>