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 Must stop the device on detach to abort an...
details: https://anonhg.NetBSD.org/src-all/rev/70edd3d98781
branches: trunk
changeset: 377765:70edd3d98781
user: Nathanial Sloss <nat%netbsd.org@localhost>
date: Sun Aug 16 10:48:24 2020 +1000
description:
Must stop the device on detach to abort any usb xfers.
diffstat:
sys/dev/usb/if_urtwn.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diffs (21 lines):
diff -r 9d89d7376c93 -r 70edd3d98781 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c Sun Aug 16 10:07:55 2020 +1000
+++ b/sys/dev/usb/if_urtwn.c Sun Aug 16 10:48:24 2020 +1000
@@ -630,6 +630,7 @@ urtwn_detach(device_t self, int flags)
{
struct urtwn_softc *sc = device_private(self);
struct ieee80211com *ic = &sc->sc_ic;
+ struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
int s;
DPRINTFN(DBG_FN, ("%s: %s\n", device_xname(sc->sc_dev), __func__));
@@ -640,6 +641,9 @@ urtwn_detach(device_t self, int flags)
sc->sc_dying = 1;
+ if (vap != NULL)
+ urtwn_stop(vap->iv_ifp, 1);
+
callout_halt(&sc->sc_scan_to, NULL);
callout_halt(&sc->sc_calib_to, NULL);
Home |
Main Index |
Thread Index |
Old Index