mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
wifi: nl80211: fix NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST usage
This is documented as a u8 and has a policy of NLA_U8, but uses
nla_get_u32() which means it's completely broken on big-endian.
Fix it to use nla_get_u8().
Fixes: 9bb7e0f24e ("cfg80211: add peer measurement with FTM initiator API")
Link: https://patch.msgid.link/20260505113837.260159-2-johannes@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
283fc9e44f
commit
0f3c0a1973
|
|
@ -88,7 +88,7 @@ static int pmsr_parse_ftm(struct cfg80211_registered_device *rdev,
|
|||
out->ftm.ftms_per_burst = 0;
|
||||
if (tb[NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST])
|
||||
out->ftm.ftms_per_burst =
|
||||
nla_get_u32(tb[NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST]);
|
||||
nla_get_u8(tb[NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST]);
|
||||
|
||||
if (capa->ftm.max_ftms_per_burst &&
|
||||
(out->ftm.ftms_per_burst > capa->ftm.max_ftms_per_burst ||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user