[toolchain] uClibc: enhance debug support (closes: #6118)
[openwrt.git] / package / mac80211 / patches / 560-ath9k_fix_ampdu_rate_handling.patch
1 --- a/drivers/net/wireless/ath/ath9k/xmit.c
2 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
3 @@ -1947,10 +1947,10 @@ static void ath_tx_rc_status(struct ath_
4         tx_rateindex = ds->ds_txstat.ts_rateindex;
5         WARN_ON(tx_rateindex >= hw->max_rates);
6  
7 -       if (update_rc)
8 -               tx_info->pad[0] |= ATH_TX_INFO_UPDATE_RC;
9         if (ds->ds_txstat.ts_status & ATH9K_TXERR_FILT)
10                 tx_info->flags |= IEEE80211_TX_STAT_TX_FILTERED;
11 +       if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && update_rc)
12 +               tx_info->flags |= IEEE80211_TX_STAT_AMPDU;
13  
14         if ((ds->ds_txstat.ts_status & ATH9K_TXERR_FILT) == 0 &&
15             (bf->bf_flags & ATH9K_TXDESC_NOACK) == 0 && update_rc) {
16 --- a/drivers/net/wireless/ath/ath9k/rc.h
17 +++ b/drivers/net/wireless/ath/ath9k/rc.h
18 @@ -172,7 +172,6 @@ struct ath_rate_priv {
19  
20  #define ATH_TX_INFO_FRAME_TYPE_INTERNAL        (1 << 0)
21  #define ATH_TX_INFO_FRAME_TYPE_PAUSE   (1 << 1)
22 -#define ATH_TX_INFO_UPDATE_RC          (1 << 2)
23  #define ATH_TX_INFO_XRETRY             (1 << 3)
24  #define ATH_TX_INFO_UNDERRUN           (1 << 4)
25  
26 --- a/drivers/net/wireless/ath/ath9k/rc.c
27 +++ b/drivers/net/wireless/ath/ath9k/rc.c
28 @@ -1226,8 +1226,12 @@ static void ath_tx_status(void *priv, st
29                 long_retry = rate->count - 1;
30         }
31  
32 -       if (!priv_sta || !ieee80211_is_data(fc) ||
33 -           !(tx_info->pad[0] & ATH_TX_INFO_UPDATE_RC))
34 +       if (!priv_sta || !ieee80211_is_data(fc))
35 +               return;
36 +
37 +       /* This packet was aggregated but doesn't carry status info */
38 +       if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) &&
39 +           !(tx_info->flags & IEEE80211_TX_STAT_AMPDU))
40                 return;
41  
42         if (tx_info->flags & IEEE80211_TX_STAT_TX_FILTERED)