1 --- a/drivers/net/wireless/ath/ath9k/xmit.c
2 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
3 @@ -259,14 +259,17 @@ 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 ath_buf *bf = fi->bf;
12 struct ieee80211_hdr *hdr;
13 + int prev = fi->retries;
15 TX_STAT_INC(txq->axq_qnum, a_retries);
16 - if (fi->retries++ > 0)
17 + fi->retries += count;
22 hdr = (struct ieee80211_hdr *)skb->data;
23 @@ -382,6 +385,7 @@ static void ath_tx_complete_aggr(struct
26 bool flush = !!(ts->ts_status & ATH9K_TX_FLUSH);
30 hdr = (struct ieee80211_hdr *)skb->data;
31 @@ -390,6 +394,10 @@ static void ath_tx_complete_aggr(struct
33 memcpy(rates, tx_info->control.rates, sizeof(rates));
35 + retries = ts->ts_longretry + 1;
36 + for (i = 0; i < ts->ts_rateindex; i++)
37 + retries += rates[i].count;
41 sta = ieee80211_find_sta_by_ifaddr(hw, hdr->addr1, hdr->addr2);
42 @@ -476,7 +484,8 @@ static void ath_tx_complete_aggr(struct
44 } else if (fi->retries < ATH_MAX_SW_RETRIES) {
45 if (txok || !an->sleeping)
46 - ath_tx_set_retry(sc, txq, bf->bf_mpdu);
47 + ath_tx_set_retry(sc, txq, bf->bf_mpdu,
52 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
53 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
54 @@ -542,7 +542,7 @@ struct ath_ant_comb {
55 #define DEFAULT_CACHELINE 32
56 #define ATH_REGCLASSIDS_MAX 10
57 #define ATH_CABQ_READY_TIME 80 /* % of beacon interval */
58 -#define ATH_MAX_SW_RETRIES 10
59 +#define ATH_MAX_SW_RETRIES 20
60 #define ATH_CHAN_MAX 255
62 #define ATH_TXPOWER_MAX 100 /* .5 dBm units */