wifi: mac80211: allow userspace TX/RX over NAN Data interfaces

Allow TX/RX of action frames (for NAN action frames) over
NAN Data interfaces to support cases where there's a secure
NDP and NAFs may be exchanged over that.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260504101829.4ac207c60ebb.Ic4b1c90552497b7ff2616651a408e5fe8bde7b99@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Ilan Peer 2026-05-04 10:20:42 +03:00 committed by Johannes Berg
parent 43ef5856bd
commit 5f244f17ec
3 changed files with 14 additions and 4 deletions

View File

@ -750,6 +750,10 @@ ieee80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = {
.rx = BIT(IEEE80211_STYPE_ACTION >> 4) |
BIT(IEEE80211_STYPE_AUTH >> 4),
},
[NL80211_IFTYPE_NAN_DATA] = {
.tx = 0xffff,
.rx = BIT(IEEE80211_STYPE_ACTION >> 4),
},
};
static const struct ieee80211_ht_cap mac80211_ht_capa_mod_mask = {

View File

@ -8,7 +8,7 @@
* Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
* Copyright 2007, Michael Wu <flamingice@sourmilk.net>
* Copyright 2009 Johannes Berg <johannes@sipsolutions.net>
* Copyright (C) 2019, 2022-2025 Intel Corporation
* Copyright (C) 2019, 2022-2026 Intel Corporation
*/
#include <linux/export.h>
#include <net/mac80211.h>
@ -898,6 +898,10 @@ int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
break;
case NL80211_IFTYPE_NAN:
break;
case NL80211_IFTYPE_NAN_DATA:
if (is_multicast_ether_addr(mgmt->da))
return -EOPNOTSUPP;
break;
default:
return -EOPNOTSUPP;
}
@ -911,7 +915,8 @@ int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
/* Check if the operating channel is the requested channel */
if (!params->chan && mlo_sta) {
need_offchan = false;
} else if (sdata->vif.type == NL80211_IFTYPE_NAN) {
} else if (sdata->vif.type == NL80211_IFTYPE_NAN ||
sdata->vif.type == NL80211_IFTYPE_NAN_DATA) {
/* Frames can be sent during NAN schedule */
} else if (!need_offchan) {
struct ieee80211_chanctx_conf *chanctx_conf = NULL;

View File

@ -5,7 +5,7 @@
* Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
* Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
* Copyright 2013-2014 Intel Mobile Communications GmbH
* Copyright (C) 2018-2025 Intel Corporation
* Copyright (C) 2018-2026 Intel Corporation
*
* Transmit and frame generation functions.
*/
@ -6377,7 +6377,8 @@ void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata,
enum nl80211_band band;
rcu_read_lock();
if (sdata->vif.type == NL80211_IFTYPE_NAN) {
if (sdata->vif.type == NL80211_IFTYPE_NAN ||
sdata->vif.type == NL80211_IFTYPE_NAN_DATA) {
band = NUM_NL80211_BANDS;
} else if (!ieee80211_vif_is_mld(&sdata->vif)) {
WARN_ON(link_id >= 0);