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/4af04c6e41bf
branches: trunk
changeset: 952152:4af04c6e41bf
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 290a33a50c5f -r 4af04c6e41bf 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
@@ -5842,10 +5842,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