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 Init channel list only once.
details: https://anonhg.NetBSD.org/src-all/rev/6a4771d9896e
branches: trunk
changeset: 377673:6a4771d9896e
user: Nathanial Sloss <nat%netbsd.org@localhost>
date: Wed May 13 00:19:20 2020 +1000
description:
Init channel list only once.
Do not override the default getradiocaps set by regdomain_attach.
diffstat:
sys/dev/usb/if_urtwn.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
diffs (51 lines):
diff -r c8cf8da3645e -r 6a4771d9896e sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c Tue May 12 21:31:55 2020 +1000
+++ b/sys/dev/usb/if_urtwn.c Wed May 13 00:19:20 2020 +1000
@@ -345,8 +345,7 @@ static struct ieee80211vap *
static void urtwn_vap_delete(struct ieee80211vap *);
static int urtwn_ioctl(struct ifnet *, u_long, void *);
static void urtwn_parent(struct ieee80211com *);
-static void urtwn_getradiocaps(struct ieee80211com *, int, int *,
- struct ieee80211_channel []);
+static void urtwn_init_channels(struct ieee80211com *);
static void urtwn_scan_start(struct ieee80211com *);
static void urtwn_scan_end(struct ieee80211com *);
static void urtwn_set_channel(struct ieee80211com *);
@@ -554,8 +553,7 @@ urtwn_attach(device_t parent, device_t s
IEEE80211_CHAN_DYN | IEEE80211_CHAN_2GHZ;
}
#else
- urtwn_getradiocaps(ic, IEEE80211_CHAN_MAX, &ic->ic_nchans,
- ic->ic_channels);
+ urtwn_init_channels(ic);
#endif
/* XXX issues here ... Figure out proper attach and vap creation */
ieee80211_ifattach(ic);
@@ -572,7 +570,6 @@ urtwn_attach(device_t parent, device_t s
ic->ic_transmit = urtwn_transmit;
// ic->ic_send_mgmt = urtwn_send_mgmt;
ic->ic_raw_xmit = urtwn_raw_xmit;
- ic->ic_getradiocaps = urtwn_getradiocaps;
sc->sc_rxtap_len = sizeof(sc->sc_rxtapu);
sc->sc_rxtap.wr_ihdr.it_len = htole16(sc->sc_rxtap_len);
@@ -3785,8 +3782,7 @@ urtwn_raw_xmit(struct ieee80211_node *ni
}
static void
-urtwn_getradiocaps(struct ieee80211com *ic,
- int maxchans, int *nchans, struct ieee80211_channel chans[])
+urtwn_init_channels(struct ieee80211com *ic)
{
uint8_t bands[IEEE80211_MODE_BYTES];
@@ -5787,8 +5783,7 @@ urtwn_init(struct ifnet *ifp)
ieee80211_new_state(vap, IEEE80211_S_SCAN, -1);
urtwn_wait_async(sc);
- urtwn_getradiocaps(ic, IEEE80211_CHAN_MAX, &ic->ic_nchans,
- ic->ic_channels);
+ urtwn_init_channels(ic);
ieee80211_chan_init(ic);
ieee80211_media_status(ifp, &imr);
imr.ifm_active &= ~(IFM_MMASK | IFM_IEEE80211_TURBO);
Home |
Main Index |
Thread Index |
Old Index