ath9k: fix a warning during a failed aggregation start
authorFelix Fietkau <nbd@openwrt.org>
Mon, 20 Sep 2010 17:32:18 +0000 (17:32 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 20 Sep 2010 17:32:18 +0000 (17:32 +0000)
SVN-Revision: 23100

package/mac80211/patches/521-ath9k_aggr_race_fix.patch

index 0da1e6124d64330d69b391d2770ffdb5adf74aa1..0dbbc13f9b601f9edebf7125960cf5f4f99421ec 100644 (file)
  void ath9k_enable_ps(struct ath_softc *sc);
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1968,7 +1968,7 @@ static int ath9k_ampdu_action(struct iee
+@@ -1968,8 +1968,9 @@ static int ath9k_ampdu_action(struct iee
                break;
        case IEEE80211_AMPDU_TX_START:
                ath9k_ps_wakeup(sc);
 -              ath_tx_aggr_start(sc, sta, tid, ssn);
+-              ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
 +              ret = ath_tx_aggr_start(sc, sta, tid, ssn);
-               ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
++              if (!ret)
++                      ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
                ath9k_ps_restore(sc);
                break;
+       case IEEE80211_AMPDU_TX_STOP: