mac80211: check the correct bit for EMA AP
authorShaul Triebitz <shaul.triebitz@intel.com>
Thu, 28 May 2020 19:34:37 +0000 (21:34 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Fri, 5 Feb 2021 10:39:41 +0000 (11:39 +0100)
commit02b0989fc0337cb39b15c231bedc997e5cd9ed79
tree3fbfff0f9a16d10beeb067d8088f221220d58afc
parent443be91bba92b61d625fb889af3d53fbaa6b12f0
mac80211: check the correct bit for EMA AP

An AP supporting EMA (Enhanced Multi-BSSID advertisement) should set
bit 83 in the extended capabilities IE (9.4.2.26 in the 802.11ax D5 spec).
So the *3rd* bit of the 10th byte should be checked.
Also, in one place, the wrong byte was checked.
(cfg80211_find_ie returns a pointer to the beginning of the IE,
 so the data really starts at ie[2], so the 10th byte
 should be ie[12]. To avoid this confusion, use cfg80211_find_elem
 instead).

Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Link: https://lore.kernel.org/r/20200528213443.4316121fa2a3.I9745582f8d41ad8e689dac0fefcd70b276d7c1ea@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
include/linux/ieee80211.h