Below is the planned commit message:
wtap(4): Implement IBSS mode on wtap(4)
For TSF and beacon generation, each STA has to start its local TSF timer and send beacon frames when it reaches the state IEEE80211_S_RUN, and the TSF timer will be used when:
- IBSS merge (mentioned below)
- beacon frame transmission (mentioned below)
TSF timer is kept in HAL of wtap(4), it’s working by continuously updating its value on timer interrupt simulated by callout_reset().
For IBSS merge, the STA with smaller TSF timer (younger STA) will be merged into the IBSS which is owned by a STA with larger TSF timer (older STA). After the merging procesWhen receiving beacons, the younger STA will be in the IBSS created by older STA,merged into the IBSS if and has the BSSID of this IBSS.
After being merged into other IBSS, the STA stops sending- the STA has the same SSID as the beacon frames. Sosender
- 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 STA stops sending beacon frames. So beacon frames will always be sent by the oldest STA in IBSS.
This diff depends on D35752.