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 Call urtwn_chip_stop.



details:   https://anonhg.NetBSD.org/src-all/rev/c137459967e8
branches:  trunk
changeset: 369329:c137459967e8
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Thu Jan 06 02:33:29 2022 +1100

description:
Call urtwn_chip_stop.

This prevents the device from locking up when enabling / disabling the
interface.

diffstat:

 sys/dev/usb/if_urtwn.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (42 lines):

diff -r 172fcfc8fe55 -r c137459967e8 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c    Mon Jan 03 04:07:04 2022 +1100
+++ b/sys/dev/usb/if_urtwn.c    Thu Jan 06 02:33:29 2022 +1100
@@ -318,6 +318,7 @@
 static void    urtwn_temp_calib(struct urtwn_softc *);
 static void    urtwn_newassoc(struct ieee80211_node *, int);
 static void    urtwn_delay_ms(struct urtwn_softc *, int ms);
+static void    urtwn_chip_stop(struct urtwn_softc *);
 /* Functions for wifi refresh */
 static struct ieee80211vap *
                urtwn_vap_create(struct ieee80211com *,
@@ -4942,9 +4943,10 @@
        sc->sc_oactive = false;
 
        callout_stop(&sc->sc_calib_to);
+
+       urtwn_chip_stop(sc);
 }
 
-#if 0
 static void
 urtwn_chip_stop(struct urtwn_softc *sc)
 {
@@ -4957,7 +4959,7 @@
            ISSET(sc->chip, URTWN_CHIP_92EU))
                return;
 
-       usbwifi_lock_core(&sc->sc_uw);
+       usbwifi_isowned_core(&sc->sc_uw);
 
        /*
         * RF Off Sequence
@@ -5069,9 +5071,7 @@
 
        urtwn_write_1(sc, R92C_RSV_CTRL, 0x0E);
 
-       usbwifi_unlock_core(&sc->sc_uw);
 }
-#endif
 
 static void
 urtwn_delay_ms(struct urtwn_softc *sc, int ms)



Home | Main Index | Thread Index | Old Index