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 No need to run urtwn_stop as we've detache...



details:   https://anonhg.NetBSD.org/src-all/rev/47dca5d771ef
branches:  trunk
changeset: 1025227:47dca5d771ef
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Tue May 12 04:05:09 2020 +1000

description:
No need to run urtwn_stop as we've detached already.

diffstat:

 sys/dev/usb/if_urtwn.c |  10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diffs (34 lines):

diff -r b96352b14f78 -r 47dca5d771ef sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c    Tue May 12 04:04:00 2020 +1000
+++ b/sys/dev/usb/if_urtwn.c    Tue May 12 04:05:09 2020 +1000
@@ -652,8 +652,6 @@
 {
        struct urtwn_softc *sc = device_private(self);
        struct ieee80211com *ic = &sc->sc_ic;
-       struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
-       struct ifnet *ifp = vap->iv_ifp;
        size_t i;
        int s;
 
@@ -671,10 +669,8 @@
        if (ISSET(sc->sc_flags, URTWN_FLAG_ATTACHED)) {
                usb_rem_task_wait(sc->sc_udev, &sc->sc_task, USB_TASKQ_DRIVER,
                    NULL);
-               urtwn_stop(ifp, 0);
-               // vap_detach(...) ??
-
-               ieee80211_ifdetach(&sc->sc_ic);
+
+               ieee80211_ifdetach(ic);
 
                mutex_destroy(&sc->sc_media_mtx);
 
@@ -3577,7 +3573,7 @@
 
        DPRINTFN(DBG_FN, ("%s: %s\n", device_xname(sc->sc_dev), __func__));
 
-       urtwn_stop(ifp, 0);
+//     urtwn_stop(ifp, 0);
        ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
        bpf_detach(ifp);
        if_detach(ifp);



Home | Main Index | Thread Index | Old Index