Annotation of wikisrc/Testing_new_wifi.mdwn, revision 1.4

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.3       wiki       13: The devices referenced in the GENERIC kernels differ a bit from arch to arch (especially there are a few types of
                     14: hardware that only ever appeared in x86 notebooks), so you may need to adjust your GENERIC.local file for other architectures.
1.2       wiki       15: 
                     16: For evbarm:
1.1       wiki       17: 
                     18:     no athn*
                     19:     no bwfm*
                     20:     no atu*
                     21:     no otus*
                     22:     no rum*
                     23:     no run*
                     24:     no upgt*
                     25:     no ural*
                     26:     no urtw*
                     27:     no zyd*
                     28: 
1.2       wiki       29: and optionally:
                     30: 
                     31:     options    DEBUG           # expensive debugging checks/support
                     32:     options    LOCKDEBUG       # expensive locking checks/support
                     33:     options    IEEE80211_DEBUG # debug 802.11 code
                     34: 
1.3       wiki       35: For amd64 the GENERIC.local could look like this:
                     36: 
                     37:     options    DEBUG           # expensive debugging checks/support
                     38:     options    LOCKDEBUG       # expensive locking checks/support
                     39: 
                     40:     no an*
                     41:     no ath*
                     42:     no athn*
                     43:     no atw*
                     44:     no awi*
                     45:     no bwi*
                     46:     no bwfm*
                     47:     no ipw*
                     48:     no iwi*
                     49:     no malo*
                     50:     no ral*
                     51:     no rtw*
                     52:     no wi*
                     53:     no wpi*
                     54:     no atu*
                     55:     no otus*
                     56:     no rum*
                     57:     no run*
                     58:     no upgt*
                     59:     no ural*
                     60:     no urtw*
                     61:     no zyd*
                     62: 
                     63:     # options          URTWN_DEBUG     # debug the urtwn driver
                     64:     options            IWM_DEBUG       # debug the iwm driver
                     65:     options            IWN_DEBUG       # debug the iwn driver
                     66:     options            RTWN_DEBUG      # debug the rtwn driver
                     67:     options            IEEE80211_DEBUG # debug 802.11 code
                     68:     options            KERNHIST        # allow debug output to go to a kernhist(9)
                     69: 
1.2       wiki       70: 
                     71: After building userland sets and kernel install both! Important tools like 
                     72: ifconfig(8) and wpa_supplicant(8) have changed and the old binaries will not
                     73: work with the new kernel.
1.1       wiki       74: 
                     75: 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:
                     76: 
                     77:     # sysctl net.wlan
                     78:     net.wlan.debug = 0
                     79:     net.wlan.devices = urtwn0
                     80: 
                     81: Now you can create a VAP (called wlan0) by doing:
                     82: 
                     83:     # ifconfig wlan0 create wlandev urtwn0
                     84: 
                     85: This VAP shows up in sysctl output:
                     86: 
                     87:     # sysctl net.wlan
                     88:     net.wlan.debug = 0
                     89:     net.wlan.devices = urtwn0
                     90:     net.wlan.wlan0.parent = urtwn0
                     91:     net.wlan.wlan0.driver_caps = 629194753
                     92:     net.wlan.wlan0.debug = 0
                     93:     net.wlan.wlan0.bmiss_max = 2
                     94:     net.wlan.wlan0.inact_run = 300
                     95:     net.wlan.wlan0.inact_probe = 30
                     96:     net.wlan.wlan0.inact_auth = 180
                     97:     net.wlan.wlan0.inact_init = 30
                     98:     net.wlan.wlan0.ampdu_mintraffic_bk = 128
                     99:     net.wlan.wlan0.ampdu_mintraffic_be = 64
                    100:     net.wlan.wlan0.ampdu_mintraffic_vo = 32
                    101:     net.wlan.wlan0.ampdu_mintraffic_vi = 32
                    102:     net.wlan.wlan0.force_restart = 0
                    103: 
                    104: and you can further configure it with ifconfig
                    105: 
                    106:     # ifconfig wlan0 up
                    107:     # ifconfig wlan0 list scan
                    108:     SSID                  BSSID              CHAN RATE  S:N     INT CAPS
                    109:     aprisoft              e0:28:6d:59:cb:90    1   54M  94:0    100 EPS  WME WPA RSN
                    110: 
                    111: 
1.4     ! wiki      112: 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).
        !           113: 
        !           114: VAP is the term used internally in the code, it is meant to mean a virtual wifi radio. In the wifi world nowadays VAP would be a virtual access point, which is not quite the same thing as the virtualized interface we are talking about here. You can think of VAP as something similar to a VLAN, or a tap(4) or vether(4) connected to a bridge(4), where the real "wlandev" from the ifconfig create command line is the equivalent of the bridge.

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