Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src-draft/trunk]: src/sys/dev/usb Standardize getraidiocaps.



details:   https://anonhg.NetBSD.org/src-all/rev/3a07030ce6ef
branches:  trunk
changeset: 935739:3a07030ce6ef
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Tue May 12 04:26:41 2020 +1000

description:
Standardize getraidiocaps.

diffstat:

 sys/dev/usb/if_urtwn.c |  14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)

diffs (42 lines):

diff -r ac0c3efc47c8 -r 3a07030ce6ef sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c    Tue May 12 04:05:09 2020 +1000
+++ b/sys/dev/usb/if_urtwn.c    Tue May 12 04:26:41 2020 +1000
@@ -82,6 +82,7 @@
 #include <net80211/ieee80211_netbsd.h>
 #include <net80211/ieee80211_var.h>
 #include <net80211/ieee80211_radiotap.h>
+#include <net80211/ieee80211_regdomain.h>
 
 #include <dev/firmload.h>
 
@@ -223,11 +224,6 @@
 #undef URTWN_RTL8188E_DEV
 #undef URTWN_RTL8192EU_DEV
 
-/* urtwn data */
-static const uint8_t urtwn_chan_2ghz[] =
-        { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 };
-
-
 static int     urtwn_match(device_t, cfdata_t, void *);
 static void    urtwn_attach(device_t, device_t, void *);
 static int     urtwn_detach(device_t, int);
@@ -3760,17 +3756,11 @@
 {
        uint8_t bands[IEEE80211_MODE_BYTES];
 
-       /*
-        * NNN Should be able to do something based on chip if
-        * a chip has more bands .... eg. N ... but for the future.
-        */
-
        memset(bands, 0, sizeof(bands));
        setbit(bands, IEEE80211_MODE_11B);
        setbit(bands, IEEE80211_MODE_11G);
        setbit(bands, IEEE80211_MODE_11NG);
-       ieee80211_add_channel_list_2ghz(chans, maxchans, nchans,
-           urtwn_chan_2ghz, nitems(urtwn_chan_2ghz), bands, IEEE80211_CHAN_HT20);
+        ieee80211_init_channels(ic, NULL, bands);
 }
 
 



Home | Main Index | Thread Index | Old Index