ath9k: Remove unnecessary count for addba attempt
authorVasanthakumar Thiagarajan <vasanth@atheros.com>
Wed, 10 Jun 2009 12:20:08 +0000 (17:50 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 10 Jul 2009 18:57:39 +0000 (14:57 -0400)
mac80211 already has one to keep track of number of failure
addba attempts.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/xmit.c

index 5efc9345ca0d6321102dc63d981041571de89995..747e046b03b0cc75d211dd57003fd7fab5abbacd 100644 (file)
@@ -272,7 +272,6 @@ struct ath_atx_tid {
        int sched;
        int paused;
        u8 state;
-       int addba_exchangeattempts;
 };
 
 struct ath_atx_ac {
index aca3526b6c699c9f37cde9cc48256265c9472918..e08c8174d656e4230178a691b1ba37f262f3f295 100644 (file)
@@ -402,7 +402,6 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
        if (tid->state & AGGR_CLEANUP) {
                if (tid->baw_head == tid->baw_tail) {
                        tid->state &= ~AGGR_ADDBA_COMPLETE;
-                       tid->addba_exchangeattempts = 0;
                        tid->state &= ~AGGR_CLEANUP;
 
                        /* send buffered frames as singles */
@@ -707,7 +706,6 @@ int ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
 
        if (!(txtid->state & AGGR_ADDBA_COMPLETE)) {
                txtid->state &= ~AGGR_ADDBA_PROGRESS;
-               txtid->addba_exchangeattempts = 0;
                return 0;
        }
 
@@ -735,7 +733,6 @@ int ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
                txtid->state |= AGGR_CLEANUP;
        } else {
                txtid->state &= ~AGGR_ADDBA_COMPLETE;
-               txtid->addba_exchangeattempts = 0;
                ath_tx_flush_tid(sc, txtid);
        }
 
@@ -768,14 +765,8 @@ bool ath_tx_aggr_check(struct ath_softc *sc, struct ath_node *an, u8 tidno)
 
        txtid = ATH_AN_2_TID(an, tidno);
 
-       if (!(txtid->state & AGGR_ADDBA_COMPLETE)) {
-               if (!(txtid->state & AGGR_ADDBA_PROGRESS) &&
-                   (txtid->addba_exchangeattempts < ADDBA_EXCHANGE_ATTEMPTS)) {
-                       txtid->addba_exchangeattempts++;
+       if (!(txtid->state & (AGGR_ADDBA_COMPLETE | AGGR_ADDBA_PROGRESS)))
                        return true;
-               }
-       }
-
        return false;
 }
 
@@ -2110,7 +2101,6 @@ void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an)
                tid->ac = &an->ac[acno];
                tid->state &= ~AGGR_ADDBA_COMPLETE;
                tid->state &= ~AGGR_ADDBA_PROGRESS;
-               tid->addba_exchangeattempts = 0;
        }
 
        for (acno = 0, ac = &an->ac[acno];
@@ -2167,7 +2157,6 @@ void ath_tx_node_cleanup(struct ath_softc *sc, struct ath_node *an)
                                        tid->sched = false;
                                        ath_tid_drain(sc, txq, tid);
                                        tid->state &= ~AGGR_ADDBA_COMPLETE;
-                                       tid->addba_exchangeattempts = 0;
                                        tid->state &= ~AGGR_CLEANUP;
                                }
                        }