diff options
author | Mathy Vanhoef <Mathy.Vanhoef@kuleuven.be> | 2020-07-23 14:01:51 +0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2020-07-31 09:27:01 +0200 |
commit | 2b3dab1353209256cb3d7e07f14584eac8c82508 (patch) | |
tree | ed708eb144139aba44638263919da55a43556c66 /net/mac80211/scan.c | |
parent | 29c3e95f79adcef9d7999ec643639033585dba08 (diff) | |
download | lwn-2b3dab1353209256cb3d7e07f14584eac8c82508.tar.gz lwn-2b3dab1353209256cb3d7e07f14584eac8c82508.zip |
mac80211: use same flag everywhere to avoid sequence number overwrite
Use the IEEE80211_TX_CTRL_NO_SEQNO flag in ieee80211_tx_info to mark
probe requests whose sequence number must not be overwritten. This
provides consistency with the radiotap flag that can be set to indicate
that the sequence number of an injected frame should not be overwritten.
Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@kuleuven.be>
Link: https://lore.kernel.org/r/20200723100153.31631-4-Mathy.Vanhoef@kuleuven.be
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/scan.c')
-rw-r--r-- | net/mac80211/scan.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 8003be6dae8a..032f55d38f7d 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -591,7 +591,6 @@ static void ieee80211_send_scan_probe_req(struct ieee80211_sub_if_data *sdata, struct ieee80211_channel *channel) { struct sk_buff *skb; - u32 txdata_flags = 0; skb = ieee80211_build_probe_req(sdata, src, dst, ratemask, channel, ssid, ssid_len, @@ -600,15 +599,15 @@ static void ieee80211_send_scan_probe_req(struct ieee80211_sub_if_data *sdata, if (skb) { if (flags & IEEE80211_PROBE_FLAG_RANDOM_SN) { struct ieee80211_hdr *hdr = (void *)skb->data; + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); u16 sn = get_random_u32(); - txdata_flags |= IEEE80211_TX_NO_SEQNO; + info->control.flags |= IEEE80211_TX_CTRL_NO_SEQNO; hdr->seq_ctrl = cpu_to_le16(IEEE80211_SN_TO_SEQ(sn)); } IEEE80211_SKB_CB(skb)->flags |= tx_flags; - ieee80211_tx_skb_tid_band(sdata, skb, 7, channel->band, - txdata_flags); + ieee80211_tx_skb_tid_band(sdata, skb, 7, channel->band, 0); } } |