Commit ff32d9cd authored by Felix Fietkau's avatar Felix Fietkau Committed by John W. Linville

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: default avatarFelix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 78a7685e
...@@ -237,6 +237,7 @@ static int ar9002_hw_proc_txdesc(struct ath_hw *ah, void *ds, ...@@ -237,6 +237,7 @@ static int ar9002_hw_proc_txdesc(struct ath_hw *ah, void *ds,
status = ACCESS_ONCE(ads->ds_txstatus1); status = ACCESS_ONCE(ads->ds_txstatus1);
if (status & AR_FrmXmitOK) if (status & AR_FrmXmitOK)
ts->ts_status |= ATH9K_TX_ACKED; ts->ts_status |= ATH9K_TX_ACKED;
else {
if (status & AR_ExcessiveRetries) if (status & AR_ExcessiveRetries)
ts->ts_status |= ATH9K_TXERR_XRETRY; ts->ts_status |= ATH9K_TXERR_XRETRY;
if (status & AR_Filtered) if (status & AR_Filtered)
...@@ -245,6 +246,7 @@ static int ar9002_hw_proc_txdesc(struct ath_hw *ah, void *ds, ...@@ -245,6 +246,7 @@ static int ar9002_hw_proc_txdesc(struct ath_hw *ah, void *ds,
ts->ts_status |= ATH9K_TXERR_FIFO; ts->ts_status |= ATH9K_TXERR_FIFO;
ath9k_hw_updatetxtriglevel(ah, true); ath9k_hw_updatetxtriglevel(ah, true);
} }
}
if (status & AR_TxTimerExpired) if (status & AR_TxTimerExpired)
ts->ts_status |= ATH9K_TXERR_TIMER_EXPIRED; ts->ts_status |= ATH9K_TXERR_TIMER_EXPIRED;
if (status & AR_DescCfgErr) if (status & AR_DescCfgErr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment