File:  [NetBSD Developer Wiki] / wikisrc / Testing_new_wifi.mdwn
Revision 1.1: download - view: text, annotated - select for diffs
Fri Sep 25 19:38:56 2020 UTC (2 months ago) by wiki
Branches: MAIN
CVS tags: HEAD
web commit by martin: First draft of instructions how to test new wifi

    1: There is a project in progress to adapt the latest FreeBSD wifi stack for NetBSD.
    2: 
    3: This stack introduces the concept of a virtual access point (VAP) and requires changes to the way wifi networks are configured.
    4: 
    5: Currently there are no pre-build binary sets, so first task is to check out the wifi topic from hg and build it.
    6: 
    7: At this point a full build will not work (due to unconverted drivers), but you can do something along the lines of:
    8: 
    9:     build.sh -m ${arch} -V MKRUMP=no sets
   10: 
   11: to build the sets, and then create you own kernel configuration or add a GENERIC.local file and exclude the non buildable drivers.
   12: 
   13: 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:
   14: 
   15:     no athn*
   16:     no bwfm*
   17:     no atu*
   18:     no otus*
   19:     no rum*
   20:     no run*
   21:     no upgt*
   22:     no ural*
   23:     no urtw*
   24:     no zyd*
   25: 
   26: After building userland sets and kernel install both (preferably on a secondary disk or a netboot environment, as this is not fully functional yet).
   27: 
   28: 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:
   29: 
   30:     # sysctl net.wlan
   31:     net.wlan.debug = 0
   32:     net.wlan.devices = urtwn0
   33: 
   34: Now you can create a VAP (called wlan0) by doing:
   35: 
   36:     # ifconfig wlan0 create wlandev urtwn0
   37: 
   38: This VAP shows up in sysctl output:
   39: 
   40:     # sysctl net.wlan
   41:     net.wlan.debug = 0
   42:     net.wlan.devices = urtwn0
   43:     net.wlan.wlan0.parent = urtwn0
   44:     net.wlan.wlan0.driver_caps = 629194753
   45:     net.wlan.wlan0.debug = 0
   46:     net.wlan.wlan0.bmiss_max = 2
   47:     net.wlan.wlan0.inact_run = 300
   48:     net.wlan.wlan0.inact_probe = 30
   49:     net.wlan.wlan0.inact_auth = 180
   50:     net.wlan.wlan0.inact_init = 30
   51:     net.wlan.wlan0.ampdu_mintraffic_bk = 128
   52:     net.wlan.wlan0.ampdu_mintraffic_be = 64
   53:     net.wlan.wlan0.ampdu_mintraffic_vo = 32
   54:     net.wlan.wlan0.ampdu_mintraffic_vi = 32
   55:     net.wlan.wlan0.force_restart = 0
   56: 
   57: and you can further configure it with ifconfig
   58: 
   59:     # ifconfig wlan0 up
   60:     # ifconfig wlan0 list scan
   61:     SSID                  BSSID              CHAN RATE  S:N     INT CAPS
   62:     aprisoft              e0:28:6d:59:cb:90    1   54M  94:0    100 EPS  WME WPA RSN
   63: 
   64: 
   65: 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](https://www.bsdcan.org/2005/papers/FreeBSDWirelessNetwokringSupport.pdf)

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb