commit edbf51f65eefb952a03c00eadefa9aa48580fcc6 Author: Sujith Date: Thu Sep 17 09:28:41 2009 +0530 ath9k: Fix regression in PA calibration The commit "ath9k: Fix bugs in programming registers during PA CAL" removed a REG_READ of 0x7834. This resulted in incorrect computation of the subsequent value to be written in RF2G6. This patch fixes the regression by re-adding the REG_READ. Signed-off-by: Sujith Signed-off-by: John W. Linville commit ce143bb04491a586ec95798711dee7fd43fbe042 Author: Senthil Balasubramanian Date: Thu Sep 17 09:27:33 2009 +0530 ath9k: Adjust the chainmasks properly This is needed to account for the number of chains in use, not just the number of chains present. Signed-off-by: Senthil Balasubramanian Signed-off-by: John W. Linville commit 0a475cc6a0ac8e38ac3587cff87026551800b7fe Author: Vasanthakumar Thiagarajan Date: Thu Sep 17 09:27:10 2009 +0530 ath9k: Do a full reset for AR9280 AR9280 requires a full reset during channel change and HW reset. Currently, a fast channel change is done. This patch fixes this bug. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: John W. Linville commit d865ca6c147552a1c38161e2e262c4ab59e762d6 Author: Senthil Balasubramanian Date: Thu Sep 17 09:28:21 2009 +0530 ath9k: Fix bug in chain handling * This patch fixes a bug in calculating the scaled power for three chain chipsets. * Also, a delay is needed after setting DAC low-power mode in TOP1 RF register (Top Level Register Bits). Signed-off-by: Senthil Balasubramanian Signed-off-by: John W. Linville commit 42abfbee23bf86e2c74d569b7ddd040d29782c5a Author: Vivek Natarajan Date: Thu Sep 17 09:27:59 2009 +0530 ath9k: Fix AHB reset for AR9280 The commit "ath9k: Do an AHB reset before doing RTC reset" fixed RTC reset issue for AR9280 2.0 chipsets and above. The fix is valid for all AR9280 chipsets. Signed-off-by: Vivek Natarajan Signed-off-by: John W. Linville commit 9ebef7997d0c131a8d53c045bff68becddd58124 Author: Vasanthakumar Thiagarajan Date: Thu Sep 17 09:26:44 2009 +0530 ath9k: Don't read NF when chip has gone through full sleep mode NF value may be incorrect when we read it just after the chip has gone through a full sleep mode. Reading incorrect NF values affects RX throughput. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: John W. Linville commit 204d794086f26a7b191d9a9c3483af8b81362b16 Author: Vasanthakumar Thiagarajan Date: Thu Sep 17 09:26:14 2009 +0530 ath9k: Fix rx data corruption Setting bit 20 and 25 of 0x8344 can cause occasional rx data corruption, clear them to fix this issue. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: John W. Linville commit d8caa83967d62c05f406d34abaaf2e1baa172c6c Author: Sujith Date: Thu Sep 17 09:25:45 2009 +0530 ath9k: Fix chip wakeup issue Waking up the chip after powering it down fails sometimes. In this case the CPU is locked for 200ms. Reduce this interval to 10ms to avoid excessive busy looping. Signed-off-by: Sujith Signed-off-by: John W. Linville commit 46fe782c97f5e54a02485ad97b2e6256386a8c8f Author: Sujith Date: Thu Sep 17 09:25:25 2009 +0530 ath9k: Restore TSF after RESET For chips requiring RTC reset, TSF has to be restored after power on reset. Signed-off-by: Sujith Signed-off-by: John W. Linville This one is big... : commit 93b1b37f6a4de8bce17f55d9cfa10ef5c8c04e8a Author: Vivek Natarajan Date: Thu Sep 17 09:24:58 2009 +0530 ath9k: Revamp PCIE workarounds * Disable L1 state ONLY when device is in D3 mode. * Clear bit 22 of register 0x4004. * Handle power on/off properly Not setting the workarounds properly resulted in the disappearance of the card in certain cases. Signed-off-by: Vivek Natarajan Signed-off-by: Sujith Signed-off-by: John W. Linville commit 10a01bfd4e077ff03a4ace76a6d9b81272f91678 Author: Sujith Date: Fri Sep 11 08:30:03 2009 +0530 ath9k: Fix bug in ANI channel handling When processing MIB interrupts, OFDM and CCK error handling routines for low RSSI values have to be invoked only when the channel mode is 11G/11B. Since HT channels will also fall under the bands 2Ghz/5Ghz, check appropriately. Signed-off-by: Sujith Signed-off-by: John W. Linville commit 8813262ea79acf9daa0e03901bdfe93db4dc4ca5 Author: Sujith Date: Thu Sep 3 12:08:53 2009 +0530 ath9k: Fix channelFlags for 2GHZ CHANNEL_G has to be set for 2GHZ channels since IS_CHAN_G() checks for this in channelFlags and not in chanmode. To make things messier, ath9k_hw_process_ini() checks for CHANNEL_G in chanmode and not in channelFlags. The supreme, brain-searing fix is to set the flag in both cases. Signed-off-by: Sujith Signed-off-by: John W. Linville commit 7ea310be65bfcbc6e2395844fd3498762dc2aea6 Author: Sujith Date: Thu Sep 3 12:08:43 2009 +0530 ath9k: Fix RX Filter handling for BAR BAR frames have to be sent to mac80211 only if the current channel is HT. Also, move the macro to enum ath9k_rx_filter. Signed-off-by: Sujith Signed-off-by: John W. Linville commit d0bec34293bb0b8dddc26d25bd46a6631d6b3ec3 Author: Vivek Natarajan Date: Wed Sep 2 15:50:55 2009 +0530 ath9k: Reconfigure beacon timers after the scan is completed. Signed-off-by: Vivek Natarajan Signed-off-by: John W. Linville commit 7cf4a2e778ab18c66cd8dd4785aceb2800d49f79 Author: Sujith Date: Wed Aug 26 11:11:57 2009 +0530 ath9k: Wrap DMA dump function with PS wakeup/restore When dumping register contents, HW has to be awake. Signed-off-by: Sujith Signed-off-by: John W. Linville Date: Wed Aug 26 08:39:52 2009 +0530 ath9k: Handle PA cal usage properly PA Calibration is not needed for high power solutions. Signed-off-by: Sujith Signed-off-by: John W. Linville commit 0abb0968795b55ecb102bf635a94a087bbb5aff5 Author: Sujith Date: Wed Aug 26 08:39:50 2009 +0530 ath9k: Fix bugs in programming registers during PA CAL * First PA driver (PDPADRV1) was not powered down properly. * Compensation capacitor for dynamic PA was programmed incorrectly. Also, remove a stray REG_READ. Signed-off-by: Sujith Signed-off-by: John W. Linville commit a13883b0bfcc435e4b7fbbde6334339aac8b1dc4 Author: Sujith Date: Wed Aug 26 08:39:40 2009 +0530 ath9k: Reduce the frequency of PA offset calibration PA calibration need not be done if the offset is not varying. The current logic does PA calibration even if the offset is the same. Signed-off-by: Sujith Signed-off-by: John W. Linville Date: Fri Aug 7 23:50:00 2009 +0200 ath9k: Fix read buffer overflow Prevent a read of powInfo[-1] in the first iteration. Signed-off-by: Roel Kluin Signed-off-by: John W. Linville Date: Fri Aug 21 12:00:28 2009 +0530 ath9k: Fix chainmask selection during scanning The TX/RX chainmasks were set to 1x1 during scanning. Configure them properly with the values retrieved from the EEPROM. Also, this requires scan_start/scan_end callbacks to be locked with sc->mutex. commit ff36041652fcb9f5c17bdbeb081414f69521f1af Author: Vasanthakumar Thiagarajan Date: Thu Aug 20 13:41:14 2009 +0530 ath9k: Fix bug in retrieving average beacon rssi Currently the beacon rssi that LPF gives is divided and rounded up by ATH_RSSI_EP_MULTIPLIER twice. This will leave the incorrect rssi in ANI. Having correct rssi in ANI fixes the connection stability at < 30dB rssi range. This patch removes the unncessary computation of average rssi over already valid average rssi. Also removes the redundant macros to find average rssi. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: John W. Linville commit eff563cf10e2f24e3b025d352c3aa174cf0111b3 Author: Sujith Date: Thu Aug 13 09:34:37 2009 +0530 ath9k: Set HW state properly This patch fixes a bug in ath9k_stop() where the HW was not put into FULL_SLEEP state. Not doing so will cause issues in suspend-resume and the HW will not respond to chip resets. Signed-off-by: Sujith Signed-off-by: John W. Linville commit 523c36fc9cf75ccf605d9acf68ae9eb857de3f58 Author: Sujith Date: Thu Aug 13 09:34:35 2009 +0530 ath9k: Fix bug in PCI resume This patch fixes a bug where the device was enabled before restoring the PCI state. Signed-off-by: Sujith Signed-off-by: John W. Linville commit 5e32b1ed7e81558b09bf0a6bf9e73c34db3c337c Author: Sujith Date: Fri Aug 7 09:45:36 2009 +0530 ath9k: Update beacon RSSI ANI uses the beacon RSSI for its operation. Update this properly. Signed-off-by: Sujith Signed-off-by: John W. Linville commit 3fc0fbf407967fa8def04d019316553c9ca133e2 Author: Vasanthakumar Thiagarajan Date: Wed Jul 29 15:05:22 2009 +0530 ath9k: Maintain monotonicity of PER while going across different phy Monotonicity of packet error rate should be kept when moving from one phy to another (legacy to ht, ht single stream to dual, etc). Current code skips updating per for other phys. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: John W. Linville commit 42e8856092be1db40bd4ae01406d2aaddf4e66fc Author: Vasanthakumar Thiagarajan Date: Wed Jul 29 15:05:21 2009 +0530 ath9k: Update rate control for 11NA HT40 mode Now the lowest rate in 11na ht40 mode is 13.5Mbps this shortens the range when compared to 11na ht20 mode where the lowest rate is 6.5Mbps. To improve the range, make 6.5Mbps as the lowest rate in 11na ht40 mode, this improves the range by approximately 2dB. 11ng ht40 does not have this issue as it also has basic rates (1, 2, 5.5 and 11). Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: John W. Linville commit 96148326c4b54db5c384def1a5ab285c359d1395 Author: Gabor Juhos Date: Fri Jul 24 17:27:21 2009 +0200 ath9k: fix race with IEEE80211_CONF_PS checks There is a small window where the mac80211 changes the IEEE80211_CONF_PS flag, and then informs the driver about the change. We have a race condition if we are checking the flag in the same time. Avoid it by introducing a local variable, and using that instead of checking the IEEE80211_CONF_PS flag directly. This fix the problem reported by Luis: http://article.gmane.org/gmane.linux.kernel.wireless.general/34363 Changes-licensed-under: ISC Signed-off-by: Gabor Juhos Signed-off-by: John W. Linville commit 1b7e528b2e39bfed37228eedaaf0665196d8ddc9 Author: Gabor Juhos Date: Sun Jun 21 00:02:14 2009 +0200 ath9k: wake up the chip for TSF reset If we are in NETWORK SLEEP state, AR_SLP32_TSF_WRITE_STATUS limit always exceeds in 'ath9k_hw_reset_tsf', because reading of the AR_SLP3 register always return with the magic 0xdeadbeef value. Changes-licensed-under: ISC Signed-off-by: Gabor Juhos Signed-off-by: John W. Linville commit 709ade9eb8ef06e03526115408e2fc93a9feabbd Author: Gabor Juhos Date: Tue Jul 14 20:17:15 2009 -0400 ath9k: serialize ath9k_ps_{wakeup,restore} calls These functions are changing the power mode of the chip, but this may have unpredictable effects, if another code are trying to set the power mode via 'ath9k_hw_setpower' in the same time from another context. Changes-licensed-under: ISC Signed-off-by: Gabor Juhos Signed-off-by: John W. Linville commit 0bc0798b7605664c3ab8d577b398dc7ae0b2e58c Author: Gabor Juhos Date: Tue Jul 14 20:17:14 2009 -0400 ath9k: uninline ath9k_ps_{wakeup,restore} functions Uninline these functions before we add functional changes to them. Changes-licensed-under: ISC Signed-off-by: Gabor Juhos Signed-off-by: John W. Linville commit 04717ccd80e5acc500239222684fcf8d2c759a84 Author: Gabor Juhos Date: Tue Jul 14 20:17:13 2009 -0400 ath9k: serialize ath9k_hw_setpower calls Because ath9k_setpower is called from various contexts, we have to protect it against concurrent calls. Changes-licensed-under: ISC Signed-off-by: Gabor Juhos Signed-off-by: John W. Linville commit c41d92dc9d9a1afcec0095c32698ea7deff01098 Author: Vasanthakumar Thiagarajan Date: Tue Jul 14 20:17:11 2009 -0400 ath9k: Handle tx desc shortage more appropriately Update tx BA window and complete the frame as failed one if we can't clone the holding descriptor due to unavailability of descriptors. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: John W. Linville commit 164ace38536849966ffa377b1b1132993a5a375d Author: Senthil Balasubramanian Date: Tue Jul 14 20:17:09 2009 -0400 ath9k: Fix TX hang issue with Atheros chipsets The hardware doesn't generate interrupts in some cases and so work around this by monitoring the TX status periodically and reset the chip if required. This behavior of the hardware not generating the TX interrupts can be noticed through ath9k debugfs interrupt statistics when heavy traffic is being sent from STA to AP. One can easily see this behavior when the STA is transmitting at a higher rates. The interrupt statistics in the debugfs interface clearly shows that only RX interrupts alone being generated and TX being stuck. TX should be monitored through a timer and reset the chip only when frames are queued to the hardware but TX interrupts are not generated for the same even after one second. Also, we shouldn't remove holding descriptor from AC queue if it happens to be the only descriptor and schedule TX aggregation regarless of queue depth as it improves scheduling of AMPDUs from software to hardware queue. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Senthil Balasubramanian Signed-off-by: John W. Linville commit dd8b15b027d96f7097ae9dbaebd822a114a03c34 Author: Senthil Balasubramanian Date: Tue Jul 14 20:17:08 2009 -0400 ath9k: RX stucks during heavy traffic in HT40 mode. Running iperf along with p2p traffic on both TX and RX side then stop one side, then stop the other side, then start it up again, eventually the STA gets into a mode that it can not pass data at all. A hardware workaround for invalid RSSI can make FIFO write pointer to jump over read pointer, causing RX data corruption and repeated DMA. Both TX and RX works fine when the workaround is disabled. To replace the original hardware work around, software looks for frames with post delimiter CRC error and mark the RSSI invalid so that the upperlayer will not use the RSSI associated with this frame. So disable the hardware workaround by updating the appropriate registers. Signed-off-by: Senthil Balasubramanian Signed-off-by: John W. Linville commit a59b5a5e684652eec035c869ab8911a1689c8f53 Author: Senthil Balasubramanian Date: Tue Jul 14 20:17:07 2009 -0400 ath9k: Manipulate and report the correct RSSI RSSI reported by the RX descriptor requires little manipulation. Manipulate and report the correct RSSI to the stack. This will fix the improper signal levels reported by iwconfig iw dev wlanX station dump. Also the Link Quality reported seems to be varying (falls to zero also sometimes) when iperf is run from STA to AP. Also use the default noise floor for now as the one reported during the caliberation seems to be wrong. The Signal and Link Quality before this patch (taken while TX is in progress from STA to AP) 09:59:13.285428037 Link Quality=29/70 Signal level=-81 dBm 09:59:13.410660084 Link Quality=20/70 Signal level=-90 dBm 09:59:13.586864392 Link Quality=21/70 Signal level=-89 dBm 09:59:13.710296281 Link Quality=21/70 Signal level=-89 dBm 09:59:13.821683064 Link Quality=25/70 Signal level=-85 dBm 09:59:13.933402989 Link Quality=24/70 Signal level=-86 dBm 09:59:14.045839276 Link Quality=26/70 Signal level=-84 dBm 09:59:14.193926673 Link Quality=23/70 Signal level=-87 dBm 09:59:14.306230262 Link Quality=31/70 Signal level=-79 dBm 09:59:14.419459667 Link Quality=26/70 Signal level=-84 dBm 09:59:14.530711167 Link Quality=37/70 Signal level=-73 dBm 09:59:14.642593962 Link Quality=29/70 Signal level=-81 dBm 09:59:14.754361169 Link Quality=21/70 Signal level=-89 dBm 09:59:14.866217355 Link Quality=21/70 Signal level=-89 dBm 09:59:14.976963623 Link Quality=28/70 Signal level=-82 dBm 09:59:15.089149809 Link Quality=26/70 Signal level=-84 dBm 09:59:15.205039887 Link Quality=27/70 Signal level=-83 dBm 09:59:15.316368003 Link Quality=23/70 Signal level=-87 dBm 09:59:15.427684036 Link Quality=36/70 Signal level=-74 dBm 09:59:15.539756380 Link Quality=21/70 Signal level=-89 dBm 09:59:15.650549093 Link Quality=22/70 Signal level=-88 dBm 09:59:15.761171672 Link Quality=32/70 Signal level=-78 dBm 09:59:15.872793750 Link Quality=23/70 Signal level=-87 dBm 09:59:15.984421694 Link Quality=22/70 Signal level=-88 dBm 09:59:16.097315093 Link Quality=21/70 Signal level=-89 dBm The link quality and signal level after this patch (take while TX is in progress from STA to AP) 17:21:25.627848091 Link Quality=65/70 Signal level=-45 dBm 17:21:25.762805607 Link Quality=65/70 Signal level=-45 dBm 17:21:25.875521888 Link Quality=66/70 Signal level=-44 dBm 17:21:25.987468448 Link Quality=66/70 Signal level=-44 dBm 17:21:26.100628151 Link Quality=66/70 Signal level=-44 dBm 17:21:26.213129671 Link Quality=66/70 Signal level=-44 dBm 17:21:26.324923070 Link Quality=65/70 Signal level=-45 dBm 17:21:26.436831357 Link Quality=65/70 Signal level=-45 dBm 17:21:26.610356973 Link Quality=65/70 Signal level=-45 dBm 17:21:26.723340047 Link Quality=65/70 Signal level=-45 dBm 17:21:26.835715293 Link Quality=64/70 Signal level=-46 dBm 17:21:26.949542748 Link Quality=64/70 Signal level=-46 dBm 17:21:27.062261613 Link Quality=65/70 Signal level=-45 dBm 17:21:27.174511563 Link Quality=64/70 Signal level=-46 dBm 17:21:27.287616232 Link Quality=64/70 Signal level=-46 dBm 17:21:27.400598119 Link Quality=64/70 Signal level=-46 dBm 17:21:27.511381404 Link Quality=64/70 Signal level=-46 dBm 17:21:27.624530421 Link Quality=65/70 Signal level=-45 dBm 17:21:27.737807109 Link Quality=64/70 Signal level=-46 dBm 17:21:27.850861352 Link Quality=65/70 Signal level=-45 dBm 17:21:27.963369436 Link Quality=64/70 Signal level=-46 dBm 17:21:28.076582289 Link Quality=64/70 Signal level=-46 dBm Signed-off-by: Senthil Balasubramanian Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: John W. Linville commit c41304653e120749dae8b04332b92ffb5f4dbbfd Author: Vasanthakumar Thiagarajan Date: Tue Jul 14 20:14:12 2009 -0400 ath9k: Use probe interval instead of rssi reduce interval Get rid of rssi reduce interval. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: John W. Linville commit e5f0921a9593365b506f69daa3cfd19c0ed1340b Author: Senthil Balasubramanian Date: Wed Jun 24 18:56:41 2009 +0530 ath9k: race condition in SCANNING state check during ANI calibration ANI calibration shouldn't be done when we are not on our home channel. This is already verified. However, it is racy. Fix this by proper spin locks. Signed-off-by: Senthil Balasubramanian Signed-off-by: John W. Linville commit f38faa31e0da07390d72fb67d3151e56c54871f4 Author: Senthil Balasubramanian Date: Wed Jun 24 18:56:40 2009 +0530 ath9k: stop ani when the STA gets disconnected. ANI is not required when the STA is disconnected. So stop it and enable ANI for adhoc and monitor mode. Signed-off-by: Senthil Balasubramanian Signed-off-by: John W. Linville commit 8e7f98b5690fc295e3a39b99aeed475d28c60c90 Author: Vasanthakumar Thiagarajan Date: Tue Jul 14 20:17:10 2009 -0400 ath9k: Remove bogus assert in ath_clone_txbuf() oops, this one should be part of the original patch "ath9k: downgrade assert in ath_clone_txbuf()" Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: John W. Linville commit 8a46097a6c60dc9d2f09bf01734f3308142614b3 Author: Vasanthakumar Thiagarajan Date: Wed Jun 10 17:50:09 2009 +0530 ath9k: downgrade ASSERT() in ath_clone_txbuf() We can easily run out of tx buf if there is any stuck in transmission, so downgrade it to WARN_ON(). Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: John W. Linville