ath9k: add some more fixes to AP handling of buffered frames for powersave clients

SVN-Revision: 28344
This commit is contained in:
Felix Fietkau 2011-09-30 22:23:35 +00:00
parent 3802769ea1
commit e477159e40
2 changed files with 40 additions and 10 deletions

View file

@ -1,11 +1,41 @@
--- a/drivers/net/wireless/ath/ath9k/xmit.c --- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -484,7 +484,7 @@ static void ath_tx_complete_aggr(struct @@ -387,7 +387,6 @@ static void ath_tx_complete_aggr(struct
struct ath_frame_info *fi;
int nframes;
u8 tidno;
- bool clear_filter;
int i, retries;
skb = bf->bf_mpdu;
@@ -484,12 +483,10 @@ static void ath_tx_complete_aggr(struct
*/ */
txfail = 1; txfail = 1;
} else if (fi->retries < ATH_MAX_SW_RETRIES) { } else if (fi->retries < ATH_MAX_SW_RETRIES) {
- if (!(ts->ts_status & ATH9K_TXERR_FILT) || - if (!(ts->ts_status & ATH9K_TXERR_FILT) ||
+ if (!(ts->ts_status & ATH9K_TXERR_FILT) && - !an->sleeping)
!an->sleeping) + if (txok || !an->sleeping)
ath_tx_set_retry(sc, txq, bf->bf_mpdu, ath_tx_set_retry(sc, txq, bf->bf_mpdu,
retries); retries);
- clear_filter = true;
txpending = 1;
} else {
txfail = 1;
@@ -568,11 +565,13 @@ static void ath_tx_complete_aggr(struct
ieee80211_sta_set_tim(sta);
spin_lock_bh(&txq->axq_lock);
- if (clear_filter)
- tid->ac->clear_ps_filter = true;
skb_queue_splice(&bf_pending, &tid->buf_q);
- if (!an->sleeping)
+ if (!an->sleeping) {
ath_tx_queue_tid(txq, tid);
+
+ if (ts->ts_status & ATH9K_TXERR_FILT)
+ tid->ac->clear_ps_filter = true;
+ }
spin_unlock_bh(&txq->axq_lock);
}

View file

@ -14,24 +14,24 @@
#define ATH9K_TX_PWRMGMT 0x02 #define ATH9K_TX_PWRMGMT 0x02
--- a/drivers/net/wireless/ath/ath9k/xmit.c --- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -389,6 +389,7 @@ static void ath_tx_complete_aggr(struct @@ -388,6 +388,7 @@ static void ath_tx_complete_aggr(struct
int nframes;
u8 tidno; u8 tidno;
bool clear_filter;
int i, retries; int i, retries;
+ bool flush = !!(ts->ts_status & ATH9K_TX_FLUSH); + bool flush = !!(ts->ts_status & ATH9K_TX_FLUSH);
skb = bf->bf_mpdu; skb = bf->bf_mpdu;
hdr = (struct ieee80211_hdr *)skb->data; hdr = (struct ieee80211_hdr *)skb->data;
@@ -483,6 +484,8 @@ static void ath_tx_complete_aggr(struct @@ -482,6 +483,8 @@ static void ath_tx_complete_aggr(struct
* the un-acked sub-frames * the un-acked sub-frames
*/ */
txfail = 1; txfail = 1;
+ } else if (flush) { + } else if (flush) {
+ txpending = 1; + txpending = 1;
} else if (fi->retries < ATH_MAX_SW_RETRIES) { } else if (fi->retries < ATH_MAX_SW_RETRIES) {
if (!(ts->ts_status & ATH9K_TXERR_FILT) && if (txok || !an->sleeping)
!an->sleeping) ath_tx_set_retry(sc, txq, bf->bf_mpdu,
@@ -543,7 +546,8 @@ static void ath_tx_complete_aggr(struct @@ -540,7 +543,8 @@ static void ath_tx_complete_aggr(struct
ath_tx_complete_buf(sc, bf, txq, ath_tx_complete_buf(sc, bf, txq,
&bf_head, &bf_head,
@ -41,7 +41,7 @@
sta); sta);
break; break;
} }
@@ -1447,6 +1451,7 @@ static void ath_drain_txq_list(struct at @@ -1446,6 +1450,7 @@ static void ath_drain_txq_list(struct at
struct ath_tx_status ts; struct ath_tx_status ts;
memset(&ts, 0, sizeof(ts)); memset(&ts, 0, sizeof(ts));