summaryrefslogtreecommitdiff
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2020-01-31 13:12:58 +0200
committerJohannes Berg <johannes.berg@intel.com>2020-03-20 14:42:20 +0100
commit660d81dae895a61da5774bc70f43ef30fb878f64 (patch)
tree114a57fff64617de7c19615be3e91fba8ce66dd1 /net/mac80211/util.c
parent0c138a5c2bcf3afeff722fb71782bf8e798b4a1b (diff)
mac80211: consider WLAN_EID_EXT_HE_OPERATION for parsing CRC
We use the parsing CRC for checking if the beacon changed, and if the WLAN_EID_EXT_HE_OPERATION extended element changes we need to track it so we can react to that. Include it in the CRC calculation. Link: https://lore.kernel.org/r/20200131111300.891737-22-luca@coelho.fi Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index ea7d277a8c45..20436c86b9bf 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -912,8 +912,12 @@ static void ieee80211_parse_extension_element(u32 *crc,
break;
case WLAN_EID_EXT_HE_OPERATION:
if (len >= sizeof(*elems->he_operation) &&
- len == ieee80211_he_oper_size(data) - 1)
+ len == ieee80211_he_oper_size(data) - 1) {
+ if (crc)
+ *crc = crc32_be(*crc, (void *)elem,
+ elem->datalen + 2);
elems->he_operation = data;
+ }
break;
case WLAN_EID_EXT_UORA:
if (len == 1)