summaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2018-05-28 15:47:41 +0200
committerJohannes Berg <johannes@sipsolutions.net>2018-06-15 13:34:40 +0200
commitb9771d41aee7aa3207b985422a1cc19e8342bc50 (patch)
tree13413533108492a4bb95aa282abf426fab1d707e /net/mac80211/util.c
parentnl80211: add scan features for improved scan privacy (diff)
downloadlinux-b9771d41aee7aa3207b985422a1cc19e8342bc50.tar.xz
linux-b9771d41aee7aa3207b985422a1cc19e8342bc50.zip
mac80211: support scan features for improved scan privacy
Support the new random SN and minimal probe request contents scan flags for the case of software scan - for hardware scan the drivers need to opt in, but may need to do only that, depending on their implementation. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 0325133552ad..b744b10465c3 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1433,6 +1433,9 @@ static int ieee80211_build_preq_ies_band(struct ieee80211_local *local,
chandef->chan->center_freq);
}
+ if (flags & IEEE80211_PROBE_FLAG_MIN_CONTENT)
+ goto done;
+
/* insert custom IEs that go before HT */
if (ie && ie_len) {
static const u8 before_ht[] = {
@@ -1510,6 +1513,7 @@ static int ieee80211_build_preq_ies_band(struct ieee80211_local *local,
return pos - buffer;
out_err:
WARN_ONCE(1, "not enough space for preq IEs\n");
+ done:
return pos - buffer;
}