summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-09-19cfg80211/nl80211: Add PMKSA caching candidate eventJouni Malinen
When the driver (or most likely firmware) decides which AP to use for roaming based on internal scan result processing, user space needs to be notified of PMKSA caching candidates to allow RSN pre-authentication to be used. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19b43: LCN-PHY: finish sense setupRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19rfkill: properly assign a boolean typeMohammed Shafi Shajakhan
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19cfg80211: validate IBSS BSSIDJohannes Berg
The IBSS BSSID is never validated, so an invalid one might end up being used. Fix this by rejecting invalid configuration. Reported-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19b43: LCN-PHY: add more init tweaksRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19b43: LCN-PHY: init TX power controlRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19b43: LCN-PHY: implement SPUR avoidance modeRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19b43: LCN-PHY: set TX filtersRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19b43: LCN-PHY: tweaks for channel switchingRafał Miłecki
They have been taken from brcmsmac, add Broadcom's copyright. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19bcma: cc: export more control functionsRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19mac80211: Fix regression on queue stop during 2040 bss changeRajkumar Manoharan
The commit "mac80211: stop tx before doing hw config and rate update" stops the tx queue and call drv_flush so frequently whenever a beacon got received with 11n htcap. This leads to massive "Failed to stop TX DMA" logspam on embedded hw. So the queue stop and flush should be called if and only if there is a change in the channel type. Reported-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19iwlagn: signedness bugWey-Yi Guy
re-apply the unsigned shorts bug fixed by Dan Carpenter but get lost after the file move. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19iwlagn: fix stack corruption for temperature offset v2Wey-Yi Guy
Same stack corruption problem as temperature offset Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19iwlagn: do not use interruptible waitsJohannes Berg
Since the dawn of its time, iwlwifi has used interruptible waits to wait for synchronous commands and firmware loading. This leads to "interesting" bugs, because it can't actually handle the interruptions; for example when a command sending is interrupted it will assume the command completed fully, and then leave it pending, which leads to all kinds of trouble when the command finishes later. Since there's no easy way to gracefully deal with interruptions, fix the driver to not use interruptible waits. This at least fixes the error iwlagn 0000:02:00.0: Error: Response NULL in 'REPLY_SCAN_ABORT_CMD' I have seen in P2P testing, but it is likely that there are other errors caused by this. Cc: Stanislaw Gruszka <sgruszka@redhat.com> Cc: stable@kernel.org [2.6.24+] 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>
2011-09-19iwlagn: use iwl_eeprom_calib_hdr structureWey-Yi Guy
For retrieve calibration hdr related information, instead of using structure in one place and #define in other place, unify the method to use data structure. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19iwlagn: add support for v2 of temperature offset calibrationWey-Yi Guy
For 2000 series of NICs, version 2 of temperature offset calibration should be used. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19iwlagn: remove drvdata support from bus layerJohannes Berg
Since the removal of the sysfs files, it is no longer necessary to have upper layers control the drvdata, so let the PCI driver have it for itself completely. 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>
2011-09-19iwlagn: move sysfs files to debugfsJohannes Berg
The debug_level and temperature files should be in debugfs, the txpower file is completely unneeded since TX power can be set with iw/iwconfig. 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>
2011-09-19iwlagn: remove unused function declarationsJohannes Berg
iwl_suspend and iwl_resume don't exist. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19iwlagn: rename iwl-pci.h to iwl-cfg.hJohannes Berg
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>
2011-09-19iwlagn: clean up PM codeJohannes Berg
The transport callbacks might as well be undefined when CONFIG_PM_SLEEP is not set, so ifdef all of it out and make everything available for PM_SLEEP only. 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>
2011-09-19iwlagn: Makefile whitespace cleanupJohannes Berg
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>
2011-09-19iwlagn: generically provide iwl_trans_send_cmd_pduJohannes Berg
There's no need to have the transport layer have a callback for iwl_trans_send_cmd_pdu() since it is just a generic wrapper around iwl_trans_send_cmd(). 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>
2011-09-19iwlagn: move PCI-E transport filesJohannes Berg
Move all the PCI-E specific transport files to be iwl-trans-pcie*; specifically iwl-trans.c which is really iwl-trans-pcie.c. 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>
2011-09-19iwlagn: merge eeprom access into single fileWey-Yi Guy
After driver split and no need to support legacy devices, there is no reason we need to separate the NVM access into different files, merge those. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19iwlagn: provide data after WARN_ONEmmanuel Grumbach
From time to time, we hit a WARN_ON in iwl_mac_remove_interface. This basically means that we got out of sync with mac80211: the vif we hold differs from the vif 80211 passes as parameter. Try to get some data that will help to debug this. 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>
2011-09-19iwlagn: replace beacon_time_fsf_bits variable with #defineDon Fry
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>
2011-09-19iwlagn: simplify chain_noise_num_beacons indirectionFry, Donald H
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>
2011-09-19iwlagn: fix modinfo display for 135 ucode.Fry, Donald H
The modinfo report for 135 ucode is iwlwifi-135-IWL135_UCODE_API_MAX.ucode Change to show the value of the define: iwlwifi-135-6.ucode 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>
2011-09-19iwlagn: New SKU for 6005 SFFWey-Yi Guy
Adding another SKU for 6005 series devices. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19iwlagn: Convert kzalloc to kcallocJoe Perches
Convert kzalloc to kcalloc, coalesce multiple lines too. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19iwlagn: add documentation to the transport layerEmmanuel Grumbach
and do a few clean up fixes on the way Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19iwlagn: document the bus layer APIEmmanuel Grumbach
Add documentation to the bus layer API - iwl-bus.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>
2011-09-19iwlagn: use enum iwl_rxon_context_id instead of u8Emmanuel Grumbach
enum iwl_rxon_context_id is the right type to use when we need a rxon_context_id. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19iwlagn: move iwl_stop / wake_queue to the upper layerEmmanuel Grumbach
Add a wrapper in the upper layer to call the mac80211's function. This allows not to have the transport layer call mac80211 directly. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19iwlagn: free the Tx cmd when a non empty Tx queue is freedEmmanuel Grumbach
When a non-empty Tx queueis freed, the buffer it contains must be freed too. Since the Tx cmd are now allocated from a pool, the Tx cmd must be freed too. This patch avoids to destroy a non-empty pool of Tx cmd. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19iwlagn: unmap cmd queue's tfds as BIDIEmmanuel Grumbach
If the driver is unloaded while there is still a host command in flight, its tfd will be freed by iwl_tx_queue_free. This function is called for both types of queues: Tx queues and cmd queue. This didn't take in count the fact that in Tx queues, tfds are mapped as TO_DEVICE (besides the first TB), whereas in cmd queue, all TBs are mapped as BIDI. Hence, tx_queue_free unmapped the second (and higher) TB of each tfd in the cmd queue as TO_DEVICE, whereas they must be freed as BIDI. This means that if a multi TFD is in flight while we unload the driver (which is quite unlikely but can happen), we will get the warning below. This patch fixes this. [ 445.234060] ------------[ cut here ]------------ [ 445.236273] WARNING: at lib/dma-debug.c:861 check_unmap+0x337/0x780() [ 445.236654] iwlagn 0000:02:00.0: DMA-API: device driver frees DMA memory with different direction [device address=0x0000000126950540] [size=8 bytes] [mapped with DMA_BIDIRECTIONAL] [unmapped with DMA_TO_DEVICE] [ 445.236654] Modules linked in: ... [ 445.236654] Pid: 1415, comm: modprobe Not tainted 3.1.0-rc4-wl-65912-g5215ff1-dirty #79 [ 445.236654] Call Trace: [ 445.236654] [<ffffffff81043a51>] warn_slowpath_common+0x71/0xa0 [ 445.236654] [<ffffffff81043b37>] warn_slowpath_fmt+0x47/0x50 [ 445.236654] [<ffffffff8121e687>] check_unmap+0x337/0x780 [ 445.236654] [<ffffffff810e9136>] ? free_one_page+0x156/0x320 [ 445.236654] [<ffffffff8121ec5a>] debug_dma_unmap_page+0x5a/0x60 [ 445.236654] [<ffffffffa021d701>] iwlagn_unmap_tfd.isra.11+0x121/0x1c0 [iwlagn] [ 445.236654] [<ffffffffa021ddf2>] iwlagn_txq_free_tfd+0x42/0x70 [iwlagn] [ 445.236654] [<ffffffffa02121de>] iwl_tx_queue_unmap+0x4e/0x70 [iwlagn] [ 445.236654] [<ffffffffa0212fad>] iwl_trans_pcie_tx_free+0x10d/0x440 [iwlagn] [ 445.236654] [<ffffffff81064959>] ? destroy_workqueue+0xb9/0x1e0 [ 445.236654] [<ffffffffa021330a>] iwl_trans_pcie_free+0x2a/0x2c0 [iwlagn] [ 445.236654] [<ffffffffa022f4f2>] iwl_remove+0x149/0x17e [iwlagn] [ 445.236654] [<ffffffffa022f546>] iwl_pci_remove+0x1f/0x65 [iwlagn] [ 445.236654] [<ffffffff81228337>] pci_device_remove+0x47/0x120 [ 445.236654] [<ffffffff8134566c>] __device_release_driver+0x7c/0xe0 [ 445.236654] [<ffffffff81345dc8>] driver_detach+0xc8/0xd0 [ 445.236654] [<ffffffff813454c8>] bus_remove_driver+0x88/0xe0 [ 445.236654] [<ffffffff81346572>] driver_unregister+0x62/0xa0 [ 445.236654] [<ffffffff812271d4>] pci_unregister_driver+0x44/0xc0 [ 445.236654] [<ffffffffa0211ce5>] iwl_pci_unregister_driver+0x15/0x20 [iwlagn] [ 445.236654] [<ffffffffa022f595>] iwl_exit+0x9/0xa74 [iwlagn] [ 445.236654] [<ffffffff810918f4>] sys_delete_module+0x184/0x240 [ 445.236654] [<ffffffff81452ece>] ? retint_swapgs+0xe/0x13 [ 445.236654] [<ffffffff8121098e>] ? trace_hardirqs_on_thunk+0x3a/0x3f [ 445.236654] [<ffffffff81459e2b>] system_call_fastpath+0x16/0x1b [ 445.236654] ---[ end trace 1fbc362b7dbe5d74 ]--- [ 445.236654] Mapped at: [ 445.236654] [<ffffffff8121d7cb>] debug_dma_map_page+0x8b/0x150 [ 445.236654] [<ffffffffa021e7b7>] iwl_enqueue_hcmd+0x837/0xa40 [iwlagn] [ 445.236654] [<ffffffffa021f92d>] iwl_trans_pcie_send_cmd+0x8d/0x580 [iwlagn] [ 445.236654] [<ffffffffa01f7c75>] iwl_send_calib_results+0x75/0xd0 [iwlagn] [ 445.236654] [<ffffffffa01f21f6>] iwlagn_alive_notify+0x196/0x1f0 [iwlagn] [ 445.386500] iwlagn 0000:02:00.0: PCI INT A disabled Reported-by: Johannes Berg <johannes.berg@intel.com> 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>
2011-09-19iwlagn: warn about buggy fw that doesn't set SEQ_RX_FRAMEEmmanuel Grumbach
The way we check if there is host command that should be reclaimed is way too complicated. We should have a clear indication from the fw. The fw is expected to set the SEQ_RX_FRAME bit if the frame was originated by the fw which indicates to the driver that there is no host command to free. Somehow, there seem to have been buggy fw out there, hence the very old comment. This code checks if we have still buggy fw out there. 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>
2011-09-19ath9k: Reset caldata on radio enableRajkumar Manoharan
Not doing so, the caldata continues to retain older history values learned on that channel. It is always safer to start noise floor calibration from the defaults after the assoication. So this patch resets the nf history buffer when none of the STA vifs are associated. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19ath9k: load noise floor from history after the full chip resetRajkumar Manoharan
Currently during the full reset, the nf calibration is always restarted from the defaults. The noise floor history buffers are never be used again after the scan and ath reset. This patch ensures that nf histories are always be used that helps to improve the signal quality on congested environment Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19ath9k_hw: Fix magnitude/phase coeff correctionRajkumar Manoharan
Do the magnitude/phase coeff correction only if the outlier is detected. Updating wrong magnitude/phase coeff factor impacts not only tx gain setting but also leads to poor performance in congested networks. In the clear environment the impact is very minimal because the outlier happens very rarely according to the past experiment. It occured less than once every 1000 calibrations. Cc: stable@kernel.org Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19ath9k_hw: remove ar9100_hw_compute_pll_controlFelix Fietkau
AR913x uses the same PLL register layout as AR9160 and later. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19ath9k_hw: fix setting the hardware diversity flagFelix Fietkau
ath9k_hw_set_diversity is only called from init.c where it cannot affect the hardware setting because it's cleared on the next reset. Instead of using a PHY op for something that's supposed to be initialized statically, set the register value directly in the INI override function. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19ath9k_hw: remove dead code in the eeprom opsFelix Fietkau
The eeprom .set_addac function is only necessary for AR9160, remove it from eeprom_4k.c and remove the dummy function from eeprom_9287.c Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19ath9k_hw: clean up hardware revision checksFelix Fietkau
- AR_SREV_5416_20_OR_LATER is always true, remove it - AR_SREV_9280_20_OR_LATER is always true within eeprom_4k.c and eeprom_9287.c - (AR_SREV_9271 || AR_SREV_9285) is always true in eeprom_4k.c Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19ath9k: sync the dma buffer after changing the retry flagFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19cfg80211: add cfg80211_find_vendor_ie() functionEliad Peller
Add function to find vendor-specific ie (along with vendor-specific ie struct definition and P2P OUI values) Signed-off-by: Eliad Peller <eliad@wizery.com> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19ath9k: fix setting the IEEE80211_TX_CTL_CLEAR_PS_FILT flagFelix Fietkau
When the driver inserts padding between the 802.11 header and data, it needs to set the hdr variable to the new header location. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19Revert "ath9k: do not insert padding into tx buffers on AR9380+"John W. Linville
This reverts commit 4245d31347bdc99a608dc1d1cfe64e44aa3d1771.
2011-09-19Merge branch 'for-linville' of git://github.com/lucacoelho/wl12xxJohn W. Linville