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 Undo state machine locking as it is unnece...



details:   https://anonhg.NetBSD.org/src-all/rev/90b397d4f649
branches:  trunk
changeset: 375536:90b397d4f649
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Sun Aug 16 05:02:36 2020 +1000

description:
Undo state machine locking as it is unnecessary.

diffstat:

 sys/dev/usb/if_urtwn.c    |  4 ----
 sys/dev/usb/if_urtwnvar.h |  1 -
 2 files changed, 0 insertions(+), 5 deletions(-)

diffs (46 lines):

diff -r 600c2b488d95 -r 90b397d4f649 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c    Sun Aug 16 04:55:23 2020 +1000
+++ b/sys/dev/usb/if_urtwn.c    Sun Aug 16 05:02:36 2020 +1000
@@ -432,7 +432,6 @@ urtwn_attach(device_t parent, device_t s
        mutex_init(&sc->sc_rx_mtx, MUTEX_DEFAULT, IPL_SOFTNET);
        mutex_init(&sc->sc_fwcmd_mtx, MUTEX_DEFAULT, IPL_NONE);
        mutex_init(&sc->sc_write_mtx, MUTEX_DEFAULT, IPL_NONE);
-       mutex_init(&sc->sc_state_mtx, MUTEX_DEFAULT, IPL_NONE);
 
        mutex_enter(&sc->sc_write_mtx);
        usb_init_task(&sc->sc_task, urtwn_task, sc, 0);
@@ -704,7 +703,6 @@ urtwn_detach(device_t self, int flags)
        callout_destroy(&sc->sc_scan_to);
        callout_destroy(&sc->sc_calib_to);
 
-       mutex_destroy(&sc->sc_state_mtx);
        mutex_destroy(&sc->sc_write_mtx);
        mutex_destroy(&sc->sc_fwcmd_mtx);
        mutex_destroy(&sc->sc_tx_mtx);
@@ -2366,7 +2364,6 @@ urtwn_newstate(struct ieee80211vap *vap,
            ieee80211_state_name[nstate], nstate));
 
        s = splnet();
-       mutex_enter(&sc->sc_state_mtx);
        mutex_enter(&sc->sc_write_mtx);
 
        callout_stop(&sc->sc_scan_to);
@@ -2677,7 +2674,6 @@ urtwn_newstate(struct ieee80211vap *vap,
 #endif
        error = (*sc->sc_newstate)(vap, nstate, arg);
        
-       mutex_exit(&sc->sc_state_mtx);
        splx(s);
        return error;
 }
diff -r 600c2b488d95 -r 90b397d4f649 sys/dev/usb/if_urtwnvar.h
--- a/sys/dev/usb/if_urtwnvar.h Sun Aug 16 04:55:23 2020 +1000
+++ b/sys/dev/usb/if_urtwnvar.h Sun Aug 16 05:02:36 2020 +1000
@@ -135,7 +135,6 @@ struct urtwn_softc {
        kmutex_t                        sc_tx_mtx;
        kmutex_t                        sc_rx_mtx;
        kmutex_t                        sc_write_mtx;
-       kmutex_t                        sc_state_mtx;
        kmutex_t                        sc_media_mtx;   /* XXX */
 
        struct usbd_pipe *              rx_pipe[R92C_MAX_EPIN];



Home | Main Index | Thread Index | Old Index