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/f9440241c8fd
branches:  trunk
changeset: 375442:f9440241c8fd
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 96916bfad1af -r f9440241c8fd 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
@@ -653,8 +653,6 @@ 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);
-       struct ifnet *ifp = vap->iv_ifp;
        size_t i;
        int s;
 
@@ -672,10 +670,8 @@ urtwn_detach(device_t self, int flags)
        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);
 
@@ -3579,7 +3575,7 @@ urtwn_vap_delete(struct ieee80211vap *va
 
        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