mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable.git
synced 2025-09-13 11:07:46 +10:00
wifi: cfg80211: Fix interface type validation
[ Upstream commit 14450be233
]
Fix a condition that verified valid values of interface types.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250709233537.7ad199ca5939.I0ac1ff74798bf59a87a57f2e18f2153c308b119b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
f937759c74
commit
0bb4319e6c
@ -510,7 +510,7 @@ ieee80211_get_sband_iftype_data(const struct ieee80211_supported_band *sband,
|
||||
{
|
||||
int i;
|
||||
|
||||
if (WARN_ON(iftype >= NL80211_IFTYPE_MAX))
|
||||
if (WARN_ON(iftype >= NUM_NL80211_IFTYPES))
|
||||
return NULL;
|
||||
|
||||
if (iftype == NL80211_IFTYPE_AP_VLAN)
|
||||
|
Loading…
Reference in New Issue
Block a user