aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/hw.h
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanoharan@atheros.com>2011-03-15 13:41:35 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-03-30 14:15:12 -0400
commite7fc63388def06d2d1bdb6916748c92c037a42c6 (patch)
tree120e3880e7fb2fb18398aaf1be4f7740f6a5d561 /drivers/net/wireless/ath/ath9k/hw.h
parentb0a9ede228175c25f76314a028d305fd5b2de427 (diff)
ath9k_hw: Speedup register ops for HTC driver
Fine-tuning register write operation and avoid unnecessay delays for ath9k_htc driver, saves hw reset time which improves scanning time and also solves one of the following scenario. Sometimes the ACK is sent by STA for assoc response is not seen at AP side. So the AP continues to send retry assoc responses. At the STA side, since the assoc response was already forwarded to mac80211, it proceeded to channel change which in turns does chip reset. In most of the cases the chip reset was completed before max retries are reached at AP side. Hence STA can able to ACK the retried frames again. But in clear environment these retries are completed within shortspan of time. Since ath9k_htc consumes more time for hw reset, this latency is causing dissociation by AP due to max reties are reached. This issue was originally reported with Cisco Aironet 1250 AP in HT40 mode in noise free environment. Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hw.h')
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 6650fd48415..c86eea28a88 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -99,18 +99,22 @@
99#define REG_CLR_BIT(_a, _r, _f) \ 99#define REG_CLR_BIT(_a, _r, _f) \
100 REG_WRITE(_a, _r, REG_READ(_a, _r) & ~(_f)) 100 REG_WRITE(_a, _r, REG_READ(_a, _r) & ~(_f))
101 101
102#define DO_DELAY(x) do { \ 102#define DO_DELAY(x) do { \
103 if ((++(x) % 64) == 0) \ 103 if (((++(x) % 64) == 0) && \
104 udelay(1); \ 104 (ath9k_hw_common(ah)->bus_ops->ath_bus_type \
105 != ATH_USB)) \
106 udelay(1); \
105 } while (0) 107 } while (0)
106 108
107#define REG_WRITE_ARRAY(iniarray, column, regWr) do { \ 109#define REG_WRITE_ARRAY(iniarray, column, regWr) do { \
108 int r; \ 110 int r; \
111 ENABLE_REGWRITE_BUFFER(ah); \
109 for (r = 0; r < ((iniarray)->ia_rows); r++) { \ 112 for (r = 0; r < ((iniarray)->ia_rows); r++) { \
110 REG_WRITE(ah, INI_RA((iniarray), (r), 0), \ 113 REG_WRITE(ah, INI_RA((iniarray), (r), 0), \
111 INI_RA((iniarray), r, (column))); \ 114 INI_RA((iniarray), r, (column))); \
112 DO_DELAY(regWr); \ 115 DO_DELAY(regWr); \
113 } \ 116 } \
117 REGWRITE_BUFFER_FLUSH(ah); \
114 } while (0) 118 } while (0)
115 119
116#define AR_GPIO_OUTPUT_MUX_AS_OUTPUT 0 120#define AR_GPIO_OUTPUT_MUX_AS_OUTPUT 0