* [PATCH v3] wifi: ath12k: assign device id from the WSI index
@ 2026-09-28 21:33 Benoit Masson
2026-10-13 5:23 ` Rameshkumar Sundaram
2026-10-26 22:01 ` Jeff Johnson
0 siblings, 2 replies; 3+ messages in thread
From: Benoit Masson @ 2026-09-28 21:33 UTC (permalink / raw)
To: Jeff Johnson
Cc: linux-wireless, ath12k, stable, Karthikeyan Periyasamy,
Rameshkumar Sundaram, Benoit Masson
Devices of a hardware group are added to ag->ab[] in PCI probe
completion order (ab->device_id = ag->num_probed++), which is not
stable across boots. The wiphy radio array is built from ag->ab[] and
the wiphy device is taken from its first entry, so the wiphy sysfs
path and the mapping of radio indices to bands change on every boot.
Persisted wireless configurations reference radios by index (e.g.
OpenWrt/hostapd "radio0"), so such a configuration attaches to a
random band at each boot. This affects any multi-chip group with
single-band radios, e.g. TP-Link Archer BE800 (three QCN9274/QCN9224
radios in one group).
Store each ab in ag->ab[] at its wsi_info.index, which is derived from
the device tree WSI ring and is therefore deterministic.
ag->num_probed remains the group device counter. The unassign path is
unchanged, it already indexes ag->ab[] by ab->device_id.
Suggested-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Fixes: 6f245ea0ec6c ("wifi: ath12k: introduce device group abstraction")
Cc: stable@vger.kernel.org # 6.14+
Signed-off-by: Benoit Masson <yahoo@perenite.com>
---
Changes in v3:
- Expand the commit message with the problem statement (why this
matters for stable).
- No code change since v2.
Changes in v2:
- Set ab->device_id from wsi_info.index in ath12k_core_hw_group_assign()
instead of reordering pdev_map[] in ath12k_mac_allocate(), as suggested
by Rameshkumar. mac.c is no longer modified.
drivers/net/wireless/ath/ath12k/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c
index 99bf5cf..6505255 100644
--- a/drivers/net/wireless/ath/ath12k/core.c
+++ b/drivers/net/wireless/ath/ath12k/core.c
@@ -2029,7 +2029,8 @@ exit:
goto invalid_group;
}
- ab->device_id = ag->num_probed++;
+ ag->num_probed++;
+ ab->device_id = wsi->index;
ag->ab[ab->device_id] = ab;
ab->ag = ag;
--
2.46.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v3] wifi: ath12k: assign device id from the WSI index
2026-09-28 21:33 [PATCH v3] wifi: ath12k: assign device id from the WSI index Benoit Masson
@ 2026-10-13 5:23 ` Rameshkumar Sundaram
2026-10-26 22:01 ` Jeff Johnson
1 sibling, 0 replies; 3+ messages in thread
From: Rameshkumar Sundaram @ 2026-10-13 5:23 UTC (permalink / raw)
To: Benoit Masson, Jeff Johnson
Cc: linux-wireless, ath12k, stable, Karthikeyan Periyasamy
On 9/29/2026 3:03 AM, Benoit Masson wrote:
> Devices of a hardware group are added to ag->ab[] in PCI probe
> completion order (ab->device_id = ag->num_probed++), which is not
> stable across boots. The wiphy radio array is built from ag->ab[] and
> the wiphy device is taken from its first entry, so the wiphy sysfs
> path and the mapping of radio indices to bands change on every boot.
>
> Persisted wireless configurations reference radios by index (e.g.
> OpenWrt/hostapd "radio0"), so such a configuration attaches to a
> random band at each boot. This affects any multi-chip group with
> single-band radios, e.g. TP-Link Archer BE800 (three QCN9274/QCN9224
> radios in one group).
>
> Store each ab in ag->ab[] at its wsi_info.index, which is derived from
> the device tree WSI ring and is therefore deterministic.
> ag->num_probed remains the group device counter. The unassign path is
> unchanged, it already indexes ag->ab[] by ab->device_id.
>
> Suggested-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
> Fixes: 6f245ea0ec6c ("wifi: ath12k: introduce device group abstraction")
> Cc: stable@vger.kernel.org # 6.14+
> Signed-off-by: Benoit Masson <yahoo@perenite.com>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v3] wifi: ath12k: assign device id from the WSI index
2026-09-28 21:33 [PATCH v3] wifi: ath12k: assign device id from the WSI index Benoit Masson
2026-10-13 5:23 ` Rameshkumar Sundaram
@ 2026-10-26 22:01 ` Jeff Johnson
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Johnson @ 2026-10-26 22:01 UTC (permalink / raw)
To: Jeff Johnson, Benoit Masson
Cc: linux-wireless, ath12k, stable, Karthikeyan Periyasamy,
Rameshkumar Sundaram
On Mon, 28 Sep 2026 23:33:22 +0200, Benoit Masson wrote:
> Devices of a hardware group are added to ag->ab[] in PCI probe
> completion order (ab->device_id = ag->num_probed++), which is not
> stable across boots. The wiphy radio array is built from ag->ab[] and
> the wiphy device is taken from its first entry, so the wiphy sysfs
> path and the mapping of radio indices to bands change on every boot.
>
> Persisted wireless configurations reference radios by index (e.g.
> OpenWrt/hostapd "radio0"), so such a configuration attaches to a
> random band at each boot. This affects any multi-chip group with
> single-band radios, e.g. TP-Link Archer BE800 (three QCN9274/QCN9224
> radios in one group).
>
> [...]
Applied, thanks!
[1/1] wifi: ath12k: assign device id from the WSI index
commit: 81986a81f09fae73926c7c44863b335880269c90
Best regards,
--
Jeff Johnson <jeff.johnson@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-26 22:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-28 21:33 [PATCH v3] wifi: ath12k: assign device id from the WSI index Benoit Masson
2026-10-13 5:23 ` Rameshkumar Sundaram
2026-10-26 22:01 ` Jeff Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox