From 4f9a9d0938b9b3f3d78cfea0f565f48d86aadd9f Mon Sep 17 00:00:00 2001 From: Rhythm Patwa Date: Thu, 14 May 2020 16:53:07 -0700 Subject: [PATCH] qcacmn: Add tx_flag to Host WMI mgmt frame structure for incorrect key support Add 'tx_flag' param to wmi_mgmt_params structure for configuration to use incorrect key for encryption of mgmt frame. The 'tx_flag' param is primarily added to provide additional test configuration options for mgmt frames. Currently it only has support to encode the mgmt frame with incorrect key for PMF protected connection. Change-Id: Id894c735c4c612a75506a33938372c3fa2e7f24a CRs-fixed: 2690147 --- wmi/inc/wmi_unified_param.h | 2 ++ wmi/src/wmi_unified_tlv.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 720eb00096c9..63c07f0d60fa 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -1306,6 +1306,7 @@ struct tx_send_params { * @tx_param: TX send parameters * @tx_params_valid: Flag that indicates if TX params are valid * @use_6mbps: specify whether management frame to transmit should + * @tx_flags: additional configuration flags for mgmt frames * use 6 Mbps rather than 1 Mbps min rate(for 5GHz band or P2P) */ struct wmi_mgmt_params { @@ -1321,6 +1322,7 @@ struct wmi_mgmt_params { struct tx_send_params tx_param; bool tx_params_valid; uint8_t use_6mbps; + uint32_t tx_flags; }; /** diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index c997b1ee2c6d..6513b10c3c99 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -3476,6 +3476,7 @@ static QDF_STATUS send_mgmt_cmd_tlv(wmi_unified_t wmi_handle, cmd->frame_len = param->frm_len; cmd->buf_len = bufp_len; cmd->tx_params_valid = param->tx_params_valid; + cmd->tx_flags = param->tx_flags; wmi_mgmt_cmd_record(wmi_handle, WMI_MGMT_TX_SEND_CMDID, bufp, cmd->vdev_id, cmd->chanfreq); @@ -3564,6 +3565,7 @@ static QDF_STATUS send_mgmt_cmd_tlv(wmi_unified_t wmi_handle, cmd->frame_len = param->frm_len; cmd->buf_len = bufp_len; cmd->tx_params_valid = param->tx_params_valid; + cmd->tx_flags = param->tx_flags; wmi_mgmt_cmd_record(wmi_handle, WMI_MGMT_TX_SEND_CMDID, bufp, cmd->vdev_id, cmd->chanfreq);