ath9k_hw: Change DCU backoff thresh for AR9340
authorRajkumar Manoharan <rmanoharan@atheros.com>
Mon, 9 May 2011 13:41:27 +0000 (19:11 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 10 May 2011 19:54:52 +0000 (15:54 -0400)
By changing DCU backoff threshold for AR9340 to 1, helps to
reduce rx overrurns seen while running bidirectional traffic.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/mac.c

index 9cf7a7d0e118b2f52a77f9ec8e772719f4606f99..bd6d2b9d736fbb7b2649bdc3311971f5c9f1a8e0 100644 (file)
@@ -430,8 +430,13 @@ bool ath9k_hw_resettxqueue(struct ath_hw *ah, u32 q)
                  SM(qi->tqi_shretry, AR_D_RETRY_LIMIT_FR_SH));
 
        REG_WRITE(ah, AR_QMISC(q), AR_Q_MISC_DCU_EARLY_TERM_REQ);
-       REG_WRITE(ah, AR_DMISC(q),
-                 AR_D_MISC_CW_BKOFF_EN | AR_D_MISC_FRAG_WAIT_EN | 0x2);
+
+       if (AR_SREV_9340(ah))
+               REG_WRITE(ah, AR_DMISC(q),
+                         AR_D_MISC_CW_BKOFF_EN | AR_D_MISC_FRAG_WAIT_EN | 0x1);
+       else
+               REG_WRITE(ah, AR_DMISC(q),
+                         AR_D_MISC_CW_BKOFF_EN | AR_D_MISC_FRAG_WAIT_EN | 0x2);
 
        if (qi->tqi_cbrPeriod) {
                REG_WRITE(ah, AR_QCBRCFG(q),