From: Miri Korenblit Date: Thu, 19 Feb 2026 09:47:15 +0000 (+0200) Subject: wifi: nl80211: don't allow DFS channels for NAN X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a34951ef56b0fc2ce2feff32a1ac71dbd8e3b998;p=thirdparty%2Flinux.git wifi: nl80211: don't allow DFS channels for NAN NAN cannot use DFS channels. Mark DFS channels as unusable if the chandef is to be used for NAN. Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20260108102921.c2a5a0a14b9f.Idca29fb8a235df980e63b733a298fd1f2bdf2f48@changeid Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20260219094725.3846371-3-miriam.rachel.korenblit@intel.com Signed-off-by: Johannes Berg --- diff --git a/net/wireless/chan.c b/net/wireless/chan.c index dfe319565280f..d9d4e043bb392 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c @@ -781,6 +781,7 @@ int cfg80211_chandef_dfs_required(struct wiphy *wiphy, case NL80211_IFTYPE_AP: case NL80211_IFTYPE_P2P_GO: case NL80211_IFTYPE_MESH_POINT: + case NL80211_IFTYPE_NAN: width = cfg80211_chandef_get_width(chandef); if (width < 0) return -EINVAL; @@ -795,7 +796,6 @@ int cfg80211_chandef_dfs_required(struct wiphy *wiphy, case NL80211_IFTYPE_MONITOR: case NL80211_IFTYPE_AP_VLAN: case NL80211_IFTYPE_P2P_DEVICE: - case NL80211_IFTYPE_NAN: break; case NL80211_IFTYPE_WDS: case NL80211_IFTYPE_UNSPECIFIED: