git: 790dc4d825c9 - stable/13 - linux_80211: Don't dequeue lsta if not queued
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 08 Mar 2023 05:20:28 UTC
The branch stable/13 has been updated by cperciva:
URL: https://cgit.FreeBSD.org/src/commit/?id=790dc4d825c910c8a2eda49fe9e6dd827519f0f4
commit 790dc4d825c910c8a2eda49fe9e6dd827519f0f4
Author: Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2023-03-05 20:10:57 +0000
Commit: Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2023-03-08 05:20:05 +0000
linux_80211: Don't dequeue lsta if not queued
This fixes an instapanic when restarting wpa_supplicant on my laptop's
iwlwifi device. After this change, iwlwifi enters a nonfunctional
state if wpa_supplicant is restarted, but "service netif restart wlan0"
is enough to get it working again.
releng/13.2 candidate.
Reviewed by: bz
MFC after: 3 days
(cherry picked from commit 3689f8aeab82150da6789be87b6c2f9385810c23)
---
sys/compat/linuxkpi/common/src/linux_80211.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index d0a3b4b8586a..06b52ebaec88 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -174,10 +174,13 @@ lkpi_lsta_remove(struct lkpi_sta *lsta, struct lkpi_vif *lvif)
{
struct ieee80211_node *ni;
+ IMPROVE("XXX-BZ remove tqe_prev check once ni-sta-state-sync is fixed");
+
ni = lsta->ni;
LKPI_80211_LVIF_LOCK(lvif);
- TAILQ_REMOVE(&lvif->lsta_head, lsta, lsta_entry);
+ if (lsta->lsta_entry.tqe_prev != NULL)
+ TAILQ_REMOVE(&lvif->lsta_head, lsta, lsta_entry);
LKPI_80211_LVIF_UNLOCK(lvif);
lsta->ni = NULL;