]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mac80211: fix tx sequence number assignment with software queue + fast-xmit
authorFelix Fietkau <nbd@openwrt.org>
Thu, 24 Sep 2015 12:59:48 +0000 (14:59 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 29 Sep 2015 13:56:51 +0000 (15:56 +0200)
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>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/tx.c

index 73540723be37a29cf6f5282fab14ac46bb8c8706..464ba1a625bdc9aa82f4de53d60cdc341b0d0565 100644 (file)
@@ -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);