]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/net/wireless/ath/ath9k/ar9003_mac.c
ath9k_hw: Fix exceed transmission burst-time of 5GHz
[mv-sheeva.git] / drivers / net / wireless / ath / ath9k / ar9003_mac.c
index 8ff0b88a29b9ab4c436870ad3ea6d2d09b030f67..81ccce1faff538d2e32d6a0743dd16dfbd028d27 100644 (file)
@@ -415,36 +415,12 @@ static void ar9003_hw_set11n_ratescenario(struct ath_hw *ah, void *ds,
 static void ar9003_hw_set11n_aggr_first(struct ath_hw *ah, void *ds,
                                        u32 aggrLen)
 {
-#define FIRST_DESC_NDELIMS 60
        struct ar9003_txc *ads = (struct ar9003_txc *) ds;
 
        ads->ctl12 |= (AR_IsAggr | AR_MoreAggr);
 
-       if (ah->ent_mode & AR_ENT_OTP_MPSD) {
-               u32 ctl17, ndelim;
-               /*
-                * Add delimiter when using RTS/CTS with aggregation
-                * and non enterprise AR9003 card
-                */
-               ctl17 = ads->ctl17;
-               ndelim = MS(ctl17, AR_PadDelim);
-
-               if (ndelim < FIRST_DESC_NDELIMS) {
-                       aggrLen += (FIRST_DESC_NDELIMS - ndelim) * 4;
-                       ndelim = FIRST_DESC_NDELIMS;
-               }
-
-               ctl17 &= ~AR_AggrLen;
-               ctl17 |= SM(aggrLen, AR_AggrLen);
-
-               ctl17 &= ~AR_PadDelim;
-               ctl17 |= SM(ndelim, AR_PadDelim);
-
-               ads->ctl17 = ctl17;
-       } else {
-               ads->ctl17 &= ~AR_AggrLen;
-               ads->ctl17 |= SM(aggrLen, AR_AggrLen);
-       }
+       ads->ctl17 &= ~AR_AggrLen;
+       ads->ctl17 |= SM(aggrLen, AR_AggrLen);
 }
 
 static void ar9003_hw_set11n_aggr_middle(struct ath_hw *ah, void *ds,
@@ -531,17 +507,18 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs,
 
        /* TODO: byte swap on big endian for ar9300_10 */
 
-       if ((rxsp->status11 & AR_RxDone) == 0)
-               return -EINPROGRESS;
+       if (!rxs) {
+               if ((rxsp->status11 & AR_RxDone) == 0)
+                       return -EINPROGRESS;
 
-       if (MS(rxsp->ds_info, AR_DescId) != 0x168c)
-               return -EINVAL;
+               if (MS(rxsp->ds_info, AR_DescId) != 0x168c)
+                       return -EINVAL;
 
-       if ((rxsp->ds_info & (AR_TxRxDesc | AR_CtrlStat)) != 0)
-               return -EINPROGRESS;
+               if ((rxsp->ds_info & (AR_TxRxDesc | AR_CtrlStat)) != 0)
+                       return -EINPROGRESS;
 
-       if (!rxs)
                return 0;
+       }
 
        rxs->rs_status = 0;
        rxs->rs_flags =  0;