* [PATCH ath-next] wifi: ath11k: don't create a duplicate peer on the same pdev
@ 2026-11-13 12:03 Fernando Tapia
2026-11-17 8:51 ` Nicolas Escande
0 siblings, 1 reply; 4+ messages in thread
From: Fernando Tapia @ 2026-11-13 12:03 UTC (permalink / raw)
To: ath11k; +Cc: jjohnson, linux-wireless
ath11k_peer_create() accepts an address that is already a peer on
another vdev, assuming the station is moving to another band. That holds
when the old vdev is on another pdev. When both vdevs are on the same
pdev, for example two AP interfaces on one 2.4 GHz radio, a station that
moves between the two BSSes is authenticated on the new one while hostapd
still has it on the old one. The WMI_PEER_CREATE for the second vdev then
makes the IPQ8074 firmware (WLAN.HK.2.9.0.1-02146) assert:
wal_peer_control.c:2904 Assertion is_graceful_to_handle failed
followed by "failed to find peer ... after creation" on the host, and on
AHB the whole SoC reboots. Tuya devices in pairing mode, which try both
BSSes of a radio within a second, cause a reboot loop.
Refuse the peer with -EBUSY while the address is still a peer on another
vdev of the same pdev, without sending the command to the firmware. The
station add fails as it already does after the assert, hostapd rejects
that authentication, and the client succeeds on a retry once its old
station is removed.
Tested on a Xiaomi AX3600 (OpenWrt 25.12.5, kernel 6.12.94 with ath11k
backported from 6.18.26) for 8 days. A smart plug moved between the two
SSIDs of the 2.4 GHz radio in both directions, the sequence that had
rebooted the router 8 times before: the new warning appears, the client
connects on the retry about 4 s later, no firmware assert, no reboot.
Link: https://github.com/openwrt/openwrt/issues/24864
Tested-on: IPQ8074 hw2.0 WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1
Assisted-by: Claude:claude-sonnet-5-5
Signed-off-by: Fernando Tapia <fernan.tapia@fernandotapia.eu>
---
drivers/net/wireless/ath/ath11k/peer.c | 31 ++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/drivers/net/wireless/ath/ath11k/peer.c b/drivers/net/wireless/ath/ath11k/peer.c
index b30a90698..95379930d 100644
--- a/drivers/net/wireless/ath/ath11k/peer.c
+++ b/drivers/net/wireless/ath/ath11k/peer.c
@@ -367,11 +367,25 @@ static int ath11k_wait_for_peer_created(struct ath11k *ar, int vdev_id, const u8
return ath11k_wait_for_peer_common(ar->ab, vdev_id, addr, true);
}
+static bool ath11k_peer_vdev_on_pdev(struct ath11k *ar, u32 vdev_id)
+{
+ struct ath11k_vif *arvif;
+
+ lockdep_assert_held(&ar->conf_mutex);
+
+ list_for_each_entry(arvif, &ar->arvifs, list)
+ if (arvif->vdev_id == vdev_id)
+ return true;
+
+ return false;
+}
+
int ath11k_peer_create(struct ath11k *ar, struct ath11k_vif *arvif,
struct ieee80211_sta *sta, struct peer_create_params *param)
{
struct ath11k_peer *peer;
struct ath11k_sta *arsta;
+ int old_vdev_id;
int ret, fbret;
lockdep_assert_held(&ar->conf_mutex);
@@ -392,6 +406,23 @@ int ath11k_peer_create(struct ath11k *ar, struct ath11k_vif *arvif,
return -EINVAL;
}
+ /* The firmware asserts (wal_peer_control.c
+ * "is_graceful_to_handle") when a peer is created for an
+ * address that is still a peer on another vdev of the same
+ * pdev. This happens when a station moves between two BSSes
+ * of one radio before its old station is removed. Refuse the
+ * new peer until the old one is gone.
+ */
+ if (ath11k_peer_vdev_on_pdev(ar, peer->vdev_id)) {
+ old_vdev_id = peer->vdev_id;
+ spin_unlock_bh(&ar->ab->base_lock);
+ mutex_unlock(&ar->ab->tbl_mtx_lock);
+ ath11k_warn(ar->ab,
+ "peer %pM still exists on vdev %d, not creating it on vdev %u\n",
+ param->peer_addr, old_vdev_id, param->vdev_id);
+ return -EBUSY;
+ }
+
/* Assume sta is transitioning to another band.
* Remove here the peer from rhash.
*/
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH ath-next] wifi: ath11k: don't create a duplicate peer on the same pdev
@ 2026-11-16 18:11 Ure, Christopher R.
0 siblings, 0 replies; 4+ messages in thread
From: Ure, Christopher R. @ 2026-11-16 18:11 UTC (permalink / raw)
To: fernan.tapia@fernandotapia.eu
Cc: ath11k@lists.infradead.org, jjohnson@kernel.org,
linux-wireless@vger.kernel.org
After modifying the build script to target 25.12.6 and applying the patch to my devices, I was able to associate a Tuya device that had previously triggered the bug.
Currently at 2.5 days of uptime with no issues to report.
Tested-on: Linksys MX8500 OpenWRT v25.12.6 kernel 6.12.112
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH ath-next] wifi: ath11k: don't create a duplicate peer on the same pdev
2026-11-13 12:03 [PATCH ath-next] wifi: ath11k: don't create a duplicate peer on the same pdev Fernando Tapia
@ 2026-11-17 8:51 ` Nicolas Escande
2026-11-17 9:04 ` Nicolas Escande
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Escande @ 2026-11-17 8:51 UTC (permalink / raw)
To: Fernando Tapia, ath11k; +Cc: jjohnson, linux-wireless
On Fri Nov 13, 2026 at 1:03 PM CET, Fernando Tapia wrote:
> ath11k_peer_create() accepts an address that is already a peer on
> another vdev, assuming the station is moving to another band. That holds
> when the old vdev is on another pdev. When both vdevs are on the same
> pdev, for example two AP interfaces on one 2.4 GHz radio, a station that
> moves between the two BSSes is authenticated on the new one while hostapd
> still has it on the old one. The WMI_PEER_CREATE for the second vdev then
> makes the IPQ8074 firmware (WLAN.HK.2.9.0.1-02146) assert:
>
> wal_peer_control.c:2904 Assertion is_graceful_to_handle failed
>
> followed by "failed to find peer ... after creation" on the host, and on
> AHB the whole SoC reboots. Tuya devices in pairing mode, which try both
> BSSes of a radio within a second, cause a reboot loop.
>
> Refuse the peer with -EBUSY while the address is still a peer on another
> vdev of the same pdev, without sending the command to the firmware. The
> station add fails as it already does after the assert, hostapd rejects
> that authentication, and the client succeeds on a retry once its old
> station is removed.
>
> Tested on a Xiaomi AX3600 (OpenWrt 25.12.5, kernel 6.12.94 with ath11k
> backported from 6.18.26) for 8 days. A smart plug moved between the two
> SSIDs of the 2.4 GHz radio in both directions, the sequence that had
> rebooted the router 8 times before: the new warning appears, the client
> connects on the retry about 4 s later, no firmware assert, no reboot.
>
> Assisted-by: LLM
> Signed-off-by: John Macias <dencity7@gmail.com>
> ---
Guys, I'm all for fixing bugs, but at some point you need to start reading
and searching the mailing list before pointing your LLM to any crashing
target. This is the third time someone posted a fix for this issue:
https://lore.kernel.org/linux-wireless/1316ed692b84f1d956e4854d9e974569a3961795.1784792420.git.repk@triplefau.lt/
https://lore.kernel.org/linux-wireless/20261001164139.370144-1-patricktlawler@gmail.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH ath-next] wifi: ath11k: don't create a duplicate peer on the same pdev
2026-11-17 8:51 ` Nicolas Escande
@ 2026-11-17 9:04 ` Nicolas Escande
0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Escande @ 2026-11-17 9:04 UTC (permalink / raw)
To: Nicolas Escande, Fernando Tapia, ath11k; +Cc: jjohnson, linux-wireless
On Tue Nov 17, 2026 at 9:51 AM CET, Nicolas Escande wrote:
>
> Guys, I'm all for fixing bugs, but at some point you need to start reading
> and searching the mailing list before pointing your LLM to any crashing
> target. This is the third time someone posted a fix for this issue:
>
> https://lore.kernel.org/linux-wireless/1316ed692b84f1d956e4854d9e974569a3961795.1784792420.git.repk@triplefau.lt/
> https://lore.kernel.org/linux-wireless/20261001164139.370144-1-patricktlawler@gmail.com/
Even worse, 4 patches in total:
https://lore.kernel.org/linux-wireless/1316ed692b84f1d956e4854d9e974569a3961795.1784792420.git.repk@triplefau.lt/
https://lore.kernel.org/linux-wireless/20261001164139.370144-1-patricktlawler@gmail.com/
https://lore.kernel.org/linux-wireless/20261026040302.2635133-1-dencity7@gmail.com/
https://lore.kernel.org/linux-wireless/20261113120325.2913-1-fernan.tapia@fernandotapia.eu/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-17 9:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-13 12:03 [PATCH ath-next] wifi: ath11k: don't create a duplicate peer on the same pdev Fernando Tapia
2026-11-17 8:51 ` Nicolas Escande
2026-11-17 9:04 ` Nicolas Escande
-- strict thread matches above, loose matches on Subject: below --
2026-11-16 18:11 Ure, Christopher R.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox