freebsd11_wlan: Don't try to ifdetach if we never ifattached.

The FreeBSD developers say that there are "lots of bugs around driver attach
failures," and this looks like one of them.

Hopefully helps with #12035.
This commit is contained in:
Augustin Cavalier
2018-07-10 17:57:01 -04:00
parent de6ea5f43f
commit e6f6c1b463
@@ -366,6 +366,12 @@ ieee80211_ifdetach(struct ieee80211com *ic)
LIST_REMOVE(ic, ic_next); LIST_REMOVE(ic, ic_next);
mtx_unlock(&ic_list_mtx); mtx_unlock(&ic_list_mtx);
#ifdef __HAIKU__
/* Have we even initialized this com? */
if (!ic->ic_tq)
return;
#endif
taskqueue_drain(taskqueue_thread, &ic->ic_restart_task); taskqueue_drain(taskqueue_thread, &ic->ic_restart_task);
/* /*