dfb09ba22e1c5ea9551061dfe456a914a5572c2e
[openwrt-10.03/.git] / package / mac80211 / patches / 572-ath9k_fix_tx_retry.patch
1 --- a/drivers/net/wireless/ath/ath9k/xmit.c
2 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
3 @@ -387,7 +387,6 @@ static void ath_tx_complete_aggr(struct 
4         struct ath_frame_info *fi;
5         int nframes;
6         u8 tidno;
7 -       bool clear_filter;
8         int i, retries;
9  
10         skb = bf->bf_mpdu;
11 @@ -484,12 +483,10 @@ static void ath_tx_complete_aggr(struct 
12                                  */
13                                 txfail = 1;
14                         } else if (fi->retries < ATH_MAX_SW_RETRIES) {
15 -                               if (!(ts->ts_status & ATH9K_TXERR_FILT) ||
16 -                                   !an->sleeping)
17 +                               if (txok || !an->sleeping)
18                                         ath_tx_set_retry(sc, txq, bf->bf_mpdu,
19                                                          retries);
20  
21 -                               clear_filter = true;
22                                 txpending = 1;
23                         } else {
24                                 txfail = 1;
25 @@ -568,11 +565,13 @@ static void ath_tx_complete_aggr(struct 
26                         ieee80211_sta_set_tim(sta);
27  
28                 spin_lock_bh(&txq->axq_lock);
29 -               if (clear_filter)
30 -                       tid->ac->clear_ps_filter = true;
31                 skb_queue_splice(&bf_pending, &tid->buf_q);
32 -               if (!an->sleeping)
33 +               if (!an->sleeping) {
34                         ath_tx_queue_tid(txq, tid);
35 +
36 +                       if (ts->ts_status & ATH9K_TXERR_FILT)
37 +                               tid->ac->clear_ps_filter = true;
38 +               }
39                 spin_unlock_bh(&txq->axq_lock);
40         }
41