ath9k_hw: increase tx abort timeout for half/quarter channels
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
feb7bc9951
commit
8d1bd2afc5
@ -133,8 +133,16 @@ EXPORT_SYMBOL(ath9k_hw_updatetxtriglevel);
|
|||||||
|
|
||||||
void ath9k_hw_abort_tx_dma(struct ath_hw *ah)
|
void ath9k_hw_abort_tx_dma(struct ath_hw *ah)
|
||||||
{
|
{
|
||||||
|
int maxdelay = 1000;
|
||||||
int i, q;
|
int i, q;
|
||||||
|
|
||||||
|
if (ah->curchan) {
|
||||||
|
if (IS_CHAN_HALF_RATE(ah->curchan))
|
||||||
|
maxdelay *= 2;
|
||||||
|
else if (IS_CHAN_QUARTER_RATE(ah->curchan))
|
||||||
|
maxdelay *= 4;
|
||||||
|
}
|
||||||
|
|
||||||
REG_WRITE(ah, AR_Q_TXD, AR_Q_TXD_M);
|
REG_WRITE(ah, AR_Q_TXD, AR_Q_TXD_M);
|
||||||
|
|
||||||
REG_SET_BIT(ah, AR_PCU_MISC, AR_PCU_FORCE_QUIET_COLL | AR_PCU_CLEAR_VMF);
|
REG_SET_BIT(ah, AR_PCU_MISC, AR_PCU_FORCE_QUIET_COLL | AR_PCU_CLEAR_VMF);
|
||||||
@ -142,7 +150,7 @@ void ath9k_hw_abort_tx_dma(struct ath_hw *ah)
|
|||||||
REG_SET_BIT(ah, AR_D_GBL_IFS_MISC, AR_D_GBL_IFS_MISC_IGNORE_BACKOFF);
|
REG_SET_BIT(ah, AR_D_GBL_IFS_MISC, AR_D_GBL_IFS_MISC_IGNORE_BACKOFF);
|
||||||
|
|
||||||
for (q = 0; q < AR_NUM_QCU; q++) {
|
for (q = 0; q < AR_NUM_QCU; q++) {
|
||||||
for (i = 0; i < 1000; i++) {
|
for (i = 0; i < maxdelay; i++) {
|
||||||
if (i)
|
if (i)
|
||||||
udelay(5);
|
udelay(5);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user