Annotation of wikisrc/Testing_new_wifi.mdwn, revision 1.2

1.1       wiki        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: 
1.2     ! wiki        9:     build.sh -m ${arch} -V MKRUMP=no -V MKKMOD=no sets
1.1       wiki       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: 
1.2     ! wiki       13: There is a custom kernel sys/arch/amd64/conf/SEVEN_WIFI but you can also use
        !            14: GENERIC and copy the "no ..." lines from SEVEN_WIFI to GENERIC.local. The
        !            15: evbarm GENERIC kernel will work if you create GENERIC.local files like the following:
        !            16: 
        !            17: For evbarm:
1.1       wiki       18: 
                     19:     no athn*
                     20:     no bwfm*
                     21:     no atu*
                     22:     no otus*
                     23:     no rum*
                     24:     no run*
                     25:     no upgt*
                     26:     no ural*
                     27:     no urtw*
                     28:     no zyd*
                     29: 
1.2     ! wiki       30: and optionally:
        !            31: 
        !            32:     options    DEBUG           # expensive debugging checks/support
        !            33:     options    LOCKDEBUG       # expensive locking checks/support
        !            34:     options    IEEE80211_DEBUG # debug 802.11 code
        !            35: 
        !            36: 
        !            37: After building userland sets and kernel install both! Important tools like 
        !            38: ifconfig(8) and wpa_supplicant(8) have changed and the old binaries will not
        !            39: work with the new kernel.
1.1       wiki       40: 
                     41: 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:
                     42: 
                     43:     # sysctl net.wlan
                     44:     net.wlan.debug = 0
                     45:     net.wlan.devices = urtwn0
                     46: 
                     47: Now you can create a VAP (called wlan0) by doing:
                     48: 
                     49:     # ifconfig wlan0 create wlandev urtwn0
                     50: 
                     51: This VAP shows up in sysctl output:
                     52: 
                     53:     # sysctl net.wlan
                     54:     net.wlan.debug = 0
                     55:     net.wlan.devices = urtwn0
                     56:     net.wlan.wlan0.parent = urtwn0
                     57:     net.wlan.wlan0.driver_caps = 629194753
                     58:     net.wlan.wlan0.debug = 0
                     59:     net.wlan.wlan0.bmiss_max = 2
                     60:     net.wlan.wlan0.inact_run = 300
                     61:     net.wlan.wlan0.inact_probe = 30
                     62:     net.wlan.wlan0.inact_auth = 180
                     63:     net.wlan.wlan0.inact_init = 30
                     64:     net.wlan.wlan0.ampdu_mintraffic_bk = 128
                     65:     net.wlan.wlan0.ampdu_mintraffic_be = 64
                     66:     net.wlan.wlan0.ampdu_mintraffic_vo = 32
                     67:     net.wlan.wlan0.ampdu_mintraffic_vi = 32
                     68:     net.wlan.wlan0.force_restart = 0
                     69: 
                     70: and you can further configure it with ifconfig
                     71: 
                     72:     # ifconfig wlan0 up
                     73:     # ifconfig wlan0 list scan
                     74:     SSID                  BSSID              CHAN RATE  S:N     INT CAPS
                     75:     aprisoft              e0:28:6d:59:cb:90    1   54M  94:0    100 EPS  WME WPA RSN
                     76: 
                     77: 
                     78: 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