]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: cfg80211: allow only one NAN interface, also in multi radio
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Wed, 7 Jan 2026 11:51:57 +0000 (13:51 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 19 Jan 2026 09:18:05 +0000 (10:18 +0100)
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>
net/wireless/core.c

index d0c7d9ff03b34282447b3f55767b6ab4b0045347..91f99208fb34522bc77465768c9da211533bca5a 100644 (file)
@@ -661,12 +661,8 @@ int wiphy_verify_iface_combinations(struct wiphy *wiphy,
                                    c->limits[j].max > 1))
                                return -EINVAL;
 
-                       /* Only a single NAN can be allowed, avoid this
-                        * check for multi-radio global combination, since it
-                        * hold the capabilities of all radio combinations.
-                        */
-                       if (!combined_radio &&
-                           WARN_ON(types & BIT(NL80211_IFTYPE_NAN) &&
+                       /* Only a single NAN can be allowed */
+                       if (WARN_ON(types & BIT(NL80211_IFTYPE_NAN) &&
                                    c->limits[j].max > 1))
                                return -EINVAL;