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 Lock some more - from James Browning.
details: https://anonhg.NetBSD.org/src-all/rev/889deeac9389
branches: trunk
changeset: 375722:889deeac9389
user: Martin Husemann <martin%NetBSD.org@localhost>
date: Tue Dec 07 18:27:23 2021 +0100
description:
Lock some more - from James Browning.
diffstat:
sys/dev/usb/if_run.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (38 lines):
diff -r 7fad7df10139 -r 889deeac9389 sys/dev/usb/if_run.c
--- a/sys/dev/usb/if_run.c Tue Dec 07 18:22:37 2021 +0100
+++ b/sys/dev/usb/if_run.c Tue Dec 07 18:27:23 2021 +0100
@@ -1742,6 +1742,7 @@ run_newstate(struct ieee80211vap *vap, e
uint32_t tmp, sta[3];
uint8_t wcid;
+ usbwifi_lock_core(&sc->sc_uw);
callout_stop(&sc->calib_to);
ostate = vap->iv_state;
@@ -1822,6 +1823,7 @@ run_newstate(struct ieee80211vap *vap, e
printf ("RUN UNKNOWN nSTATE: %d\n", nstate);
break;
}
+ usbwifi_unlock_core(&sc->sc_uw);
return (*rvap->newstate)(vap, nstate, arg);
}
@@ -2135,6 +2137,8 @@ run_calibrate_cb(struct run_softc *sc, v
uint32_t sta[3];
int s, error;
struct ieee80211com *ic = &sc->sc_uw.uw_ic;
+
+ usbwifi_lock_core(&sc->sc_uw);
/* read statistic counters (clear on read) and update AMRR state */
error = run_read_region_1(sc, RT2860_TX_STA_CNT0, (uint8_t *)sta,
@@ -2164,7 +2168,8 @@ run_calibrate_cb(struct run_softc *sc, v
*/
splx(s);
-skip: callout_schedule(&sc->calib_to, hz);
+skip: usbwifi_unlock_core(&sc->sc_uw);
+ callout_schedule(&sc->calib_to, hz);
}
static void
Home |
Main Index |
Thread Index |
Old Index