aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-10-20 20:47:23 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-11-15 13:24:19 -0500
commitff32d9cd2c4107224a28f39d3c72eec66d566e09 (patch)
tree6d2296d153fd27e6daecffa4a88941714578613a
parent78a7685e1e44c6d4b6f79c73687b9322e40b040e (diff)
ath9k_hw: fix potential spurious tx error bit interpretation
According to documentation, AR_ExcessiveRetries, AR_Filtered and AR_FIFOUnderrun are only valid if AR_FrmXmitOK is clear. Not checking this might result in suboptimal FIFO settings, unnecessary retransmissions, or other connectivity issues. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9002_mac.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_mac.c b/drivers/net/wireless/ath/ath9k/ar9002_mac.c
index 3b4c52c9181c..f0268e5eab34 100644
--- a/drivers/net/wireless/ath/ath9k/ar9002_mac.c
+++ b/drivers/net/wireless/ath/ath9k/ar9002_mac.c
@@ -237,13 +237,15 @@ static int ar9002_hw_proc_txdesc(struct ath_hw *ah, void *ds,
237 status = ACCESS_ONCE(ads->ds_txstatus1); 237 status = ACCESS_ONCE(ads->ds_txstatus1);
238 if (status & AR_FrmXmitOK) 238 if (status & AR_FrmXmitOK)
239 ts->ts_status |= ATH9K_TX_ACKED; 239 ts->ts_status |= ATH9K_TX_ACKED;
240 if (status & AR_ExcessiveRetries) 240 else {
241 ts->ts_status |= ATH9K_TXERR_XRETRY; 241 if (status & AR_ExcessiveRetries)
242 if (status & AR_Filtered) 242 ts->ts_status |= ATH9K_TXERR_XRETRY;
243 ts->ts_status |= ATH9K_TXERR_FILT; 243 if (status & AR_Filtered)
244 if (status & AR_FIFOUnderrun) { 244 ts->ts_status |= ATH9K_TXERR_FILT;
245 ts->ts_status |= ATH9K_TXERR_FIFO; 245 if (status & AR_FIFOUnderrun) {
246 ath9k_hw_updatetxtriglevel(ah, true); 246 ts->ts_status |= ATH9K_TXERR_FIFO;
247 ath9k_hw_updatetxtriglevel(ah, true);
248 }
247 } 249 }
248 if (status & AR_TxTimerExpired) 250 if (status & AR_TxTimerExpired)
249 ts->ts_status |= ATH9K_TXERR_TIMER_EXPIRED; 251 ts->ts_status |= ATH9K_TXERR_TIMER_EXPIRED;