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/a3827ed33186
branches: trunk
changeset: 377942:a3827ed33186
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 98f66053ba88 -r a3827ed33186 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