diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index fcbd02aa12..4dce866bdd 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -1564,6 +1564,7 @@ struct tx_send_params { * @tx_flags: additional configuration flags for mgmt frames * use 6 Mbps rather than 1 Mbps min rate(for 5GHz band or P2P) * @peer_rssi: peer RSSI value + * @mlo_link_agnostic: if true, can send on any active link */ struct wmi_mgmt_params { void *tx_frame; @@ -1580,6 +1581,7 @@ struct wmi_mgmt_params { uint8_t use_6mbps; uint32_t tx_flags; int8_t peer_rssi; + uint8_t mlo_link_agnostic; }; /** diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 9b44cf5aa9..d575614c4d 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -4409,6 +4409,7 @@ static QDF_STATUS send_mgmt_cmd_tlv(wmi_unified_t wmi_handle, void *qdf_ctx = param->qdf_ctx; uint8_t *bufp; QDF_STATUS status = QDF_STATUS_SUCCESS; + wmi_mlo_tx_send_params *mlo_params; int32_t bufp_len = (param->frm_len < mgmt_tx_dl_frm_len) ? param->frm_len : mgmt_tx_dl_frm_len; @@ -4416,7 +4417,8 @@ static QDF_STATUS send_mgmt_cmd_tlv(wmi_unified_t wmi_handle, WMI_TLV_HDR_SIZE + roundup(bufp_len, sizeof(uint32_t)); - buf = wmi_buf_alloc(wmi_handle, sizeof(wmi_tx_send_params) + cmd_len); + buf = wmi_buf_alloc(wmi_handle, sizeof(wmi_tx_send_params) + cmd_len + + WMI_TLV_HDR_SIZE + sizeof(wmi_mlo_tx_send_params)); if (!buf) return QDF_STATUS_E_NOMEM; @@ -4471,7 +4473,28 @@ static QDF_STATUS send_mgmt_cmd_tlv(wmi_unified_t wmi_handle, wmi_err("Populate TX send params failed"); goto unmap_tx_frame; } - cmd_len += sizeof(wmi_tx_send_params); + } else { + WMITLV_SET_HDR(&((wmi_tx_send_params *)bufp)->tlv_header, + WMITLV_TAG_STRUC_wmi_tx_send_params, + WMITLV_GET_STRUCT_TLVLEN(wmi_tx_send_params)); + } + + /* Even tx_params_valid is false, still need reserve space to pass wmi + * tag check */ + cmd_len += sizeof(wmi_tx_send_params); + bufp += sizeof(wmi_tx_send_params); + /* wmi_mlo_tx_send_params */ + if (param->mlo_link_agnostic) { + wmi_debug("Set mlo mgmt tid"); + WMITLV_SET_HDR(bufp, WMITLV_TAG_ARRAY_STRUC, + sizeof(wmi_mlo_tx_send_params)); + bufp += WMI_TLV_HDR_SIZE; + mlo_params = (wmi_mlo_tx_send_params *)bufp; + WMITLV_SET_HDR(&mlo_params->tlv_header, + WMITLV_TAG_STRUC_wmi_mlo_tx_send_params, + WMITLV_GET_STRUCT_TLVLEN(wmi_mlo_tx_send_params)); + mlo_params->hw_link_id = WMI_MLO_MGMT_TID; + cmd_len += WMI_TLV_HDR_SIZE + sizeof(wmi_mlo_tx_send_params); } wmi_mtrace(WMI_MGMT_TX_SEND_CMDID, cmd->vdev_id, 0);