Commit 78e3bd01 authored by Ilan Peer's avatar Ilan Peer Committed by Johannes Berg
Browse files

wifi: cfg80211: Support Tx/Rx of action frame for NAN



Add support for sending and receiving action frames over a NAN Device
interface:

- For Synchronized NAN operation NAN Service Discovery
  Frames (SDFs) and NAN Action Frames (NAFs) transmissions
  over a NAN Device interface, a channel parameter is not
  mandatory as the frame can be transmitted based on the NAN
  Device schedule.
- For Unsynchronized NAN Discovery (USD) operation the
  SDFs and NAFs could be transmitted using NL80211_CMD_FRAME
  where a specific channel and dwell time are configured.

As Synchronized NAN Operation and USD can be done concurrently,
both modes need to be supported. Thus, allow sending NAN action
frames when user space handles the NAN Discovery Engine (DE) with
and without providing a channel as a parameter.

To support reception of NAN Action frames and Authentication
frames (used for NAN paring and verification) allow to
register for management frame reception of NAN Device interface
when user space handles the NAN DE.

Signed-off-by: default avatarIlan Peer <ilan.peer@intel.com>
Signed-off-by: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250908140015.71da2b062929.I0166d51dcf14393f628cd5da366c21114f518618@changeid


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent b9c3d426
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -13782,7 +13782,9 @@ static int nl80211_register_mgmt(struct sk_buff *skb, struct genl_info *info)
		break;
	case NL80211_IFTYPE_NAN:
		if (!wiphy_ext_feature_isset(wdev->wiphy,
					     NL80211_EXT_FEATURE_SECURE_NAN))
					     NL80211_EXT_FEATURE_SECURE_NAN) &&
		    !(wdev->wiphy->nan_capa.flags &
		      WIPHY_NAN_FLAGS_USERSPACE_DE))
			return -EOPNOTSUPP;
		break;
	default:
@@ -13843,7 +13845,9 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
		break;
	case NL80211_IFTYPE_NAN:
		if (!wiphy_ext_feature_isset(wdev->wiphy,
					     NL80211_EXT_FEATURE_SECURE_NAN))
					     NL80211_EXT_FEATURE_SECURE_NAN) &&
		    !(wdev->wiphy->nan_capa.flags &
		      WIPHY_NAN_FLAGS_USERSPACE_DE))
			return -EOPNOTSUPP;
		break;
	default: