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/20e1b3214964
branches:  trunk
changeset: 361082:20e1b3214964
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 a86ef2d0898d -r 20e1b3214964 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
@@ -317,6 +317,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 *,
@@ -4941,9 +4942,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)
 {
@@ -4956,7 +4958,7 @@
            ISSET(sc->chip, URTWN_CHIP_92EU))
                return;
 
-       usbwifi_lock_core(&sc->sc_uw);
+       usbwifi_isowned_core(&sc->sc_uw);
 
        /*
         * RF Off Sequence
@@ -5068,9 +5070,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