mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
LinuxKPI: 802.11: improve lkpi_ic_vap_delete()
Changing the order of cleanup in lkpi_ic_vap_delete() will avoid firmware crashes or a direct panic as observed as ieee80211_vap_detach() will do most cleanup for us and get us into the correct state. Calling mo_stop() in lkpi_ic_vap_delete() seems to stop the problem that further VAPs could not be created (error 17) after the first one being destroyed. Sponsored by: The FreeBSD Foundation PR: 269842 (cherry picked from commitdbf7691999) (cherry picked from commit6c38c6b1b9)
This commit is contained in:
parent
493d625543
commit
53ef38313a
1 changed files with 8 additions and 1 deletions
|
|
@ -2424,10 +2424,17 @@ lkpi_ic_vap_delete(struct ieee80211vap *vap)
|
|||
LKPI_80211_LHW_LVIF_LOCK(lhw);
|
||||
TAILQ_REMOVE(&lhw->lvif_head, lvif, lvif_entry);
|
||||
LKPI_80211_LHW_LVIF_UNLOCK(lhw);
|
||||
lkpi_80211_mo_remove_interface(hw, vif);
|
||||
|
||||
ieee80211_ratectl_deinit(vap);
|
||||
ieee80211_vap_detach(vap);
|
||||
|
||||
IMPROVE("clear up other bits in this state");
|
||||
|
||||
lkpi_80211_mo_remove_interface(hw, vif);
|
||||
|
||||
/* Single VAP, so we can do this here. */
|
||||
lkpi_80211_mo_stop(hw);
|
||||
|
||||
mtx_destroy(&lvif->mtx);
|
||||
free(lvif, M_80211_VAP);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue