]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
wtap: Implement IBSS mode on wtap(4)
authorEn-Wei Wu <enweiwu@FreeBSD.org>
Mon, 15 Aug 2022 16:21:15 +0000 (16:21 +0000)
committerBjoern A. Zeeb <bz@FreeBSD.org>
Mon, 15 Aug 2022 16:35:36 +0000 (16:35 +0000)
commitc0b65123d09c735930c2915890de3b39055f4cc8
tree29b7b96e6902b71bc91750bb3fab1a6d9c0b8617
parentc9e4d25052065d1e0cbdb3a0eea3f21c9225d1d1
wtap: Implement IBSS mode on wtap(4)

For TSF and beacon generation, each STA has to start its local TSF timer
and sends beacon frames when it reaches the state IEEE80211_S_RUN.
The TSF timer will be used for IBSS merge and beacon frame transmission.

The TSF timer is kept in the HAL of wtap(4). It is working by
continuously updating its value on timer interrupt simulated
by callout_reset().

When receiving beacons, the STA will be merged into the IBSS if
- the STA has the same SSID as the beacon sender
- the STA's TSF timer is smaller than the beacon sender's TSF timer.

After the merging process, the younger STA will be in the IBSS
created by the older STA and the younger STA stops sending beacon
frames.  So beacon frames will always be sent by the oldest STA
in IBSS.

Sponsored by: Google, Inc. (GSoC 2022)
Reviewed By: lwhsu, adrian
Differential Revision: https://reviews.freebsd.org/D35841
sys/dev/wtap/if_wtap.c
sys/dev/wtap/if_wtapvar.h
sys/dev/wtap/wtap_hal/hal.c
sys/dev/wtap/wtap_hal/hal.h