[RFC 00/56] Initial NAN R2 module support

Andrei Otcheretianski andrei.otcheretianski at intel.com
Sun Dec 7 03:18:09 PST 2025


This series is an RFC initial proposal for NAN R2 module implementation.
This includes an implementation for NDP and NDL state machines including
the security negotiation.

These patches should be applied on top of the rebased "Add initial
support for NAN synchronized discovery" patch series.

In this submission, we only include the NAN data path module
implementation, without any layer which connects it to wpa_supplicant
and driver APIs. Testing coverage is done using module tests.

Design summary:
NDP establishment is triggered using nan_handle_ndp_setup() function
which is called both for triggering NDP request and replying to an
incoming ndp request. nan_action_rx(), nan_tx_status() and send_naf()
callback are used to send and receive NAFs and their statuses in the NAN
module. ndp_action_notif() callback is used to notify about the incoming NDP
request/counter response events. ndp_[dis]connected() callbacks are
called upon completion of NDP and NDL establishment.

In the current design, NDP and NDL state machines are managed in the NAN
module. Note that NDL SM doesn't manage actual device scheduling and it
is assumed that the schedule is configured outside of NAN module and
provided as part of nan_ndp_params struct. Having said that, NAN module
manages NDL state transitions and decides internally whether to
accept/counter or reject the NDL establishment based on the configured
schedule, NDC, QoS parameters etc.

Upper layers (wpa_supplicant, ctrl_iface, driver) are expected to be
able to configure the underlying device with the provided schedule and
configure the corresponding peer schedule. The derived NDP parameters
(peer NDI address and keys) are either provided as part of NDP
notifications or can be queried via provided APIs. wpa_supplicant should
be able to configure this information to the underlying device.

Wpa_supplicant, ctrl_iface and driver corresponding implemenation will
be submitted separately.


Ilan Peer (56):
  NAN: Rename a NAN attribute name
  NAN: Add Data path and scheduling definition
  NAN: Add Data path security definitions
  NAN: Change the return value of nan_de_rx_sdf()
  NAN: Keep a list of known peers and their attributes
  NAN: Add support for parsing NAN action frames
  NAN: Add a function to add device capability attribute
  NAN: Introduce NDP data structures
  NAN: Support handling NDP state machine and operations
  NAN: Define data structure to represent a NAN schedule.
  NAN: Add support for parsing NAN availability attribute
  NAN: Add support for parsing device capability attributes
  NAN: Add support for parsing element container attributes
  common: Add some helper functions
  utils: Add few more functions to bitfield module
  NAN: Add utility function to convert channel to bitmap
  NAN: Initial support for NDL state machine and operations
  NAN: Add support for building schedule related attributes
  NAN: Add Tx status notification to NDL
  NAN: Add support for adding availability attributes
  NAN: Add potential availability entries
  NAN: Add support for converting NAN schedule entries to availability
  NAN: Add utility functions for NAN schedule validation
  NAN: Add validation of peer availability
  NAN: Properly set the NDL status in a response and confirm
  NAN: Reject NDLs with overlapping time bitmaps
  NAN: Add an API to update the cluster ID
  NAN: Add send_naf() callback support
  NAN: Add a function to add element container attribute
  NAN: Add support for building a NAF
  NAN: Process NAN Action frame
  NAN: Add Tx status handling
  NAN: Add API to request/response/terminate an NDP
  NAN: Support handling NDP termination from peer in NDP SM
  NAN: Add support for terminating an NDP
  NAN: Add NAN cryptographic functions
  NAN: Add support for NDP security Rx flow
  NAN: Add support for adding security attributes
  NAN: Add handling of pre Tx security operations
  NAN: Support security processing on NDP done
  NAN: Handle security in NDP processing
  NAN: Add security configuration to NDP request/response
  NAN: Add security support in NAF transmit flow
  NAN: Extend the nan_ndp_action_notif() callback to include security
  NAN: Add a callback to allow verifying publish instance ID
  NAN: Add an API to get a peer device capabilities
  NAN: Add an API to retrieve TK
  NAN: Add an API to get committed/conditional schedule of a peer
  NAN: Add an API to get the potential availability of a peer
  NAN: Add an API to convert a schedule into a buffer
  NAN: Support parsing peer device capability extension attribute
  NAN: Add device capability extension attributes to NAFs
  NAN: Add test utility for NAN module
  NAN: Add crypto API tests
  NAN: Add NAN module testing for secure state machine
  NAN: Add testing coverage for multiple NDP setups

 src/common/ieee802_11_common.c     |  146 ++
 src/common/ieee802_11_common.h     |    5 +
 src/common/ieee802_11_defs.h       |   11 +
 src/common/nan_de.c                |  124 +-
 src/common/nan_de.h                |    4 +-
 src/common/nan_defs.h              |  467 ++++++-
 src/nan/Makefile                   |    8 +-
 src/nan/nan.c                      | 2015 ++++++++++++++++++++++++++++
 src/nan/nan.h                      |  499 +++++++
 src/nan/nan_crypto.c               |  398 ++++++
 src/nan/nan_i.h                    |  591 ++++++++
 src/nan/nan_module_test_cases.c    |  810 +++++++++++
 src/nan/nan_module_tests.c         | 1453 ++++++++++++++++++++
 src/nan/nan_module_tests.h         |  145 ++
 src/nan/nan_ndl.c                  | 1760 ++++++++++++++++++++++++
 src/nan/nan_ndp.c                  | 1015 ++++++++++++++
 src/nan/nan_sec.c                  | 1206 +++++++++++++++++
 src/nan/nan_util.c                 | 1634 ++++++++++++++++++++++
 src/utils/bitfield.c               |  158 +++
 src/utils/bitfield.h               |   12 +
 src/utils/common.h                 |    2 +
 src/utils/module_tests.h           |    1 +
 src/utils/utils_module_tests.c     |   75 +-
 wpa_supplicant/Makefile            |    9 +
 wpa_supplicant/nan_supplicant.c    |   32 +-
 wpa_supplicant/wpas_module_tests.c |    5 +
 26 files changed, 12519 insertions(+), 66 deletions(-)
 create mode 100644 src/nan/nan_crypto.c
 create mode 100644 src/nan/nan_module_test_cases.c
 create mode 100644 src/nan/nan_module_tests.c
 create mode 100644 src/nan/nan_module_tests.h
 create mode 100644 src/nan/nan_ndl.c
 create mode 100644 src/nan/nan_ndp.c
 create mode 100644 src/nan/nan_sec.c
 create mode 100644 src/nan/nan_util.c

-- 
2.49.0




More information about the Hostap mailing list