aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-10-06 20:28:15 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-10-11 16:41:15 -0400
commitdaa5c408a57514aaeef49a798202d285ee355c3e (patch)
tree9253112a2b7fde5a2b385412a7cbea05ea3b31f6 /drivers/net/wireless
parent26a64259b702ec3eccb785e32e473eefcc76b5a5 (diff)
ath9k: fix retry counting / BAR handling during queue flush
When tx is suspended temporarily and the queue is flushed, do not increase the retry count or attempt to send out BAR frames. Instead simply retry the affected subframes normally after the reset. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath9k/mac.h3
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c7
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h
index 91c96546c0cd..5eb4ee454325 100644
--- a/drivers/net/wireless/ath/ath9k/mac.h
+++ b/drivers/net/wireless/ath/ath9k/mac.h
@@ -75,9 +75,10 @@
75#define ATH9K_TXERR_XTXOP 0x08 75#define ATH9K_TXERR_XTXOP 0x08
76#define ATH9K_TXERR_TIMER_EXPIRED 0x10 76#define ATH9K_TXERR_TIMER_EXPIRED 0x10
77#define ATH9K_TX_ACKED 0x20 77#define ATH9K_TX_ACKED 0x20
78#define ATH9K_TX_FLUSH 0x40
78#define ATH9K_TXERR_MASK \ 79#define ATH9K_TXERR_MASK \
79 (ATH9K_TXERR_XRETRY | ATH9K_TXERR_FILT | ATH9K_TXERR_FIFO | \ 80 (ATH9K_TXERR_XRETRY | ATH9K_TXERR_FILT | ATH9K_TXERR_FIFO | \
80 ATH9K_TXERR_XTXOP | ATH9K_TXERR_TIMER_EXPIRED) 81 ATH9K_TXERR_XTXOP | ATH9K_TXERR_TIMER_EXPIRED | ATH9K_TX_FLUSH)
81 82
82#define ATH9K_TX_BA 0x01 83#define ATH9K_TX_BA 0x01
83#define ATH9K_TX_PWRMGMT 0x02 84#define ATH9K_TX_PWRMGMT 0x02
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 9903fc3af723..03b0a651a591 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -373,6 +373,7 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
373 struct ath_frame_info *fi; 373 struct ath_frame_info *fi;
374 int nframes; 374 int nframes;
375 u8 tidno; 375 u8 tidno;
376 bool flush = !!(ts->ts_status & ATH9K_TX_FLUSH);
376 377
377 skb = bf->bf_mpdu; 378 skb = bf->bf_mpdu;
378 hdr = (struct ieee80211_hdr *)skb->data; 379 hdr = (struct ieee80211_hdr *)skb->data;
@@ -461,6 +462,8 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
461 * the un-acked sub-frames 462 * the un-acked sub-frames
462 */ 463 */
463 txfail = 1; 464 txfail = 1;
465 } else if (flush) {
466 txpending = 1;
464 } else if (fi->retries < ATH_MAX_SW_RETRIES) { 467 } else if (fi->retries < ATH_MAX_SW_RETRIES) {
465 if (txok || !an->sleeping) 468 if (txok || !an->sleeping)
466 ath_tx_set_retry(sc, txq, bf->bf_mpdu); 469 ath_tx_set_retry(sc, txq, bf->bf_mpdu);
@@ -518,7 +521,8 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
518 521
519 ath_tx_complete_buf(sc, bf, txq, 522 ath_tx_complete_buf(sc, bf, txq,
520 &bf_head, 523 &bf_head,
521 ts, 0, 1); 524 ts, 0,
525 !flush);
522 break; 526 break;
523 } 527 }
524 528
@@ -1401,6 +1405,7 @@ static void ath_drain_txq_list(struct ath_softc *sc, struct ath_txq *txq,
1401 struct ath_tx_status ts; 1405 struct ath_tx_status ts;
1402 1406
1403 memset(&ts, 0, sizeof(ts)); 1407 memset(&ts, 0, sizeof(ts));
1408 ts.ts_status = ATH9K_TX_FLUSH;
1404 INIT_LIST_HEAD(&bf_head); 1409 INIT_LIST_HEAD(&bf_head);
1405 1410
1406 while (!list_empty(list)) { 1411 while (!list_empty(list)) {