Date: Mon, 9 Oct 2023 23:16:07 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 914a319cd6ec - releng/14.0 - LinuxKPI: 802.11: improve lkpi_ic_vap_delete() Message-ID: <202310092316.399NG706070923@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch releng/14.0 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=914a319cd6ec26415459259d3f7c5c49d11f0654 commit 914a319cd6ec26415459259d3f7c5c49d11f0654 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2023-09-30 15:20:53 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2023-10-09 23:14:52 +0000 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 Approved by: re (gjb) (cherry picked from commit dbf7691999abe501e0ebc0fe4d8d9e97718d3890) (cherry picked from commit 6c38c6b1b917957d420902213f318bf0153214f2) (cherry picked from commit 53ef38313a6dd70e5d929a3d014cc62db807793f) --- sys/compat/linuxkpi/common/src/linux_80211.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 4b9cc598740b..f5951c95a8df 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202310092316.399NG706070923>