diff mbox

[4.3,1/2] mac80211: fix tx sequence number assignment with software queue + fast-xmit

Message ID 1443099589-69793-1-git-send-email-nbd@openwrt.org (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show

Commit Message

Felix Fietkau Sept. 24, 2015, 12:59 p.m. UTC
When using software queueing, tx sequence number assignment happens at
ieee80211_tx_dequeue time, so the fast-xmit codepath must not do that.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
 net/mac80211/tx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Johannes Berg Sept. 24, 2015, 2:31 p.m. UTC | #1
On Thu, 2015-09-24 at 14:59 +0200, Felix Fietkau wrote:
> When using software queueing, tx sequence number assignment happens 
> at
> ieee80211_tx_dequeue time, so the fast-xmit codepath must not do 
> that.
> 
Applied, but to mac80211-next since there's no driver in 4.3 yet that
actually uses ieee80211_tx_dequeue().

johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 84e0e8c..af058eb 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2767,7 +2767,8 @@  static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,
 
 	if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) {
 		*ieee80211_get_qos_ctl(hdr) = tid;
-		hdr->seq_ctrl = ieee80211_tx_next_seq(sta, tid);
+		if (!sta->sta.txq[0])
+			hdr->seq_ctrl = ieee80211_tx_next_seq(sta, tid);
 	} else {
 		info->flags |= IEEE80211_TX_CTL_ASSIGN_SEQ;
 		hdr->seq_ctrl = cpu_to_le16(sdata->sequence_number);