]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: cfg80211: don't allow NAN DATA on multi radio devices
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Tue, 5 May 2026 16:46:13 +0000 (19:46 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 6 May 2026 09:41:01 +0000 (11:41 +0200)
The support for NAN DATA was added for single radio devices only. For
example, checking the interface combinations is done for a single radio.
Prevent registration with NAN DATA interface type for multi radio
devices.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260505194607.ff87e6fcff56.If201aa58119d2a6b08223ecb63bc2869f63ff5a1@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/core.c

index 4dd1981a36296c8c0569e1efbc3a7c71bb0e364a..62ab5e4639be1b18a99ff0723336ae1bfbadb5c1 100644 (file)
@@ -882,7 +882,7 @@ int wiphy_register(struct wiphy *wiphy)
                return -EINVAL;
 
        if (WARN_ON((wiphy->interface_modes & BIT(NL80211_IFTYPE_NAN_DATA)) &&
-                   !wiphy->nan_capa.phy.ht.ht_supported))
+                   (!wiphy->nan_capa.phy.ht.ht_supported || wiphy->n_radio > 1)))
                return -EINVAL;
 
        if (WARN_ON(wiphy->interface_modes & BIT(NL80211_IFTYPE_WDS)))