]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: mac80211_hwsim: implement NAN synchronization
authorBenjamin Berg <benjamin.berg@intel.com>
Wed, 6 May 2026 03:44:24 +0000 (06:44 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 6 May 2026 09:41:50 +0000 (11:41 +0200)
commit42d3002bc323e2a87501e704350dd40c78a2d30f
tree6cab5798cbff52d17b1768c419c48317c368b5b0
parentd7b0798fc83be3b46d2ddd4c7dd257c271210296
wifi: mac80211_hwsim: implement NAN synchronization

Add all the handling to do NAN synchronization on 2.4 GHz including
sending out beacons. With this, the mac80211_hwsim NAN device also works
when used in conjunction with an external medium simulation.

Note that the TSF sync is not ideal in case of an external medium
simulation. This is because the mactime for received frames needs to be
estimated and the simulation may not update the timestamp of beacons
to the actual time that the frame was transmitted.

The implementation has an initial short phase where it scans for
clusters. This facilitates cluster joining and avoids creating a new
cluster immediately, which would result in two cluster join
notifications. It does not scan otherwise and will only see another
cluster appearing if a discovery beacon happens to be sent during the
2.4 GHz discovery window (DW).

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260506064301.7d21c3cdc565.I98b6c15eadefd6d123658294ef1a0cd3c2ce3054@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/virtual/mac80211_hwsim_i.h
drivers/net/wireless/virtual/mac80211_hwsim_main.c
drivers/net/wireless/virtual/mac80211_hwsim_nan.c
drivers/net/wireless/virtual/mac80211_hwsim_nan.h