[PATCH ath-next] wifi: ath12k: advertise ieee_link_id in vdev start MLO params
Manish Dharanenthiran
manish.dharanenthiran at oss.qualcomm.com
Sun Jun 21 20:32:02 PDT 2026
On 6/19/2026 11:58 PM, Rameshkumar Sundaram wrote:
> On 6/19/2026 11:25 AM, Manish Dharanenthiran wrote:
>> Firmware builds the AP MLD partner profile from the hw_link_id passed in
>> the vdev start parameters. However, hw_link_id is not always the same as
>> the logical per-MLD ieee_link_id, since ieee_link_id is assigned per MLD
>> and not per pdev.
>>
>> This matters in mixed MLO and SLO setups. For example:
>>
>> MLD 1 - 5 GHz + 6 GHz (2-link MLO): ieee_link_id 0 and 1
>> MLD 2 - 6 GHz only (1-link SLO): ieee_link_id 0
>> MLD 3 - 5 GHz only (1-link SLO): ieee_link_id 0
>>
>> The same physical 6 GHz radio can use ieee_link_id 1 for one
>> MLD and ieee_link_id 0 for another. Pass the correct ieee_link_id to
>> firmware so it can build accurate per-STA profile elements.
>>
>> Add ieee_link_id to wmi_vdev_start_mlo_params for the self link and to
>> wmi_partner_link_info for each partner link. Populate these fields in
>> ath12k_mac_mlo_get_vdev_args() from the corresponding vdev link_id
>> before encoding the WMI command.
>>
>> Introduce two new flags in ML params to indicate to firmware when
>> the new fields are valid:
>>
>> ATH12K_WMI_FLAG_MLO_IEEE_LINK_IDX_VALID BIT(18) for the
>> self link
>> ATH12K_WMI_FLAG_MLO_IEEE_LINK_IDX_VALID_PARTNER BIT(19) for partner
>> links
>>
>> Firmware parses ieee_link_id only when the matching flag is set.
>>
>> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
>>
>> Co-developed-by: Hari Naraayana Desikan Kannan
>> <hari.kannan at oss.qualcomm.com>
>> Signed-off-by: Hari Naraayana Desikan Kannan
>> <hari.kannan at oss.qualcomm.com>
>> Co-developed-by: Karthik M <karthik.m at oss.qualcomm.com>
>> Signed-off-by: Karthik M <karthik.m at oss.qualcomm.com>
>> Signed-off-by: Manish Dharanenthiran
>> <manish.dharanenthiran at oss.qualcomm.com>
>> ---
>> drivers/net/wireless/ath/ath12k/mac.c | 3 +++
>> drivers/net/wireless/ath/ath12k/wmi.c | 32 +++++++++++++++++++
>> +------------
>> drivers/net/wireless/ath/ath12k/wmi.h | 7 +++++++
>> 3 files changed, 30 insertions(+), 12 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/
>> wireless/ath/ath12k/mac.c
>> index af354bef5c0d..773ecd6da8e5 100644
>> --- a/drivers/net/wireless/ath/ath12k/mac.c
>> +++ b/drivers/net/wireless/ath/ath12k/mac.c
>> @@ -11253,6 +11253,8 @@ ath12k_mac_mlo_get_vdev_args(struct
>> ath12k_link_vif *arvif,
>> ml_arg->assoc_link = arvif->is_sta_assoc_link;
>> + ml_arg->ieee_link_id = arvif->link_id;
>> +
>> partner_info = ml_arg->partner_info;
>> links = ahvif->links_map;
>> @@ -11276,6 +11278,7 @@ ath12k_mac_mlo_get_vdev_args(struct
>> ath12k_link_vif *arvif,
>> partner_info->vdev_id = arvif_p->vdev_id;
>> partner_info->hw_link_id = arvif_p->ar->pdev->hw_link_id;
>> + partner_info->ieee_link_id = arvif_p->link_id;
>> ether_addr_copy(partner_info->addr, link_conf->addr);
>> ml_arg->num_partner_links++;
>> partner_info++;
>> diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/
>> wireless/ath/ath12k/wmi.c
>> index 84a31b953db8..a0e8b5678ae3 100644
>> --- a/drivers/net/wireless/ath/ath12k/wmi.c
>> +++ b/drivers/net/wireless/ath/ath12k/wmi.c
>> @@ -1228,10 +1228,14 @@ int ath12k_wmi_vdev_start(struct ath12k *ar,
>> struct wmi_vdev_start_req_arg *arg,
>> le32_encode_bits(arg->ml.mcast_link,
>> ATH12K_WMI_FLAG_MLO_MCAST_VDEV) |
>> le32_encode_bits(arg->ml.link_add,
>> - ATH12K_WMI_FLAG_MLO_LINK_ADD);
>> + ATH12K_WMI_FLAG_MLO_LINK_ADD) |
>> + cpu_to_le32(ATH12K_WMI_FLAG_MLO_IEEE_LINK_IDX_VALID);
>> - ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "vdev %d start ml flags
>> 0x%x\n",
>> - arg->vdev_id, ml_params->flags);
>> + ml_params->ieee_link_id = cpu_to_le32(arg->ml.ieee_link_id);
>> +
>> + ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "vdev %d start link_id %d
>> ml flags 0x%x\n",
>
> %u for vdev and link_id ?
> Also this part of change is not describe in commit text.
>
>> + arg->vdev_id, arg->ml.ieee_link_id,
>> + le32_to_cpu(ml_params->flags));
>> ptr += sizeof(*ml_params);
>> @@ -1244,19 +1248,23 @@ int ath12k_wmi_vdev_start(struct ath12k *ar,
>> struct wmi_vdev_start_req_arg *arg,
>> partner_info = ptr;
>> for (i = 0; i < arg->ml.num_partner_links; i++) {
>> + struct wmi_ml_partner_info *pinfo = &arg-
>> >ml.partner_info[i];
>> +
>> partner_info->tlv_header =
>> ath12k_wmi_tlv_cmd_hdr(WMI_TAG_MLO_PARTNER_LINK_PARAMS,
>> sizeof(*partner_info));
>> - partner_info->vdev_id =
>> - cpu_to_le32(arg->ml.partner_info[i].vdev_id);
>> - partner_info->hw_link_id =
>> - cpu_to_le32(arg->ml.partner_info[i].hw_link_id);
>> + partner_info->vdev_id = cpu_to_le32(pinfo->vdev_id);
>> + partner_info->hw_link_id = cpu_to_le32(pinfo->hw_link_id);
>> ether_addr_copy(partner_info->vdev_addr.addr,
>> - arg->ml.partner_info[i].addr);
>> -
>> - ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "partner vdev %d
>> hw_link_id %d macaddr%pM\n",
>> - partner_info->vdev_id, partner_info->hw_link_id,
>> - partner_info->vdev_addr.addr);
>> + pinfo->addr);
>> + partner_info->flags =
>> +
>> cpu_to_le32(ATH12K_WMI_FLAG_MLO_IEEE_LINK_IDX_VALID_PARTNER);
>> + partner_info->ieee_link_id = cpu_to_le32(pinfo-
>> >ieee_link_id);
>> +
>> + ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "partner vdev %d
>> hw_link_id %d macaddr %pM link_id %d ml flags 0x%x\n",
>
> %u for vdev_id, hw_link_id and ieee_link_id ?
>
Agree. But, there is a mixed usage of %d & %u for both vdev and link_id
in this file. Will address along with other comments, if any.
[snip]
>
> --
> Ramesh
Regards
Manish Dharanenthiran
More information about the ath12k
mailing list