freebsd11_wlan: Sync previous ifdetach patch with FreeBSD.
It was upstreamed, albeit in a slightly different location and with a different comment than I originally had.
This commit is contained in:
parent
0988f80fed
commit
8959d55643
@ -362,16 +362,19 @@ ieee80211_ifdetach(struct ieee80211com *ic)
|
||||
{
|
||||
struct ieee80211vap *vap;
|
||||
|
||||
/*
|
||||
* We use this as an indicator that ifattach never had a chance to be
|
||||
* called, e.g. early driver attach failed and ifdetach was called
|
||||
* during subsequent detach. Never fear, for we have nothing to do
|
||||
* here.
|
||||
*/
|
||||
if (ic->ic_tq == NULL)
|
||||
return;
|
||||
|
||||
mtx_lock(&ic_list_mtx);
|
||||
LIST_REMOVE(ic, ic_next);
|
||||
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);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user