mac80211: update to 2011-11-15 from trunk
[openwrt-10.03/.git] / package / mac80211 / patches / 541-ath9k_sw_retry_reduce.patch
index 1685aabfaae47ff5a4fcbd5a7e23f39d74d4cff0..d83b663fbc5a5bb36aa6298a9311d680210fe899 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/xmit.c
 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
-@@ -259,14 +259,17 @@ static void ath_tid_drain(struct ath_sof
+@@ -264,14 +264,17 @@ static void ath_tid_drain(struct ath_sof
  }
  
  static void ath_tx_set_retry(struct ath_softc *sc, struct ath_txq *txq,
                return;
  
        hdr = (struct ieee80211_hdr *)skb->data;
-@@ -382,6 +385,7 @@ static void ath_tx_complete_aggr(struct 
+@@ -387,6 +390,7 @@ static void ath_tx_complete_aggr(struct 
        int nframes;
        u8 tidno;
-       bool clear_filter;
+       bool flush = !!(ts->ts_status & ATH9K_TX_FLUSH);
 +      int i, retries;
  
        skb = bf->bf_mpdu;
        hdr = (struct ieee80211_hdr *)skb->data;
-@@ -390,6 +394,10 @@ static void ath_tx_complete_aggr(struct 
+@@ -395,6 +399,10 @@ static void ath_tx_complete_aggr(struct 
  
        memcpy(rates, tx_info->control.rates, sizeof(rates));
  
        rcu_read_lock();
  
        sta = ieee80211_find_sta_by_ifaddr(hw, hdr->addr1, hdr->addr2);
-@@ -475,7 +483,8 @@ static void ath_tx_complete_aggr(struct 
+@@ -481,7 +489,8 @@ static void ath_tx_complete_aggr(struct 
+                               txpending = 1;
                        } else if (fi->retries < ATH_MAX_SW_RETRIES) {
-                               if (!(ts->ts_status & ATH9K_TXERR_FILT) ||
-                                   !an->sleeping)
+                               if (txok || !an->sleeping)
 -                                      ath_tx_set_retry(sc, txq, bf->bf_mpdu);
 +                                      ath_tx_set_retry(sc, txq, bf->bf_mpdu,
 +                                                       retries);
  
-                               clear_filter = true;
                                txpending = 1;
+                       } else {
 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -540,7 +540,7 @@ struct ath_ant_comb {
+@@ -546,7 +546,7 @@ struct ath_ant_comb {
  #define DEFAULT_CACHELINE       32
  #define ATH_REGCLASSIDS_MAX     10
  #define ATH_CABQ_READY_TIME     80      /* % of beacon interval */