qcacmn: Fix assert for deauth sent on inactive link

Set WMI_MLO_MGMT_TID for mlo link agnostic mgmt frames

Change-Id: I385c1e9b50bc9ef6fe5f8875e0408bb2afca8945
CRs-Fixed: 3269920
This commit is contained in:
Jianmin Zhu
2022-08-17 22:23:12 +08:00
committed by Madan Koyyalamudi
parent 3ec79c4856
commit fa9ac21bbd
2 changed files with 27 additions and 2 deletions

View File

@@ -1564,6 +1564,7 @@ struct tx_send_params {
* @tx_flags: additional configuration flags for mgmt frames * @tx_flags: additional configuration flags for mgmt frames
* use 6 Mbps rather than 1 Mbps min rate(for 5GHz band or P2P) * use 6 Mbps rather than 1 Mbps min rate(for 5GHz band or P2P)
* @peer_rssi: peer RSSI value * @peer_rssi: peer RSSI value
* @mlo_link_agnostic: if true, can send on any active link
*/ */
struct wmi_mgmt_params { struct wmi_mgmt_params {
void *tx_frame; void *tx_frame;
@@ -1580,6 +1581,7 @@ struct wmi_mgmt_params {
uint8_t use_6mbps; uint8_t use_6mbps;
uint32_t tx_flags; uint32_t tx_flags;
int8_t peer_rssi; int8_t peer_rssi;
uint8_t mlo_link_agnostic;
}; };
/** /**

View File

@@ -4409,6 +4409,7 @@ static QDF_STATUS send_mgmt_cmd_tlv(wmi_unified_t wmi_handle,
void *qdf_ctx = param->qdf_ctx; void *qdf_ctx = param->qdf_ctx;
uint8_t *bufp; uint8_t *bufp;
QDF_STATUS status = QDF_STATUS_SUCCESS; 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 : int32_t bufp_len = (param->frm_len < mgmt_tx_dl_frm_len) ? param->frm_len :
mgmt_tx_dl_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 + WMI_TLV_HDR_SIZE +
roundup(bufp_len, sizeof(uint32_t)); 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) if (!buf)
return QDF_STATUS_E_NOMEM; 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"); wmi_err("Populate TX send params failed");
goto unmap_tx_frame; goto unmap_tx_frame;
} }
} 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); 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); wmi_mtrace(WMI_MGMT_TX_SEND_CMDID, cmd->vdev_id, 0);