mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 06:41:39 -04:00
wifi: nl80211: fix UHR capability validation
The ieee80211_uhr_capa_size_ok() function returns a boolean,
but we need an error code here. Fix that.
Fixes: 072e6f7f41 ("wifi: cfg80211: add initial UHR support")
Cc: <stable+noautosel@kernel.org> # no drivers with UHR yet
Link: https://patch.msgid.link/20260303151614.e87ea9995be5.Ie164040a51855a3e548f05f0d0291d7d7993c7ee@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
@@ -339,7 +339,9 @@ static int validate_uhr_capa(const struct nlattr *attr,
|
||||
const u8 *data = nla_data(attr);
|
||||
unsigned int len = nla_len(attr);
|
||||
|
||||
return ieee80211_uhr_capa_size_ok(data, len, false);
|
||||
if (!ieee80211_uhr_capa_size_ok(data, len, false))
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* policy for the attributes */
|
||||
|
||||
Reference in New Issue
Block a user