aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/xmit.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/xmit.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 9e65c3198ca7..a46b4e2f045c 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -264,14 +264,17 @@ static void ath_tid_drain(struct ath_softc *sc, struct ath_txq *txq,
264} 264}
265 265
266static void ath_tx_set_retry(struct ath_softc *sc, struct ath_txq *txq, 266static void ath_tx_set_retry(struct ath_softc *sc, struct ath_txq *txq,
267 struct sk_buff *skb) 267 struct sk_buff *skb, int count)
268{ 268{
269 struct ath_frame_info *fi = get_frame_info(skb); 269 struct ath_frame_info *fi = get_frame_info(skb);
270 struct ath_buf *bf = fi->bf; 270 struct ath_buf *bf = fi->bf;
271 struct ieee80211_hdr *hdr; 271 struct ieee80211_hdr *hdr;
272 int prev = fi->retries;
272 273
273 TX_STAT_INC(txq->axq_qnum, a_retries); 274 TX_STAT_INC(txq->axq_qnum, a_retries);
274 if (fi->retries++ > 0) 275 fi->retries += count;
276
277 if (prev > 0)
275 return; 278 return;
276 279
277 hdr = (struct ieee80211_hdr *)skb->data; 280 hdr = (struct ieee80211_hdr *)skb->data;
@@ -379,6 +382,7 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
379 int nframes; 382 int nframes;
380 u8 tidno; 383 u8 tidno;
381 bool flush = !!(ts->ts_status & ATH9K_TX_FLUSH); 384 bool flush = !!(ts->ts_status & ATH9K_TX_FLUSH);
385 int i, retries;
382 386
383 skb = bf->bf_mpdu; 387 skb = bf->bf_mpdu;
384 hdr = (struct ieee80211_hdr *)skb->data; 388 hdr = (struct ieee80211_hdr *)skb->data;
@@ -387,6 +391,10 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
387 391
388 memcpy(rates, tx_info->control.rates, sizeof(rates)); 392 memcpy(rates, tx_info->control.rates, sizeof(rates));
389 393
394 retries = ts->ts_longretry + 1;
395 for (i = 0; i < ts->ts_rateindex; i++)
396 retries += rates[i].count;
397
390 rcu_read_lock(); 398 rcu_read_lock();
391 399
392 sta = ieee80211_find_sta_by_ifaddr(hw, hdr->addr1, hdr->addr2); 400 sta = ieee80211_find_sta_by_ifaddr(hw, hdr->addr1, hdr->addr2);
@@ -471,7 +479,8 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
471 txpending = 1; 479 txpending = 1;
472 } else if (fi->retries < ATH_MAX_SW_RETRIES) { 480 } else if (fi->retries < ATH_MAX_SW_RETRIES) {
473 if (txok || !an->sleeping) 481 if (txok || !an->sleeping)
474 ath_tx_set_retry(sc, txq, bf->bf_mpdu); 482 ath_tx_set_retry(sc, txq, bf->bf_mpdu,
483 retries);
475 484
476 txpending = 1; 485 txpending = 1;
477 } else { 486 } else {