public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Miri Korenblit <miriam.rachel.korenblit@intel.com>
To: linux-wireless@vger.kernel.org
Cc: Avraham Stern <avraham.stern@intel.com>,
	Johannes Berg <johannes.berg@intel.com>
Subject: [PATCH v5 wireless-next 12/12] wifi: cfg80211: allow protected action frame TX for NAN
Date: Wed, 18 Mar 2026 14:39:26 +0200	[thread overview]
Message-ID: <20260318143604.73801a92180c.I16000c3e1e2bbc320457db1ac728d789bb2f36c6@changeid> (raw)
In-Reply-To: <20260318123926.206536-1-miriam.rachel.korenblit@intel.com>

From: Avraham Stern <avraham.stern@intel.com>

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>
---
 net/wireless/mlme.c    | 9 +++++++--
 net/wireless/nl80211.c | 2 ++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index e817ee297df0..bd72317c4964 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -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;
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 0c4d6e8b45b2..9e7f02d1c7ef 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -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 &
-- 
2.34.1


      parent reply	other threads:[~2026-03-18 12:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-18 12:39 [PATCH v5 wireless-next 00/12] wifi: cfg80211/nl80211: Add NAN Data Path support Miri Korenblit
2026-03-18 12:39 ` [PATCH v5 wireless-next 01/12] wifi: cfg80211: Add an API to configure local NAN schedule Miri Korenblit
2026-03-18 12:39 ` [PATCH v5 wireless-next 02/12] wifi: cfg80211: make sure NAN chandefs are valid Miri Korenblit
2026-03-18 12:39 ` [PATCH v5 wireless-next 03/12] wifi: cfg80211: add support for NAN data interface Miri Korenblit
2026-03-18 12:39 ` [PATCH v5 wireless-next 04/12] wifi: cfg80211: separately store HT, VHT and HE capabilities for NAN Miri Korenblit
2026-03-18 12:39 ` [PATCH v5 wireless-next 05/12] wifi: nl80211: add support for NAN stations Miri Korenblit
2026-03-18 12:39 ` [PATCH v5 wireless-next 06/12] wifi: nl80211: define an API for configuring the NAN peer's schedule Miri Korenblit
2026-03-18 12:39 ` [PATCH v5 wireless-next 07/12] wifi: cfg80211: allow ToDS=0/FromDS=0 data frames on NAN data interfaces Miri Korenblit
2026-03-18 12:39 ` [PATCH v5 wireless-next 08/12] wifi: nl80211: allow reporting spurious NAN Data frames Miri Korenblit
2026-03-18 12:39 ` [PATCH v5 wireless-next 09/12] wifi: nl80211: add NL80211_CMD_NAN_ULW_UPDATE notification Miri Korenblit
2026-03-18 12:39 ` [PATCH v5 wireless-next 10/12] wifi: nl80211: Add a notification to notify NAN channel evacuation Miri Korenblit
2026-03-18 12:39 ` [PATCH v5 wireless-next 11/12] wifi: ieee80211: Add some missing NAN definitions Miri Korenblit
2026-03-18 12:39 ` Miri Korenblit [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260318143604.73801a92180c.I16000c3e1e2bbc320457db1ac728d789bb2f36c6@changeid \
    --to=miriam.rachel.korenblit@intel.com \
    --cc=avraham.stern@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox