summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi
AgeCommit message (Collapse)Author
2011-03-04iwlwifi: avoid too frequent recover from statisticsStanislaw Gruszka
Usually H/W generate statistics notify once per about 100ms, but sometimes we can receive notify in shorter time, even 2 ms. This can be problem for plcp health and ack health checking. I.e. with 2 plcp errors happens randomly in 2 ms duration, we exceed plcp delta threshold equal to 100 (2*100/2). Also checking ack's in short time, can results not necessary false positive and firmware reset, for example when channel is noised and we do not receive ACKs frames or when remote device does not send ACKs at the moment. Patch change code to do statistic check and possible recovery only if 99ms elapsed from last check. Forced delay should assure we have good statistic data to estimate hardware state. 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>
2011-03-04iwlwifi: cleanup iwl_good_plcp_healthStanislaw Gruszka
Make iwl_good_plcp_health code easiest to read. 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>
2011-03-04iwlwifi: move rx handlers code to iwl-rx.cStanislaw Gruszka
Put generic rx_handlers (except iwlagn_rx_reply_compressed_ba) to iwl-rx.c . Make functions static and change prefix from iwlagn_ to iwl_ . Beautify iwl_setup_rx_handlers and do some other minor coding style changes. 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>
2011-03-03iwlagn: report correct temperature for WiFi/BT devices.Fry, Donald H
The temperature reported by 'cat /sys/class/net/wlan?/device/temperature' is incorrect for devices with BT capability. Report the value from the correct statistics structure. Tested with 130, 100, 6205 and 5300. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-02-28iwlwifi: move remaining iwl-agn-rx.c code into iwl-rx.cStanislaw Gruszka
There is no need to have separate iwl-agn-rx.c file after iwlegacy split. 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>
2011-02-28iwlwifi: move check health code into iwl-rx.cStanislaw Gruszka
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>
2011-02-28iwlwifi: add {ack,plpc}_check module parametersStanislaw Gruszka
Add module ack_check, and plcp_check parameters. Ack_check is disabled by default since is proved that check ack health can cause troubles. Plcp_check is enabled by default. 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>
2011-02-28iwlwifi: fix dma mappings and skbs leakStanislaw Gruszka
Since commit commit 470058e0ad82fcfaaffd57307d8bf8c094e8e9d7 "iwlwifi: avoid Tx queue memory allocation in interface down" we do not unmap dma and free skbs when down device and there is pending transfer. What in consequence may cause that system hung (waiting for free skb's) when performing shutdown at iptables module unload. DMA leak manifest itself following warning: WARNING: at lib/dma-debug.c:689 dma_debug_device_change+0x15a/0x1b0() Hardware name: HP xw8600 Workstation pci 0000:80:00.0: DMA-API: device driver has pending DMA allocations while released from device [count=240] Modules linked in: iwlagn(-) aes_x86_64 aes_generic fuse cpufreq_ondemand acpi_cpufreq freq_table mperf xt_physdev ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6 ext3 jbd dm_mirror dm_region_hash dm_log dm_mod uinput hp_wmi sparse_keymap sg wmi microcode serio_raw tg3 arc4 ecb shpchp mac80211 cfg80211 rfkill ext4 mbcache jbd2 sr_mod cdrom sd_mod crc_t10dif firewire_ohci firewire_core crc_itu_t mptsas mptscsih mptbase scsi_transport_sas pata_acpi ata_generic ata_piix ahci libahci floppy nouveau ttm drm_kms_helper drm i2c_algo_bit i2c_core video [last unloaded: iwlagn] Pid: 9131, comm: rmmod Tainted: G W 2.6.38-rc6-wl+ #33 Call Trace: [<ffffffff810649ef>] ? warn_slowpath_common+0x7f/0xc0 [<ffffffff81064ae6>] ? warn_slowpath_fmt+0x46/0x50 [<ffffffff812320ab>] ? dma_debug_device_change+0xdb/0x1b0 [<ffffffff8123212a>] ? dma_debug_device_change+0x15a/0x1b0 [<ffffffff8149dc18>] ? notifier_call_chain+0x58/0xb0 [<ffffffff8108e370>] ? __blocking_notifier_call_chain+0x60/0x90 [<ffffffff8108e3b6>] ? blocking_notifier_call_chain+0x16/0x20 [<ffffffff812f570c>] ? __device_release_driver+0xbc/0xe0 [<ffffffff812f5808>] ? driver_detach+0xd8/0xe0 [<ffffffff812f45d1>] ? bus_remove_driver+0x91/0x100 [<ffffffff812f6022>] ? driver_unregister+0x62/0xa0 [<ffffffff8123d5d4>] ? pci_unregister_driver+0x44/0xa0 [<ffffffffa05632d1>] ? iwl_exit+0x15/0x1c [iwlagn] [<ffffffff810ab492>] ? sys_delete_module+0x1a2/0x270 [<ffffffff81498da9>] ? trace_hardirqs_on_thunk+0x3a/0x3f [<ffffffff8100bf42>] ? system_call_fastpath+0x16/0x1b I still can observe above warning after apply patch, but it is very hard to reproduce it, and have count=1. Whereas that one is easy to reproduce using debugfs force_reset while transmitting data, and have very big counts eg. 240, like quoted here. So count=1 WARNING seems to be different issue that need to be resolved separately. v1 -> v2: fix infinity loop bug I made during "for" to "while" loop transition. v2 -> v3: remove unneeded EXPORT_SYMBOL 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>
2011-02-26iwlagn: enable BT session 2 type UART for 2000 seriesWey-Yi Guy
For 2000 series device, use session 2 type of BT UART message Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-02-26iwlagn: split BT page and inquiry UART msgWey-Yi Guy
Both inquiry and page was combine in frame7 of UART message, separate it Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-02-26iwlagn: add BT Session Activity 2 UART message (BT -> WiFi)Wey-Yi Guy
additional UART message defines Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-02-26iwlagn: add bt config structure support for 2000 seriesWey-Yi Guy
2000 series has different bt config command structure, add support for it Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-02-26iwlagn: name change for BT config commandWey-Yi Guy
No functional changes, name changes to reflect the structure used by 6000 series. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-02-25iwlagn: fix iwlagn_check_needed_chainsJohannes Berg
This function was intended to calculate the number of RX chains needed, but could only work where the AP's streams were asymmetric, i.e. 2 TX and 3 RX or similar. In the case where IEEE80211_HT_MCS_TX_RX_DIFF was not set, this function would calculate the wrong information. Additionally, mac80211 didn't pass through the required values at all, so it couldn't work anyway. Rewrite the logic in this function and add appropriate comments to make it readable. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-25mac80211: make tx() operation return voidJohannes Berg
The return value of the tx operation is commonly misused by drivers, leading to errors. All drivers will drop frames if they fail to TX the frame, and they must also properly manage the queues (if they didn't, mac80211 would already warn). Removing the ability for drivers to return a BUSY value also allows significant cleanups of the TX TX handling code in mac80211. Note that this also fixes a bug in ath9k_htc, the old "return -1" there was wrong. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Tested-by: Sedat Dilek <sedat.dilek@googlemail.com> [ath5k] Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> [rt2x00] Acked-by: Larry Finger <Larry.Finger@lwfinger.net> [b43, rtl8187, rtlwifi] Acked-by: Luciano Coelho <coelho@ti.com> [wl12xx] Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-23mac80211: rename RX_FLAG_TSFTJohannes Berg
The flag isn't very descriptive -- the intention is that the driver provides a TSF timestamp at the beginning of the MPDU -- make that clearer by renaming the flag to RX_FLAG_MACTIME_MPDU. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-21iwlwifi: split the drivers for agn and legacy devices 3945/4965Wey-Yi Guy
Intel WiFi devices 3945 and 4965 now have their own driver in the folder drivers/net/wireless/iwlegacy Add support to build these drivers independently of the driver for AGN devices. Selecting the 3945 builds iwl3945.ko and iwl_legacy.ko, and selecting the 4965 builds iwl4965.ko and iwl_legacy.ko. iwl-legacy.ko contains code shared between both devices. The 3945 is an ABG/BG device, with no support for 802.11n. The 4965 is a 2x3 ABGN device. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Acked-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-02-21Revert "iwlwifi: split the drivers for agn and legacy devices 3945/4965"Wey-Yi Guy
This reverts commit aa833c4b1a928b8d3c4fcc2faaa0d6b81ea02b56.
2011-02-21iwlwifi: split the drivers for agn and legacy devices 3945/4965Wey-Yi Guy
Intel WiFi devices 3945 and 4965 now have their own driver in the folder drivers/net/wireless/iwlegacy Add support to build these drivers independently of the driver for AGN devices. Selecting the 3945 builds iwl3945.ko and iwl_legacy.ko, and selecting the 4965 builds iwl4965.ko and iwl_legacy.ko. iwl-legacy.ko contains code shared between both devices. The 3945 is an ABG/BG device, with no support for 802.11n. The 4965 is a 2x3 ABGN device. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Acked-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-02-21iwlwifi: enable 2-wire bt coex support for non-combo deviceWey-Yi Guy
For non-combo devices, 2-wire BT coex is needed to make sure BT coex still function with external BT devices Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-02-21iwlwifi: Loading correct uCode again when fail to loadWey-Yi Guy
During uCode loading, if the reply_alive come back with "failure", try to load the same uCode again. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-02-21iwlwifi: Limit number of firmware reloadWey-Yi Guy
If device has serious problem and cause firmware can not recover itself. Keep reloading firmware will not help, it can only fill up the syslog and lock up the system because busy reloading. Introduce the limit reload counter, if the reload reach the maximum within the pre-defined duration;stop the reload operation. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-02-18Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6John W. Linville
Conflicts: drivers/bluetooth/ath3k.c drivers/bluetooth/btusb.c
2011-02-11iwlagn: handle bt defer work in 2000 seriesWey-Yi Guy
For 2000 series, need to handle bt traffic changes when receive notification from uCode Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-02-11iwlagn: donot process bt update when bt coex disableWey-Yi Guy
If bt coex is disabled, do not process any bt related information from uCode even received. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-02-09iwlwifi: fix ack health for WiFi/BT combo devicesStanislaw Gruszka
Combo devices have TX statistics on different place, because struct statistics_rx_bt and struct statistics_rx have different size. User proper values on combo devices instead of random data. 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>
2011-02-09iwlwifi: cleanup iwl_good_ack_healthStanislaw Gruszka
Make ack health code easies to read. Compared to previous code, we do not print debug messages when expected_ack_cnt_delta == 0 and also do check against negative deltas. 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>
2011-02-09iwlwifi: cleanup iwl_recover_from_statisticsStanislaw Gruszka
No functional change, make recover from statistics code easies to read. 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>
2011-02-09iwl3945: remove plcp checkStanislaw Gruszka
Patch fixes: https://bugzilla.redhat.com/show_bug.cgi?id=654599 Many users report very low speed problem on 3945 devices, this patch fixes problem, but only for some of them. For unknown reason, sometimes after hw scanning, device is not able to receive frames at high rate. Since plcp health check may request hw scan to "reset radio", performance problem start to be observable after update kernel to .35, where plcp check was introduced. Bug reporter confirmed that removing plcp check fixed problem for him. Reported-and-tested-by: SilvioTO <silviotoya@yahoo.it> Cc: stable@kernel.org # 2.6.35+ 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>
2011-02-07iwlagn: Re-enable RF_KILL interrupt when downDon Fry
With commit 554d1d027b19265c4aa3f718b3126d2b86e09a08 only one RF_KILL interrupt will be seen by the driver when the interface is down. Re-enable the interrupt when it occurs to see all transitions. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-06iwlwifi: fix compiling error with different configurationWey-Yi Guy
When .config has different configuration, it might fail to compile iwlwifi. fix it Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-02-06iwlwifi: remove unnecessary lockingJohannes Berg
This code, and the places that set the variable is_internal_short_scan and the vif pointers are all protected by the mutex, there's no point in locking the spinlock here as well (any more). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-02-02iwlagn: overwrite EEPROM chain setting for 6250 devicesWey-Yi Guy
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>
2011-01-31iiwlagn: remove unused parameterWey-Yi Guy
sco_cmd is not being used, remove it Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-01-31iwlagn: remove unsupported BT SCO commandWey-Yi Guy
During the period of BT coex changes, REPLY_BT_COEX_SCO host command is no longer needed to support SCO/eSCO type of traffic. delete it. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-01-31iwlagn: use 2030 macro for 2030 devicesWey-Yi Guy
For 2030 series of devices, 2030 macro need to be used. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-01-31iwlwifi: fix beacon notification parsingJohannes Berg
The beacon notification changed between 4965 and agn because the embedded TX response changed, but iwlwifi was never updated to know about this. Update it now so the IBSS manager status will be tracked correctly. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-01-31iwlwifi: use maximum aggregation sizeJohannes Berg
Use the values from the peer to set up the ucode for the right maximum number of subframes in an aggregate. Since the ucode only tracks this per station, use the minimum across all aggregation sessions with this peer. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-01-31iwlwifi: advertise max aggregate sizeJohannes Berg
Allow peers to size their reorder buffer more accurately by advertising that we'll never send aggregates longer than the default (31). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-01-31iwlwifi: support RSN IBSSJohannes Berg
In order to support RSN IBSS, we need to (ok actually maybe it's just easiest to) disable group key programming so that any group-addressed frames will be decrypted in software which handles the per-station keys for this easily. We could keep the encryption in the device, but that takes more work and seems unnecessary. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-01-31iwlwifi: always support idle mode for agn devicesWey-Yi Guy
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>
2011-01-31iwlagn: add IQ inversion support for 2000 series devicesWey-Yi Guy
The I/Q swapping is extremely important and should be dealt with extra care. It will affects OFDM and CCK differently. For 6000/6005/6030 series devices, the I/Q were swapped, and for 2000 series devices, it is in non-swapped status (but its swapped with respected to 6000/6005/6030). so the CSR_GP_DRIVER_REG_BIT_RADIO_IQ_INVER register need to be set to support the correct behavior. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-01-31iwlagn: adjust rate tableWey-Yi Guy
Minor adjustment for rate scale table Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-01-31iwlwifi: check ucode loading error and restartWey-Yi Guy
Driver check alive message from ucode, if it is not ok, then need to restart the loading process. instead of checking multiple places for failure, only need to check in once place when receive alive message from uCode. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-01-31iwlwifi: correct frequency settingsStanislaw Gruszka
After commit 59eb21a6504731fc16db4cf9463065dd61093e08 "cfg80211: Extend channel to frequency mapping for 802.11j" we use uninitialized sband->band when assign channel frequencies, what results that 5GHz channels have erroneous (zero) center_freq value. Patch fixes problem and simplifies code a bit. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-31iwl3945: do not use agn specific IWL_RATE_COUNTStanislaw Gruszka
Only use IWL_RATE_COUNT_3945 in 3945 code. 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>
2011-01-28Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 Conflicts: drivers/net/wireless/ath/ath9k/init.c
2011-01-28iwlwifi: introduce iwl_bt_statisticsStanislaw Gruszka
We use priv->cfg->bt_params && priv->cfg->bt_params->bt_statistics conditional in few places, merge it into one function. 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>
2011-01-28iwlwifi: remove unneeded disable_hw_scan checkStanislaw Gruszka
We never set STATUS_SCANNING in softwre scanning mode, disable_hw_scan check is unneeded. Correct debug message while at it. 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>
2011-01-28iwlwifi: introduce iwl_advanced_bt_coexist()Stanislaw Gruszka
We use priv->cfg->bt_params && priv->cfg->bt_params->advanced_bt_coexist conditional in few places, merge it into one function. 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>