From: Mathy Vanhoef Date: Thu, 23 Jul 2020 10:01:50 +0000 (+0400) Subject: mac80211: do not overwrite the sequence number if requested X-Git-Tag: v5.10.7~1943^2~76^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=29c3e95f79adcef9d7999ec643639033585dba08;p=platform%2Fkernel%2Flinux-rpi.git mac80211: do not overwrite the sequence number if requested Check if the Tx control flag is set to prevent sequence number overwrites, and if so, do not assign a new sequence number to the transmitted frame. Signed-off-by: Mathy Vanhoef Link: https://lore.kernel.org/r/20200723100153.31631-3-Mathy.Vanhoef@kuleuven.be Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 4133450..e1e915e 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -825,6 +825,9 @@ ieee80211_tx_h_sequence(struct ieee80211_tx_data *tx) if (ieee80211_is_qos_nullfunc(hdr->frame_control)) return TX_CONTINUE; + if (info->control.flags & IEEE80211_TX_CTRL_NO_SEQNO) + return TX_CONTINUE; + /* * Anything but QoS data that has a sequence number field * (is long enough) gets a sequence number from the global