ath9k: fix checks for first subframe delimiter padding
authorFelix Fietkau <nbd@openwrt.org>
Mon, 29 Aug 2011 16:57:54 +0000 (18:57 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 13 Sep 2011 19:42:31 +0000 (15:42 -0400)
The commit "ath9k_hw: Fix exceed transmission burst-time of 5GHz" added
a padding of 60 delimiters on the first subframe to work around an issue
on AR9380, but it lacked the checks to prevent it from being applied to
pre-AR9380, enterprise AR9380 or AR9580+

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/reg.h
drivers/net/wireless/ath/ath9k/xmit.c

index 17a272f4d8d6aa230a85eb09af75164cf2ef9687..5d34381c44c3099fa2068fdd5f09299439678d33 100644 (file)
@@ -1132,7 +1132,7 @@ enum {
 #define AR_INTR_PRIO_ASYNC_ENABLE (AR_SREV_9340(ah) ? 0x4094 : 0x40d4)
 #define AR_ENT_OTP               0x40d8
 #define AR_ENT_OTP_CHAIN2_DISABLE               0x00020000
-#define AR_ENT_OTP_MPSD                0x00800000
+#define AR_ENT_OTP_MIN_PKT_SIZE_DISABLE                0x00800000
 
 #define AR_CH0_BB_DPLL1                 0x16180
 #define AR_CH0_BB_DPLL1_REFDIV  0xF8000000
index 68066c56e4e57c2c1938a1b2ca59fa4b02d04747..29bcc55a6f9e71d1f1c49752886e8e699d7f072f 100644 (file)
@@ -709,7 +709,8 @@ static int ath_compute_num_delims(struct ath_softc *sc, struct ath_atx_tid *tid,
         * Add delimiter when using RTS/CTS with aggregation
         * and non enterprise AR9003 card
         */
-       if (first_subfrm)
+       if (first_subfrm && !AR_SREV_9580_10_OR_LATER(sc->sc_ah) &&
+           (sc->sc_ah->ent_mode & AR_ENT_OTP_MIN_PKT_SIZE_DISABLE))
                ndelim = max(ndelim, FIRST_DESC_NDELIMS);
 
        /*