Re: [PATCH ath-current v2 0/8] wifi: ath12k: support firmware-allocated MLD peer ID
Rameshkumar Sundaram <[email protected]> Fri, 24 Jul 2026 10:25:36 +0530
| Newsgroups | org.infradead.lists.ath12k,org.kernel.vger.linux-wireless |
|---|---|
| Message-ID | <[email protected]> |
On 7/20/2026 12:13 PM, Baochen Qiang wrote: > ath12k currently assumes the host allocates the MLD peer ID and passes > it down to firmware via WMI_PEER_ASSOC_CMDID. This works on QCN9274 > but breaks WCN7850/QCC2072, whose firmware always picks the ID itself > and reports it back through HTT_T2H_MSG_TYPE_MLO_RX_PEER_MAP. As a > result dp_hw->dp_peers[] is never populated for MLO peers and the data > path lookup fails. On QCC2072 the firmware additionally crashes on MLO > disconnect when ATH12K_WMI_FLAG_MLO_PEER_ID_VALID was set in the peer > assoc command. > > Add a host_alloc_ml_id hw_param to branch behavior, defer the > dp_peers[] publish to the HTT event for firmware-allocated chips, and > propagate the firmware-assigned ID through the existing host > bookkeeping when it arrives. > > Patch summary: > > 1: fix for an out-of-bounds clear_bit() in > ath12k_mac_dp_peer_cleanup(). > 2: group peer assoc send-and-wait into a helper > 3: refactor, keep ATH12K_PEER_ML_ID_VALID set in ahsta->ml_peer_id > so later patches do not have to OR or mask it at every call site; > 4: parse the HTT_T2H_MSG_TYPE_MLO_RX_PEER_MAP message; > 5: introduce hw_param host_alloc_ml_id, set true on QCN9274 family > and false on WCN7850/QCC2072; > 6: on host_alloc_ml_id == false, leave peer_id_valid unset and send > ml_peer_id == 0 in WMI_PEER_ASSOC_CMDID; > 7: on host_alloc_ml_id == false, mark ahsta->ml_peer_id and > dp_peer->peer_id as ATH12K_MLO_PEER_ID_PENDING and skip the > dp_hw->dp_peers[] publish until the firmware reports the ID; > 8: in the MLO_RX_PEER_MAP handler, propagate the firmware-assigned > ID into dp_peer->peer_id, every dp_link_peer in > dp_peer->link_peers[], and ahsta->ml_peer_id, all under > dp_hw->peer_lock. > > --- > Changes in v2: > - patch 5/8: initialize ret before goto err handling in ath12k_mac_allocate() > - Link to v1: https://lore.kernel.org/r/20260713-ath12k-fw-allocated-ml-peer-id-v1-0-d0a2a1a519eb@oss.qualcomm.com > > --- > Baochen Qiang (8): > wifi: ath12k: fix out-of-bounds clear_bit in ath12k_mac_dp_peer_cleanup() > wifi: ath12k: factor out peer assoc send-and-wait into a helper > wifi: ath12k: keep ATH12K_PEER_ML_ID_VALID set in ath12k_sta::ml_peer_id > wifi: ath12k: add support for HTT_T2H_MSG_TYPE_MLO_RX_PEER_MAP > wifi: ath12k: introduce host_alloc_ml_id hardware parameter > wifi: ath12k: do not advertise MLD peer ID for firmware-allocate devices > wifi: ath12k: defer dp_peer registration when firmware allocates MLD peer ID > wifi: ath12k: resolve PENDING ML peer ID from MLO_PEER_MAP HTT event > > drivers/net/wireless/ath/ath12k/core.c | 2 + > drivers/net/wireless/ath/ath12k/core.h | 3 + > drivers/net/wireless/ath/ath12k/dp_htt.c | 49 +++++++++ > drivers/net/wireless/ath/ath12k/dp_htt.h | 12 +++ > drivers/net/wireless/ath/ath12k/dp_peer.c | 75 +++++++++++-- > drivers/net/wireless/ath/ath12k/dp_peer.h | 2 + > drivers/net/wireless/ath/ath12k/hw.h | 2 + > drivers/net/wireless/ath/ath12k/mac.c | 165 ++++++++++++++++++++--------- > drivers/net/wireless/ath/ath12k/peer.c | 31 +++++- > drivers/net/wireless/ath/ath12k/peer.h | 1 + > drivers/net/wireless/ath/ath12k/wifi7/hw.c | 12 +++ > 11 files changed, 293 insertions(+), 61 deletions(-) > --- > base-commit: 951dc0a744e4dc8490935316d3b76e23990bde3c > change-id: 20260527-ath12k-fw-allocated-ml-peer-id-2b456891157f Reviewed-by: Rameshkumar Sundaram <[email protected]>