Page MenuHomeFreeBSD

wtap(4): Implement STA/HostAP mode
Needs ReviewPublic

Authored by enweiwu on Aug 17 2022, 2:56 PM.

Details

Reviewers
lwhsu
bz
adrian
Group Reviewers
wireless
Summary

Below is the planned commit:

Beacon generation's machanism is done before this patch and it's the same in IBSS mode and AP mode.

AP adds TSF in probe response's frame body to synchronize timing information with STA.
Test Plan

I've tried to test this patch via wpa_supplicant(8) in order to initiate auth/assoc on STA. Below is my configuration file of wpa_supplicant(8):

network={
	ssid="test"
	key_mgmt=NONE
}

And while running wpa_supplicant(8), it keeps returning this error message:

ioctl[SIOCS80211, op=26, val=3, arg_len=0]: Operation not supported
wpa_driver_bsd_scan: failed to set wpa: Operation not supported

After ORing IEEE80211_C_WPA to ic->ic_cap to pretend that we support WPA, then we have another error message while running wpa_supplicant(8) again:

ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
wlan1: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1

I think there might be a right configuration that can correctly setup wpa_supplicant(8) and do auth/assoc, but I come up with a way to fix this problem which is described in D36242.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sys/dev/wtap/if_wtap.c
481

Please be aware of that there is a trailing space.

sys/dev/wtap/if_wtap.c
474

Please use a tab between`struct ieee80211_frame` and *wh;