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)
committerChristian Lamparter <chunkeey@gmail.com>
Sat, 16 Sep 2023 21:48:57 +0000 (23:48 +0200)
commitab03121d999b53d1115abd54b6a669cefcd367b9
tree0d9f2d5ef4450b44e773685d8d6604b8f302f254
parentcbee1b9760c3c8a8897d85683e46b03f3177b089
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>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
include/linux/ieee80211.h