qcacmn: Modify DISA legacy code to point to the DISA CLD component
DISA feature has been moved to a CLD component under the converged driver model. Point the wmi API's and structures to the newly defined files. Define new API's to extract parameters from event buffer. Change-Id: Ia47d3682217e7ce9c021bb2db8319483c881b3b2 CRs-Fixed: 2161963
This commit is contained in:

committed by
snandini

parent
88ae85340c
commit
33485811af
@@ -604,8 +604,30 @@ QDF_STATUS wmi_unified_probe_rsp_tmpl_send_cmd(void *wmi_hdl,
|
|||||||
QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl,
|
QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl,
|
||||||
struct set_key_params *key_params);
|
struct set_key_params *key_params);
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_DISA
|
||||||
|
/**
|
||||||
|
* wmi_unified_encrypt_decrypt_send_cmd() - send encryptdecrypt cmd to fw
|
||||||
|
* @wmi_hdl: wmi handle
|
||||||
|
* @params: encrypt/decrypt params
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||||
|
*/
|
||||||
QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
|
QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
|
||||||
struct encrypt_decrypt_req_params *params);
|
struct disa_encrypt_decrypt_req_params *params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wmi_extract_encrypt_decrypt_resp_params() -
|
||||||
|
* extract encrypt decrypt resp params from event buffer
|
||||||
|
* @wmi_handle: wmi handle
|
||||||
|
* @evt_buf: pointer to event buffer
|
||||||
|
* @resp: encrypt decrypt resp params
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||||
|
*/
|
||||||
|
QDF_STATUS wmi_extract_encrypt_decrypt_resp_params(void *wmi_hdl,
|
||||||
|
uint8_t *evt_buf,
|
||||||
|
struct disa_encrypt_decrypt_resp_params *resp);
|
||||||
|
#endif
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(void *wmi_hdl,
|
QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(void *wmi_hdl,
|
||||||
A_UINT32 vdev_id, uint8_t *p2p_ie);
|
A_UINT32 vdev_id, uint8_t *p2p_ie);
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||||
*
|
*
|
||||||
@@ -7713,38 +7713,6 @@ enum wmi_userspace_log_level {
|
|||||||
WMI_LOG_LEVEL_ACTIVE,
|
WMI_LOG_LEVEL_ACTIVE,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* struct encrypt_decrypt_req_params - encrypt/decrypt params
|
|
||||||
* @vdev_id: virtual device id
|
|
||||||
* @key_flag: This indicates firmware to encrypt/decrypt payload
|
|
||||||
* see ENCRYPT_DECRYPT_FLAG
|
|
||||||
* @key_idx: Index used in storing key
|
|
||||||
* @key_cipher: cipher used for encryption/decryption
|
|
||||||
* Eg: see WMI_CIPHER_AES_CCM for CCMP
|
|
||||||
* @key_len: length of key data
|
|
||||||
* @key_txmic_len: length of Tx MIC
|
|
||||||
* @key_rxmic_len: length of Rx MIC
|
|
||||||
* @key_data: Key
|
|
||||||
* @pn: packet number
|
|
||||||
* @mac_header: MAC header
|
|
||||||
* @data_len: length of data
|
|
||||||
* @data: pointer to payload
|
|
||||||
*/
|
|
||||||
struct encrypt_decrypt_req_params {
|
|
||||||
uint32_t vdev_id;
|
|
||||||
uint8_t key_flag;
|
|
||||||
uint32_t key_idx;
|
|
||||||
uint32_t key_cipher;
|
|
||||||
uint32_t key_len;
|
|
||||||
uint32_t key_txmic_len;
|
|
||||||
uint32_t key_rxmic_len;
|
|
||||||
uint8_t key_data[MAC_MAX_KEY_LENGTH];
|
|
||||||
uint8_t pn[MAC_PN_LENGTH];
|
|
||||||
uint8_t mac_header[MAX_MAC_HEADER_LEN];
|
|
||||||
uint32_t data_len;
|
|
||||||
uint8_t *data;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HW mode config type replicated from FW header
|
* HW mode config type replicated from FW header
|
||||||
* @WMI_HOST_HW_MODE_SINGLE: Only one PHY is active.
|
* @WMI_HOST_HW_MODE_SINGLE: Only one PHY is active.
|
||||||
|
@@ -1333,7 +1333,11 @@ QDF_STATUS (*send_fw_test_cmd)(wmi_unified_t wmi_handle,
|
|||||||
|
|
||||||
#ifdef WLAN_FEATURE_DISA
|
#ifdef WLAN_FEATURE_DISA
|
||||||
QDF_STATUS (*send_encrypt_decrypt_send_cmd)(wmi_unified_t wmi_handle,
|
QDF_STATUS (*send_encrypt_decrypt_send_cmd)(wmi_unified_t wmi_handle,
|
||||||
struct encrypt_decrypt_req_params *params);
|
struct disa_encrypt_decrypt_req_params *params);
|
||||||
|
|
||||||
|
QDF_STATUS (*extract_encrypt_decrypt_resp_event)(wmi_unified_t wmi_handle,
|
||||||
|
void *evt_buf,
|
||||||
|
struct disa_encrypt_decrypt_resp_params *resp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QDF_STATUS (*send_sar_limit_cmd)(wmi_unified_t wmi_handle,
|
QDF_STATUS (*send_sar_limit_cmd)(wmi_unified_t wmi_handle,
|
||||||
|
@@ -6609,15 +6609,8 @@ QDF_STATUS wmi_unified_send_sar_limit_cmd(void *wmi_hdl,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_DISA
|
#ifdef WLAN_FEATURE_DISA
|
||||||
/**
|
|
||||||
* wmi_unified_encrypt_decrypt_send_cmd() - send encryptdecrypt cmd to fw
|
|
||||||
* @wmi_hdl: wmi handle
|
|
||||||
* @params: encrypt/decrypt params
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
|
QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
|
||||||
struct encrypt_decrypt_req_params *params)
|
struct disa_encrypt_decrypt_req_params *params)
|
||||||
{
|
{
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
||||||
|
|
||||||
@@ -6627,6 +6620,20 @@ QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
|
|||||||
params);
|
params);
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDF_STATUS wmi_extract_encrypt_decrypt_resp_params(void *wmi_hdl,
|
||||||
|
uint8_t *evt_buf,
|
||||||
|
struct disa_encrypt_decrypt_resp_params *resp)
|
||||||
|
{
|
||||||
|
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
||||||
|
|
||||||
|
if (wmi_handle->ops->extract_encrypt_decrypt_resp_event)
|
||||||
|
return wmi_handle->ops->extract_encrypt_decrypt_resp_event(
|
||||||
|
wmi_handle, evt_buf, resp);
|
||||||
|
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -5155,7 +5155,7 @@ end:
|
|||||||
*/
|
*/
|
||||||
static
|
static
|
||||||
QDF_STATUS send_encrypt_decrypt_send_cmd_tlv(wmi_unified_t wmi_handle,
|
QDF_STATUS send_encrypt_decrypt_send_cmd_tlv(wmi_unified_t wmi_handle,
|
||||||
struct encrypt_decrypt_req_params *encrypt_decrypt_params)
|
struct disa_encrypt_decrypt_req_params *encrypt_decrypt_params)
|
||||||
{
|
{
|
||||||
wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param *cmd;
|
wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param *cmd;
|
||||||
wmi_buf_t wmi_buf;
|
wmi_buf_t wmi_buf;
|
||||||
@@ -5227,8 +5227,49 @@ QDF_STATUS send_encrypt_decrypt_send_cmd_tlv(wmi_unified_t wmi_handle,
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* extract_encrypt_decrypt_resp_event_tlv() - extract encrypt decrypt resp
|
||||||
|
* params from event
|
||||||
|
* @wmi_handle: wmi handle
|
||||||
|
* @evt_buf: pointer to event buffer
|
||||||
|
* @resp: Pointer to hold resp parameters
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||||
|
*/
|
||||||
|
static
|
||||||
|
QDF_STATUS extract_encrypt_decrypt_resp_event_tlv(wmi_unified_t wmi_handle,
|
||||||
|
void *evt_buf, struct disa_encrypt_decrypt_resp_params *resp)
|
||||||
|
{
|
||||||
|
WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID_param_tlvs *param_buf;
|
||||||
|
wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param *data_event;
|
||||||
|
|
||||||
|
param_buf = evt_buf;
|
||||||
|
if (!param_buf) {
|
||||||
|
WMI_LOGE("encrypt decrypt resp evt_buf is NULL");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
data_event = param_buf->fixed_param;
|
||||||
|
|
||||||
|
resp->vdev_id = data_event->vdev_id;
|
||||||
|
resp->status = data_event->status;
|
||||||
|
|
||||||
|
if (data_event->data_length > param_buf->num_enc80211_frame) {
|
||||||
|
WMI_LOGE("FW msg data_len %d more than TLV hdr %d",
|
||||||
|
data_event->data_length,
|
||||||
|
param_buf->num_enc80211_frame);
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
resp->data_len = data_event->data_length;
|
||||||
|
|
||||||
|
if (resp->data_len)
|
||||||
|
resp->data = (uint8_t *)param_buf->enc80211_frame;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* send_p2p_go_set_beacon_ie_cmd_tlv() - set beacon IE for p2p go
|
* send_p2p_go_set_beacon_ie_cmd_tlv() - set beacon IE for p2p go
|
||||||
@@ -21124,8 +21165,12 @@ struct wmi_ops tlv_ops = {
|
|||||||
.extract_chan_info_event = extract_chan_info_event_tlv,
|
.extract_chan_info_event = extract_chan_info_event_tlv,
|
||||||
.extract_channel_hopping_event = extract_channel_hopping_event_tlv,
|
.extract_channel_hopping_event = extract_channel_hopping_event_tlv,
|
||||||
.send_fw_test_cmd = send_fw_test_cmd_tlv,
|
.send_fw_test_cmd = send_fw_test_cmd_tlv,
|
||||||
|
#ifdef WLAN_FEATURE_DISA
|
||||||
.send_encrypt_decrypt_send_cmd =
|
.send_encrypt_decrypt_send_cmd =
|
||||||
send_encrypt_decrypt_send_cmd_tlv,
|
send_encrypt_decrypt_send_cmd_tlv,
|
||||||
|
.extract_encrypt_decrypt_resp_event =
|
||||||
|
extract_encrypt_decrypt_resp_event_tlv,
|
||||||
|
#endif
|
||||||
.send_sar_limit_cmd = send_sar_limit_cmd_tlv,
|
.send_sar_limit_cmd = send_sar_limit_cmd_tlv,
|
||||||
.send_power_dbg_cmd = send_power_dbg_cmd_tlv,
|
.send_power_dbg_cmd = send_power_dbg_cmd_tlv,
|
||||||
.send_multiple_vdev_restart_req_cmd =
|
.send_multiple_vdev_restart_req_cmd =
|
||||||
|
Reference in New Issue
Block a user