Diff for /wikisrc/Converting_drivers_to_the_new_wifi_stack.mdwn between versions 1.9 and 1.10

version 1.9, 2020/12/20 12:57:36 version 1.10, 2021/01/17 15:57:41
Line 100  reflects on the driver and causes most o Line 100  reflects on the driver and causes most o
         setbit(bands, IEEE80211_MODE_11B);          setbit(bands, IEEE80211_MODE_11B);
         setbit(bands, IEEE80211_MODE_11G);          setbit(bands, IEEE80211_MODE_11G);
         setbit(bands, IEEE80211_MODE_11NG);          setbit(bands, IEEE80211_MODE_11NG);
           // XXX see description below if your chip can use other ranges (like 5ghz)
         ieee80211_add_channels_default_2ghz(chans, maxchans, nchans, bands, 0);          ieee80211_add_channels_default_2ghz(chans, maxchans, nchans, bands, 0);
     }      }
     ```      ```
Line 119  reflects on the driver and causes most o Line 120  reflects on the driver and causes most o
     ic->ic_getradiocaps = urtwn_get_radiocaps;      ic->ic_getradiocaps = urtwn_get_radiocaps;
     ```      ```
   
      If the hardware can use different frequency bands you may have to add them
      band by band instead of using `ieee80211_add_channels_default_2ghz`, also if
      the firmware knows about regulatory domains it may be required to select
      subsets of channels.
   
      An example of a multi-frequency driver doing this is iwm(4).
   
      To add the channels for a band, call
      ``iwm_add_channel_band(ic, chans, maxchans, nchans, start, num, bands)``
      where ``chans``, ``maxchans`` and ``nchans`` are the arguments passed to
      this callback, chans collecting the resulting channels, nchans pointing
      to the number of channels already collected, ``bands`` is the bitset of
      bands to add (multiple IEEE80211_MODE_* bits). The offset ``start``
      is the index of the first channel to add to the output (first call will
      always be with 0 as ``start``), and ``num`` the number of channels
      you expect ``iwm_add_channel_band`` to add.
   
  * If your driver used to override state machine functions (typical   * If your driver used to override state machine functions (typical
    `newstate` to controll LEDs when associating or similar),     `newstate` to controll LEDs when associating or similar),
    remove all traces for this from your softc and override a     remove all traces for this from your softc and override a

Removed from v.1.9  
changed lines
  Added in v.1.10


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