|
|
Log in / Subscribe / Register

NAN synchronization for mac80211_hwsim

From:  Benjamin Berg <benjamin-AT-sipsolutions.net>
To:  linux-wireless-AT-vger.kernel.org
Subject:  [PATCH wireless-next 00/18] NAN synchronization for mac80211_hwsim
Date:  Fri, 28 Nov 2025 15:15:38 +0100
Message-ID:  <20251128141537.287627-20-benjamin@sipsolutions.net>
Cc:  Benjamin Berg <benjamin.berg-AT-intel.com>
Archive-link:  Article

From: Benjamin Berg <benjamin.berg@intel.com>

Hi,

These patches add support for NAN synchronization to mac80211_hwsim.
This is useful to better model the NAN synchronization behaviour and
also permits testing more complicated setups where a wmediumd instance
is used (possibly between multiple VMs).

Note that the current implementation is somewhat simplified and only
synchronizes on 2.4 GHz (it does send beacons on 5 GHz). It'll also
ignore beacons outside of the 2.4 GHz DW, which may lead to slow
discovery of newly visible NAN clusters.

Apart from this, synchronization should work well. There is no data path
at this point as the corresponding mac80211 API is not yet ready.

Benjamin

Benjamin Berg (18):
  wifi: mac80211_hwsim: fix typo in frequency notification
  wifi: mac80211_hwsim: disable BHs for hwsim_radio_lock
  wifi: mac80211_hwsim: remove unused nan_vif struct member
  wifi: mac80211_hwsim: move NAN related variables into a struct
  wifi: mac80211_hwsim: split NAN handling into separate file
  wifi: mac80211_hwsim: rename and switch simulation time to boottime
  wifi: mac80211_hwsim: move timestamp writing later in the datapath
  wifi: mac80211_hwsim: register beacon timer by calculating TBTT
  wifi: mac80211_hwsim: refactor NAN timer handling
  wifi: mac80211_hwsim: switch to use TXQs
  wifi: mac80211: add a TXQ for management frames on NAN devices
  wifi: mac80211_hwsim: limit TX of frames to the NAN DW
  wifi: mac80211_hwsim: select NAN TX channel based on current TSF
  wifi: mac80211_hwsim: only RX on NAN when active on a slot
  wifi: mac80211_hwsim: protect tsf_offset using a spinlock
  wifi: ieee80211: add more NAN definitions
  wifi: mac80211: export ieee80211_calculate_rx_timestamp
  wifi: mac80211_hwsim: implement NAN synchronization

 drivers/net/wireless/virtual/Makefile         |    2 +
 .../net/wireless/virtual/mac80211_hwsim_i.h   |  146 +++
 ...mac80211_hwsim.c => mac80211_hwsim_main.c} |  573 +++-------
 .../net/wireless/virtual/mac80211_hwsim_nan.c | 1012 +++++++++++++++++
 .../net/wireless/virtual/mac80211_hwsim_nan.h |   89 ++
 include/linux/ieee80211-nan.h                 |   37 +
 include/linux/ieee80211.h                     |    1 +
 include/net/mac80211.h                        |   20 +
 net/mac80211/ibss.c                           |    2 +-
 net/mac80211/ieee80211_i.h                    |    4 -
 net/mac80211/iface.c                          |   28 +-
 net/mac80211/mesh_sync.c                      |    2 +-
 net/mac80211/rx.c                             |    2 +-
 net/mac80211/scan.c                           |    2 +-
 net/mac80211/tx.c                             |   16 +-
 net/mac80211/util.c                           |   51 +-
 16 files changed, 1551 insertions(+), 436 deletions(-)
 create mode 100644 drivers/net/wireless/virtual/mac80211_hwsim_i.h
 rename drivers/net/wireless/virtual/{mac80211_hwsim.c => mac80211_hwsim_main.c} (94%)
 create mode 100644 drivers/net/wireless/virtual/mac80211_hwsim_nan.c
 create mode 100644 drivers/net/wireless/virtual/mac80211_hwsim_nan.h

-- 
2.51.1




Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds