git: 8d58a0578635 - main - LinuxKPI: 802.11: change ic_parent() to not call mo_stop()/mo_start()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 21 Sep 2023 17:19:38 UTC
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8d58a0578635dc7dd1025ab08b0479f2b383e1a4 commit 8d58a0578635dc7dd1025ab08b0479f2b383e1a4 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2023-09-21 12:25:20 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2023-09-21 17:08:48 +0000 LinuxKPI: 802.11: change ic_parent() to not call mo_stop()/mo_start() Driven by net80211 we may call mac80211 ops stop() and start() mostly when toggling a first VAP. While this is FreeBSD behaviour the firmware based LinuxKPI drivers seem to possibly clear state in the case of stop() triggering further errors down the line. We call mo_start() when starting the VAP and mo_stop() when destroying it now only. In the future (e.g., in multi-VAP setups) we may need to re-address some of this so keep the code under #ifdef. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 1fc9f9bcba15..b97e1c196867 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2460,24 +2460,32 @@ static void lkpi_ic_parent(struct ieee80211com *ic) { struct lkpi_hw *lhw; +#ifdef HW_START_STOP struct ieee80211_hw *hw; int error; +#endif bool start_all; IMPROVE(); lhw = ic->ic_softc; +#ifdef HW_START_STOP hw = LHW_TO_HW(lhw); +#endif start_all = false; /* IEEE80211_UNLOCK(ic); */ LKPI_80211_LHW_LOCK(lhw); if (ic->ic_nrunning > 0) { +#ifdef HW_START_STOP error = lkpi_80211_mo_start(hw); if (error == 0) +#endif start_all = true; } else { +#ifdef HW_START_STOP lkpi_80211_mo_stop(hw); +#endif } LKPI_80211_LHW_UNLOCK(lhw); /* IEEE80211_LOCK(ic); */