mbox series

[RFC,0/5] wifi: nl80211: Extend NAN APIs to allow more flexible implementations

Message ID 20250622222444.356435-1-andrei.otcheretianski@intel.com
Headers show
Series wifi: nl80211: Extend NAN APIs to allow more flexible implementations | expand

Message

Andrei Otcheretianski June 22, 2025, 10:24 p.m. UTC
This patch series extends exiting NAN APIs to support more
configuration options for NAN synchronization and a user space oriented
NAN Service Discovery implementation.
Existing NAN APIs are very limited and not really used, resulting in
vendors using proprietary vendor commands and a need to offload NAN
protocol implementations to the device firmware or driver.
In this series, additional APIs are added which allow to extend the
configuration of the NAN Synchronization logic and support user space
oriented NAN Service Discovery implementation.
With this design, wireless devices/drivers are still required to
implement NAN synchronization and cluster merging. NAN Discovery Engine,
may be either offloaded (keep using the existing APIs) or alternatively
implemented in user space.
To support user space oriented NAN Discovery Engine, the device will
notify user space with %NL80211_CMD_NAN_NEXT_DW_NOTIFICATION about the
upcoming Discovery Window (DW). This notification should be used as a
trigger for transmission of uncsolicited multicast SDF's (i.e.
unsolicited publish and active subscribe). Once SDF transmission is
requested with %NL80211_CMD_FRAME, the device shall take care of the
actual frame transmission during the upcoming DW.
Note, this notification may be sent before the actual DW start time.
On DW termination, the device/driver shall flush all untransmitted NAN
management frames. Untransmitted frames shall not be carried forward to
the next DW.
Note that such approach may not be appropriate for highly power
efficient devices or scenarios that require long discovery sessions, as
it may require the host to wake up for each DW.
User space can in turn turn off this notification using
%NL80211_NAN_CONF_NOTIFY_DW configuration flag if it doesn't intend to
send unsolicited multicast SDFs to prevent unneeded wake ups.

%NL80211_CMD_NAN_CLUSTER_JOINED notification shall be sent once after
new NAN cluster has been started or the device has joined an existing
cluster. In addition each time, cluster merge procedure results in
cluster merging, user space shall be notified. This is required, as
cluster ID is used as address 3 in SDF frames. Untransmitted frames
should be flushed, when this notification is generated in order to
prevent transmission of SDFs with invalid address 3.

This patch series goal is to provide APIs to support NAN synchronization
and user space oriented Service Discovery. It will be further extended
in a separate patch set to support user space implementation of NAN data
path (NDP) and NDL schedule establishment.

Andrei Otcheretianski (5):
  wifi: nl80211: Add more configuration options for NAN commands
  wifi: nl80211: Add more NAN capabilities
  wifi: nl80211: Add NAN Discovery Window (DW) notification
  wifi: cfg80211: Add cfg80211_next_nan_dw_notif() API
  wifi: cfg80211: Add cluster joined notification API's

 include/net/cfg80211.h       |  95 +++++++++
 include/uapi/linux/nl80211.h | 144 +++++++++++++-
 net/wireless/nl80211.c       | 373 +++++++++++++++++++++++++++++++----
 net/wireless/trace.h         |  34 ++++
 4 files changed, 607 insertions(+), 39 deletions(-)