iwm - Fix race during detach, where a callout is left after driver is gone.

Submitted by:	Augustin Cavalier <waddlesplash@gmail.com> (Haiku)
Obtained from:	DragonFlyBSD (ba3b4ff9a1fc04a349df05d6d3449f4d9b15c4be)
This commit is contained in:
Kyle Evans 2019-01-24 03:49:11 +00:00
parent 93ff2218dd
commit 569556b633
2 changed files with 6 additions and 0 deletions

View File

@ -4829,6 +4829,9 @@ iwm_watchdog(void *arg)
struct iwm_softc *sc = arg;
struct ieee80211com *ic = &sc->sc_ic;
if (sc->sc_attached == 0)
return;
if (sc->sc_tx_timer > 0) {
if (--sc->sc_tx_timer == 0) {
device_printf(sc->sc_dev, "device timeout\n");

View File

@ -162,6 +162,9 @@ iwm_led_blink_timeout(void *arg)
{
struct iwm_softc *sc = arg;
if (sc->sc_attached == 0)
return;
if (iwm_mvm_led_is_enabled(sc))
iwm_mvm_led_disable(sc);
else