summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
Commit message (Collapse)AuthorAgeFilesLines
* ath9k: skip ->config_pci_powersave() if PCIe port has ASPM disabledStanislaw Gruszka2011-08-015-13/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We receive many bug reports about system hang during suspend/resume when ath9k driver is in use. Adrian Chadd remarked that this problem happens on systems that have ASPM disabled. To do not hit the bug, skip doing ->config_pci_powersave magic if PCIe downstream port device, which ath9k device is connected to, has ASPM disabled. Bug was introduced by: commit 53bc7aa08b48e5cd745f986731cc7dc24eef2a9f Author: Vivek Natarajan <vnatarajan@atheros.com> Date: Mon Apr 5 14:48:04 2010 +0530 ath9k: Add support for newer AR9285 chipsets. Patch should address: https://bugzilla.kernel.org/show_bug.cgi?id=37462 https://bugzilla.kernel.org/show_bug.cgi?id=37082 https://bugzilla.redhat.com/show_bug.cgi?id=697157 however I did not receive confirmation about that, except from Camilo Mesias, whose system stops hang regularly with this patch (but still hangs from time to time, but this is probably some other bug). Tested-by: Camilo Mesias <camilo@mesias.co.uk> Cc: stable@kernel.org # 2.6.35+ Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: initialize tx chainmask before testing channel tx power valuesFelix Fietkau2011-08-011-0/+2
| | | | | | | | | With an uninitialized chainmask, the per-channel power will only contain the power limits for a single chain instead of the combined tx power. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: use get_unaligned_le32() in ath5k_write_pwr_to_pdadc_table()Pavel Roskin2011-07-221-6/+3
| | | | | Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: remove ath5k_hw_get_capability(), don't use VEOL on AR5210Pavel Roskin2011-07-223-81/+5
| | | | | | | | | | | | There are only two capabilities we need, and both are trivial to find. ath5k_hw_hasbssidmask() is true on AR5212, but not on AR5210 or AR5211. ath5k_hw_hasveol() is true on AR5211 and AR5212, but not on AR5210, according to the HAL source. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: merge ath5k_{init, deinit}_hw() with their thin wrappersPavel Roskin2011-07-223-22/+6
| | | | | Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: validate and fix broken eeprom chainmask settingsFelix Fietkau2011-07-211-0/+22
| | | | | | | | | | Some devices (e.g. Ubiquiti AirRouter) ship with broken EEPROM chainmask data, which breaks the initial calibration after a hardware reset. To fix this, mask the eeprom chainmask with the chainmask of the chip, and use the chip chainmask if the result is zero. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: ath9k: use %pM to print MACAndy Shevchenko2011-07-201-5/+2
| | | | | | | Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: "Luis R. Rodriguez" <lrodriguez@atheros.com> Cc: ath9k-devel@lists.ath9k.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: fix sparse warnings enabled by CONFIG_SPARSE_RCU_POINTERPavel Roskin2011-07-201-4/+4
| | | | | | Signed-off-by: Pavel Roskin <proski@gnu.org> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: merge ath5k_hw and ath5k_softcPavel Roskin2011-07-2022-1314/+1247
| | | | | | | | | | | | | | | | | | | Both ath5k_hw and ath5k_softc represent one instance of the hardware. This duplication is historical and is not needed anymore. Keep the name "ath5k_hw" for the merged structure and "ah" for the variable pointing to it. "ath5k_hw" is shorter than "ath5k_softc", more descriptive and more widely used. Put the combined structure to ath5k.h where the old ath5k_softc used to be. Move some code from base.h to ath5k.h as needed. Remove memory allocation for struct ath5k_hw and the corresponding error handling. Merge iobase and ah_iobase fields. Signed-off-by: Pavel Roskin <proski@gnu.org> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix some smatch warningsRajkumar Manoharan2011-07-182-4/+8
| | | | | | | | | | | drivers/net/wireless/ath/ath9k/hif_usb.c +135 hif_usb_mgmt_cb(6) warn: variable dereferenced before check 'cmd' drivers/net/wireless/ath/ath9k/btcoex.c +77 ath9k_hw_init_btcoex_hw(38) error: buffer overflow 'ah->hw_gen_timers.gen_timer_index' 32 <= 2009813776 Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix sparse warningsRajkumar Manoharan2011-07-183-9/+22
| | | | | | | | | | | | | | drivers/net/wireless/ath/ath9k/init.c:199:21: warning: context imbalance in 'ath9k_reg_rmw' - different lock contexts for basic block drivers/net/wireless/ath/ath9k/xmit.c:1175:31: warning: context imbalance in 'ath_drain_txq_list' - unexpected unlock drivers/net/wireless/ath/ath9k/xmit.c:2047:23: warning: context imbalance in 'ath_tx_process_buffer' - unexpected unlock drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3041:24: warning: cast to restricted __le32 Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: set beacon xmit power to the maxChristian Lamparter2011-07-181-83/+108
| | | | | | | | | | | | | | | | | Harshal Chhaya discovered during network tests, that several of his clients dropped-off the network. The captured packets shows that the beacons sent by the AP are at a much lower power than the other data packets. The reason for this mishap: The driver never updated the beacon phy register, so all beacons were always sent at the lowest power. Reference: http://marc.info/?l=linux-wireless&m=131067225105801 Reported-by: Harshal Chhaya <harshal@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: move beacon_update into tx.cChristian Lamparter2011-07-183-130/+130
| | | | | Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170 firmware: update firmware headersChristian Lamparter2011-07-182-2/+42
| | | | | | | | | * reserves feature bit for CCA counters * extends hardware register file definitions Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: use ath_opmode_to_string()Pavel Roskin2011-07-181-20/+2
| | | | | Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: remove defines in reg.h that exist in ../reg.hPavel Roskin2011-07-181-23/+0
| | | | | Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: use get_unaligned_{b16, le16, le32} where possiblePavel Roskin2011-07-185-28/+23
| | | | | Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath: use get_unaligned_le{16,32} in ath_hw_keysetmac()Pavel Roskin2011-07-181-5/+2
| | | | | Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: fix formatting issues found by checkpatchPavel Roskin2011-07-155-8/+8
| | | | | | Signed-off-by: Pavel Roskin <proski@gnu.org> Acked-By: christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: improve reliability of MIC error detectionFelix Fietkau2011-07-151-21/+32
| | | | | | | | | | | | | | For unicast the hardware sometimes reports MIC errors even though the frame that it received actually contains a valid MIC - on some chips this can happen frequently enough to trigger TKIP countermeasures. Fix this issue by not reporting MIC errors for unicast frames with a valid key, letting mac80211 validate the MIC instead. Additionally, strip the MIC for all frames that the hardware considers valid to avoid wasting CPU cycles re-validating it. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: do not call ieee80211_stop_queue for queues not managed by mac80211Felix Fietkau2011-07-131-1/+6
| | | | | | | | Instead of using ieee80211_stop_queue, check the configured tx queue limit before calling ieee80211_get_buffered_bc. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: disable 32KHz sleep clock operation by defaultFelix Fietkau2011-07-133-3/+13
| | | | | | | | | | | | | | While 32 KHz sleep clock might provide some power saving benefits, it is also a major source of stability issues, on OpenWrt it produced some reproducible data bus errors on register accesses on several different MIPS platforms. All the Atheros drivers that I can find do not enable this feature, so it makes sense to leave it disabled in ath5k as well. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: fix reference clock usec duration setting restoreFelix Fietkau2011-07-131-1/+11
| | | | | | | | | enabling the sleep clock alters the AR5K_USEC_32 field, but disabling it didn't restore it. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: delay full calibration after resetFelix Fietkau2011-07-131-1/+1
| | | | | | | | | | | During scans the full calibration usually does not make much sense, PAPD probing and IQ calibration should be deferred until there is enough time to complete them. Adding 100 ms to the initial full calibration delay should be enough to do this. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: initialize common->clockrateFelix Fietkau2011-07-131-0/+1
| | | | | | | | | Fixes a division by zero when setting distance before activating the device for the first time. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: fix reference clock frequency for spur mitigation on AR2413Felix Fietkau2011-07-131-0/+1
| | | | | | | AR2413 uses the same reference clock as AR5413 Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: apply the synth voltage tweak only on AR5112 rev 2Felix Fietkau2011-07-131-8/+11
| | | | | | | | Might fix some stability issues on newer chips Signed-off-by: Felix Fietkau <nbd@openwrt.org> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: add missing checks for rfgain probeFelix Fietkau2011-07-131-4/+6
| | | | | | | rfgain probe is only necessary for OFDM operation on AR5111 and AR5112. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Fix incorrect key_miss handlingSenthil Balasubramanian2011-07-132-4/+2
| | | | | | | | | | | | | | | | | | | Decryping frames on key_miss handling shouldn't be done for Michael MIC failed frames as h/w would have already decrypted such frames successfully anyway. Also leaving CRC and PHY error(where the frame is going to be dropped anyway), we are left to prcoess Decrypt error for which s/w decrypt is selected anway and so having key_miss as a separate check doesn't serve anything. So making key_miss handling mutually exlusive with other RX status handling makes much more sense. This patch addresses an issue with STA not reporting MIC failure events resulting in STA being disconnected immediately. Cc: stable@kernel.org Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: remove an unnecessary function declarationMohammed Shafi Shajakhan2011-07-111-26/+24
| | | | | Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: Add missing breaks in switch/caseJoe Perches2011-07-111-0/+3
| | | | | | Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: fix typos, bad comment formatting and GHz in place of MHzPavel Roskin2011-07-1118-94/+94
| | | | | Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: validate mode in ath5k_ani_init() before trying to set itPavel Roskin2011-07-111-0/+5
| | | | | Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: add a missing delay for an analog registerFelix Fietkau2011-07-111-2/+3
| | | | | | | | AR_AN_SYNTH9 is in the analog shift register range and thus needs to be written using the ath9k_hw_analog_shift_rmw function. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: fix synth delay for half/quarter channelsFelix Fietkau2011-07-111-0/+5
| | | | | | | | The radio needs twice / four times as much time to stabilize for half/quarter channels. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: set 5 GHz half/quarter channels on AR9002 using fractional modeFelix Fietkau2011-07-111-1/+3
| | | | | | | The radio seems to perform better that way Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: remove ar9287 v1.3+ specific hardcoded register hacksFelix Fietkau2011-07-114-49/+7
| | | | | | | | | Now that the clock rate is initialized properly and SIFS, EIFS, USEC, slot time and ACK timeout are properly calculated by the generic code, the 'async FIFO' register hacks are no longer necessary. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: initialize more timing related registers for half/quarter channelsFelix Fietkau2011-07-111-8/+59
| | | | | | | | | | Initialize the the clock-to-TSF field of AR_USEC and the SIFS and EIFS time registers based on the clock rate instead of relying on initvals. With those changes, some of the hardcoded AR9287 1.3+ specific overrides can be dropped. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: fix MAC clock rate for AR9287 v1.3+Felix Fietkau2011-07-111-1/+4
| | | | | | | This chip uses the async FIFO feature and runs the MAC at 117 MHz Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: fix MAC clock for half/quarter rateFelix Fietkau2011-07-111-0/+7
| | | | | | | Enabling half/quarter rate makes the MAC run at half/quarter clock speed. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: always enable 5 GHz fast clock for AR9280Felix Fietkau2011-07-111-4/+1
| | | | | | | | All devices support this, but some disable it using an EEPROM flag for some reason. Improves 5 GHz performance on those devices. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: remove hardcoded PLL overrides for AR9280Felix Fietkau2011-07-111-12/+13
| | | | | | | | Use the proper masks for the register instead. Fixes adding the (still unused) half/quarter PLL flags. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵John W. Linville2011-07-116-11/+24
|\ | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 Conflicts: drivers/net/wireless/ath/ath5k/sysfs.c net/bluetooth/l2cap_core.c net/mac80211/wpa.c
| * ath9k: Fix tx throughput drops for AR9003 chips with AES encryptionRajkumar Manoharan2011-07-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | While sending aggregated frames in AES, the AR5416 chips required additional padding b/w subframes. This workaround is not needed for edma (AR9003 family) chips. With this patch ~4Mbps thoughput improvement was observed in clear environment. Cc: stable@kernel.org Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * carl9170: add NEC WL300NU-AG usbidChristian Lamparter2011-07-051-0/+2
| | | | | | | | | | | | | | Cc: stable@kernel.org Reported-by: Mark Davis Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath5k: fix incorrect use of drvdata in PCI suspend/resume codePavel Roskin2011-07-051-2/+5
| | | | | | | | | | | | Signed-off-by: Pavel Roskin <proski@gnu.org> Cc: <stable@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath5k: fix incorrect use of drvdata in sysfs codePavel Roskin2011-07-051-3/+6
| | | | | | | | | | | | Signed-off-by: Pavel Roskin <proski@gnu.org> Cc: <stable@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath5k: fix memory leak when fewer than N_PD_CURVES are in useEugene A. Shatokhin2011-06-291-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | We would free the proper number of curves, but in the wrong slots, due to a missing level of indirection through the pdgain_idx table. It's simpler just to try to free all four slots, so do that. Cc: stable@kernel.org Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: Fix suspend/resume when no interface is UPRajkumar Manoharan2011-06-291-0/+6
| | | | | | | | | | | | | | | | | | | | When no interface has been brought up, the chip's power state continued as AWAKE. So during resume, the chip never been powered up. Cc: stable@kernel.org Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Inform stack about tx ack statusRajkumar Manoharan2011-07-081-0/+1
| | | | | | | | | | | | | | | | Recent firmware changes report tx ack status properly to driver. Hence updating ath9k_htc driver capabilities. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud