svn commit: r350072 - stable/12/sys/dev/iwm

Mark Johnston markj at FreeBSD.org
Wed Jul 17 00:27:12 UTC 2019


Author: markj
Date: Wed Jul 17 00:27:11 2019
New Revision: 350072
URL: https://svnweb.freebsd.org/changeset/base/350072

Log:
  MFC r349711:
  iwm: Drain callouts after stopping the device during detach.

Modified:
  stable/12/sys/dev/iwm/if_iwm.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/iwm/if_iwm.c
==============================================================================
--- stable/12/sys/dev/iwm/if_iwm.c	Tue Jul 16 23:39:39 2019	(r350071)
+++ stable/12/sys/dev/iwm/if_iwm.c	Wed Jul 17 00:27:11 2019	(r350072)
@@ -6330,12 +6330,9 @@ iwm_detach_local(struct iwm_softc *sc, int do_net80211
 	if (!sc->sc_attached)
 		return 0;
 	sc->sc_attached = 0;
-
-	if (do_net80211)
+	if (do_net80211) {
 		ieee80211_draintask(&sc->sc_ic, &sc->sc_es_task);
-
-	callout_drain(&sc->sc_led_blink_to);
-	callout_drain(&sc->sc_watchdog_to);
+	}
 	iwm_stop_device(sc);
 	if (do_net80211) {
 		IWM_LOCK(sc);
@@ -6343,6 +6340,8 @@ iwm_detach_local(struct iwm_softc *sc, int do_net80211
 		IWM_UNLOCK(sc);
 		ieee80211_ifdetach(&sc->sc_ic);
 	}
+	callout_drain(&sc->sc_led_blink_to);
+	callout_drain(&sc->sc_watchdog_to);
 
 	iwm_phy_db_free(sc->sc_phy_db);
 	sc->sc_phy_db = NULL;


More information about the svn-src-stable-12 mailing list