svn commit: r343386 - head/sys/dev/iwm
Kyle Evans
kevans at FreeBSD.org
Thu Jan 24 03:48:52 UTC 2019
Author: kevans
Date: Thu Jan 24 03:48:50 2019
New Revision: 343386
URL: https://svnweb.freebsd.org/changeset/base/343386
Log:
if_iwm - Stop iwm_watchdog callout when idle.
Submitted by: Augustin Cavalier <waddlesplash at gmail.com> (Haiku)
Obtained from: DragonFlyBSD (6a8683b0e9d734f23bd9647e117da198c2b9a74e)
Modified:
head/sys/dev/iwm/if_iwm.c
Modified: head/sys/dev/iwm/if_iwm.c
==============================================================================
--- head/sys/dev/iwm/if_iwm.c Thu Jan 24 03:48:27 2019 (r343385)
+++ head/sys/dev/iwm/if_iwm.c Thu Jan 24 03:48:50 2019 (r343386)
@@ -3814,6 +3814,8 @@ iwm_raw_xmit(struct ieee80211_node *ni, struct mbuf *m
} else {
error = iwm_tx(sc, m, ni, 0);
}
+ if (sc->sc_tx_timer == 0)
+ callout_reset(&sc->sc_watchdog_to, hz, iwm_watchdog, sc);
sc->sc_tx_timer = 5;
IWM_UNLOCK(sc);
@@ -4754,7 +4756,6 @@ iwm_init(struct iwm_softc *sc)
* Ok, firmware loaded and we are jogging
*/
sc->sc_flags |= IWM_FLAG_HW_INITED;
- callout_reset(&sc->sc_watchdog_to, hz, iwm_watchdog, sc);
}
static int
@@ -4800,6 +4801,10 @@ iwm_start(struct iwm_softc *sc)
ieee80211_free_node(ni);
continue;
}
+ if (sc->sc_tx_timer == 0) {
+ callout_reset(&sc->sc_watchdog_to, hz, iwm_watchdog,
+ sc);
+ }
sc->sc_tx_timer = 15;
}
IWM_DPRINTF(sc, IWM_DEBUG_XMIT | IWM_DEBUG_TRACE, "<-%s\n", __func__);
@@ -4834,8 +4839,8 @@ iwm_watchdog(void *arg)
counter_u64_add(sc->sc_ic.ic_oerrors, 1);
return;
}
+ callout_reset(&sc->sc_watchdog_to, hz, iwm_watchdog, sc);
}
- callout_reset(&sc->sc_watchdog_to, hz, iwm_watchdog, sc);
}
static void
More information about the svn-src-all
mailing list