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 Temperature calibration does not care for ...



details:   https://anonhg.NetBSD.org/src-all/rev/e8dff223695a
branches:  trunk
changeset: 371110:e8dff223695a
user:      Martin Husemann <martin%NetBSD.org@localhost>
date:      Sun Feb 20 11:02:45 2022 +0100

description:
Temperature calibration does not care for the first(!) VAP, but if
any VAP is running on the IC.

diffstat:

 sys/dev/usb/if_urtwn.c |  12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diffs (41 lines):

diff -r d3c71239709d -r e8dff223695a sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c    Sun Feb 20 10:25:41 2022 +0100
+++ b/sys/dev/usb/if_urtwn.c    Sun Feb 20 11:02:45 2022 +0100
@@ -1599,8 +1599,6 @@
 urtwn_calib_to(void *arg)
 {
        struct urtwn_softc *sc = arg;
-       struct ieee80211vap *vap = TAILQ_FIRST(&(sc->sc_uw.uw_ic.ic_vaps));
-/* XXX VAP is wrong */
 
        URTWNHIST_FUNC(); URTWNHIST_CALLED();
 
@@ -1608,23 +1606,23 @@
                return;
 
        /* Do it in a process context. */
-       urtwn_do_async(sc, urtwn_calib_to_cb, vap, sizeof(struct ieee80211vap *));
+       urtwn_do_async(sc, urtwn_calib_to_cb, NULL, 0);
 }
 
 /* ARGSUSED */
 static void
 urtwn_calib_to_cb(struct urtwn_softc *sc, void *arg)
 {
-       struct ieee80211vap *vap = arg;
        struct r92c_fw_cmd_rssi cmd;
        struct r92e_fw_cmd_rssi cmde;
 
        URTWNHIST_FUNC(); URTWNHIST_CALLED();
 
-       if (vap->iv_state != IEEE80211_S_RUN)
-               goto restart_timer;
-
        usbwifi_lock_ic(&sc->sc_uw);
+       if (!sc->sc_uw.uw_ic.ic_nrunning) {
+               usbwifi_unlock_ic(&sc->sc_uw);
+               return;
+       }
        if (!ISSET(sc->sc_uw.uw_flags, URTWN_FLAG_FWREADY)) {
                usbwifi_unlock_ic(&sc->sc_uw);
                goto restart_timer;



Home | Main Index | Thread Index | Old Index