wifi: ieee80211: add helper to validate ML element type and size
authorBenjamin Berg <benjamin.berg@intel.com>
Sun, 18 Jun 2023 18:49:46 +0000 (21:49 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 19 Jun 2023 10:05:30 +0000 (12:05 +0200)
commiteeec7574ec3c03c69adc99492df74dc1cc0ebd63
tree097d2a1b7a87f89586edba317e313f636d3fc9a9
parentce6e1f600b0cfc563a7d607de702262a58cd835d
wifi: ieee80211: add helper to validate ML element type and size

The helper functions to retrieve the EML capabilities and medium
synchronization delay both assume that the type is correct. Instead of
assuming the length is correct and still checking the type, add a new
helper to check both and don't do any verification.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230618214435.1b50e7a3b3cf.I9385514d8eb6d6d3c82479a6fa732ef65313e554@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/linux/ieee80211.h
net/mac80211/mlme.c