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 Initialize channels and media state on reset.
details: https://anonhg.NetBSD.org/src-all/rev/c61bdc748d17
branches: trunk
changeset: 1027358:c61bdc748d17
user: Nathanial Sloss <nat%netbsd.org@localhost>
date: Sun Aug 16 07:10:29 2020 +1000
description:
Initialize channels and media state on reset.
diffstat:
sys/dev/usb/if_urtwn.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diffs (22 lines):
diff -r f6491e9fd4fd -r c61bdc748d17 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c Sun Aug 16 06:35:38 2020 +1000
+++ b/sys/dev/usb/if_urtwn.c Sun Aug 16 07:10:29 2020 +1000
@@ -5848,10 +5848,18 @@
struct ifnet *ifp = vap->iv_ifp;
struct urtwn_softc *sc = ifp->if_softc;
struct ieee80211com *ic = &sc->sc_ic;
+ struct ifmediareq imr;
if (ic->ic_opmode != IEEE80211_M_MONITOR)
return ENETRESET;
+ urtwn_init_channels(ic);
+ ieee80211_chan_init(ic);
+ ieee80211_media_status(ifp, &imr);
+ imr.ifm_active &= ~(IFM_MMASK | IFM_IEEE80211_TURBO);
+ imr.ifm_active |= IFM_AUTO;
+ ifmedia_set(&vap->iv_media, imr.ifm_active);
+
if (ic->ic_curchan != NULL)
urtwn_set_chan(sc, ic->ic_curchan);
Home |
Main Index |
Thread Index |
Old Index