There is a project in progress to adapt the latest FreeBSD wifi stack for NetBSD.

This stack introduces the concept of a virtual access point (VAP) and requires changes to the way wifi networks are configured.

Currently there are no pre-build binary sets, so first task is to check out the wifi topic from hg and build it.

At this point a full build will not work (due to unconverted drivers), but you can do something along the lines of:

build.sh -m ${arch} -V MKRUMP=no sets

to build the sets, and then create you own kernel configuration or add a GENERIC.local file and exclude the non buildable drivers.

There is a custom kernel sys/arch/amd64/conf/SEVEN_WIFI that can be used as a template for amd64 kernels. Here is an example of a GENERIC.local for evbarm GENERIC kernels:

no athn*
no bwfm*
no atu*
no otus*
no rum*
no run*
no upgt*
no ural*
no urtw*
no zyd*

After building userland sets and kernel install both (preferably on a secondary disk or a netboot environment, as this is not fully functional yet).

After booting into the new system you will notice that no wlan devices show up in ifconfig -a output. Instead you can see the wlan devices in sysctl output:

# sysctl net.wlan
net.wlan.debug = 0
net.wlan.devices = urtwn0

Now you can create a VAP (called wlan0) by doing:

# ifconfig wlan0 create wlandev urtwn0

This VAP shows up in sysctl output:

# sysctl net.wlan
net.wlan.debug = 0
net.wlan.devices = urtwn0
net.wlan.wlan0.parent = urtwn0
net.wlan.wlan0.driver_caps = 629194753
net.wlan.wlan0.debug = 0
net.wlan.wlan0.bmiss_max = 2
net.wlan.wlan0.inact_run = 300
net.wlan.wlan0.inact_probe = 30
net.wlan.wlan0.inact_auth = 180
net.wlan.wlan0.inact_init = 30
net.wlan.wlan0.ampdu_mintraffic_bk = 128
net.wlan.wlan0.ampdu_mintraffic_be = 64
net.wlan.wlan0.ampdu_mintraffic_vo = 32
net.wlan.wlan0.ampdu_mintraffic_vi = 32
net.wlan.wlan0.force_restart = 0

and you can further configure it with ifconfig

# ifconfig wlan0 up
# ifconfig wlan0 list scan
SSID                  BSSID              CHAN RATE  S:N     INT CAPS
aprisoft              e0:28:6d:59:cb:90    1   54M  94:0    100 EPS  WME WPA RSN

This sounds a bit strange at first sight, but multiple networks (one per VAP) for a single radio do make sense. Here is the original paper describing the design: FreeBSD wireless BSDCan 2005