Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

wifi: cfg80211: allow only one NAN interface, also in multi radio

According to Wi-Fi Aware (TM) 4.0 specification 2.8, A NAN device can
have one NAN management interface. This applies also to multi radio
devices.
The current code allows a driver to support more than one NAN interface,
if those are not in the same radio.

Fix it.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260107135129.fdaecec0fe8a.I246b5ba6e9da3ec1481ff197e47f6ce0793d7118@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Miri Korenblit and committed by
Johannes Berg
e69fda4d c34dbc59

+2 -6
+2 -6
net/wireless/core.c
··· 661 661 c->limits[j].max > 1)) 662 662 return -EINVAL; 663 663 664 - /* Only a single NAN can be allowed, avoid this 665 - * check for multi-radio global combination, since it 666 - * hold the capabilities of all radio combinations. 667 - */ 668 - if (!combined_radio && 669 - WARN_ON(types & BIT(NL80211_IFTYPE_NAN) && 664 + /* Only a single NAN can be allowed */ 665 + if (WARN_ON(types & BIT(NL80211_IFTYPE_NAN) && 670 666 c->limits[j].max > 1)) 671 667 return -EINVAL; 672 668