]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: cfg80211: allow protected action frame TX for NAN
authorAvraham Stern <avraham.stern@intel.com>
Wed, 18 Mar 2026 12:39:26 +0000 (14:39 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 25 Mar 2026 19:56:56 +0000 (20:56 +0100)
Allow transmitting protected dual of public action frames on
NAN device and NAN data interfaces, since NAN action frames
may be protected and can be sent on both.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260318143604.73801a92180c.I16000c3e1e2bbc320457db1ac728d789bb2f36c6@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/mlme.c
net/wireless/nl80211.c

index e817ee297df029e6d8c3a65fcd1319f71fa6cfac..bd72317c4964e25031504b611511d1e7cd70f192 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Copyright (c) 2009, Jouni Malinen <j@w1.fi>
  * Copyright (c) 2015          Intel Deutschland GmbH
- * Copyright (C) 2019-2020, 2022-2025 Intel Corporation
+ * Copyright (C) 2019-2020, 2022-2026 Intel Corporation
  */
 
 #include <linux/kernel.h>
@@ -933,12 +933,17 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
                         * cfg80211 doesn't track the stations
                         */
                        break;
+               case NL80211_IFTYPE_NAN:
+               case NL80211_IFTYPE_NAN_DATA:
+                       if (mgmt->u.action.category !=
+                           WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION)
+                               err = -EOPNOTSUPP;
+                       break;
                case NL80211_IFTYPE_P2P_DEVICE:
                        /*
                         * fall through, P2P device only supports
                         * public action frames
                         */
-               case NL80211_IFTYPE_NAN:
                default:
                        err = -EOPNOTSUPP;
                        break;
index d65ebba0970bf462b06b1a5dbab9163640b129d1..f334cdef895870b5af58d45241dc90dd49fcf314 100644 (file)
@@ -14207,6 +14207,7 @@ static int nl80211_register_mgmt(struct sk_buff *skb, struct genl_info *info)
        case NL80211_IFTYPE_P2P_DEVICE:
                break;
        case NL80211_IFTYPE_NAN:
+       case NL80211_IFTYPE_NAN_DATA:
                if (!wiphy_ext_feature_isset(wdev->wiphy,
                                             NL80211_EXT_FEATURE_SECURE_NAN) &&
                    !(wdev->wiphy->nan_capa.flags &
@@ -14270,6 +14271,7 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
        case NL80211_IFTYPE_P2P_GO:
                break;
        case NL80211_IFTYPE_NAN:
+       case NL80211_IFTYPE_NAN_DATA:
                if (!wiphy_ext_feature_isset(wdev->wiphy,
                                             NL80211_EXT_FEATURE_SECURE_NAN) &&
                    !(wdev->wiphy->nan_capa.flags &