1 --- a/drivers/net/wireless/ath/ath9k/xmit.c
2 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
3 @@ -248,13 +248,16 @@ static void ath_tid_drain(struct ath_sof
6 static void ath_tx_set_retry(struct ath_softc *sc, struct ath_txq *txq,
8 + struct sk_buff *skb, int count)
10 struct ath_frame_info *fi = get_frame_info(skb);
11 struct ieee80211_hdr *hdr;
12 + int prev = fi->retries;
14 TX_STAT_INC(txq->axq_qnum, a_retries);
15 - if (fi->retries++ > 0)
16 + fi->retries += count;
21 hdr = (struct ieee80211_hdr *)skb->data;
22 @@ -359,6 +362,7 @@ static void ath_tx_complete_aggr(struct
29 hdr = (struct ieee80211_hdr *)skb->data;
30 @@ -367,6 +371,10 @@ static void ath_tx_complete_aggr(struct
32 memcpy(rates, tx_info->control.rates, sizeof(rates));
34 + retries = ts->ts_longretry + 1;
35 + for (i = 0; i < ts->ts_rateindex; i++)
36 + retries += rates[i].count;
40 sta = ieee80211_find_sta_by_ifaddr(hw, hdr->addr1, hdr->addr2);
41 @@ -451,7 +459,8 @@ static void ath_tx_complete_aggr(struct
42 } else if (fi->retries < ATH_MAX_SW_RETRIES) {
43 if (!(ts->ts_status & ATH9K_TXERR_FILT) ||
45 - ath_tx_set_retry(sc, txq, bf->bf_mpdu);
46 + ath_tx_set_retry(sc, txq, bf->bf_mpdu,
51 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
52 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
53 @@ -538,7 +538,7 @@ struct ath_ant_comb {
54 #define DEFAULT_CACHELINE 32
55 #define ATH_REGCLASSIDS_MAX 10
56 #define ATH_CABQ_READY_TIME 80 /* % of beacon interval */
57 -#define ATH_MAX_SW_RETRIES 10
58 +#define ATH_MAX_SW_RETRIES 20
59 #define ATH_CHAN_MAX 255
61 #define ATH_TXPOWER_MAX 100 /* .5 dBm units */