qcacmn: Add support for WMI_COEX_CONFIG command
Add support in WMI layer to configure coex config command for lithium based chipsets CRs-Fixed: 2037499 Change-Id: Ib83407524bd3b5cdad28f73a6ccc36d4a0271779
This commit is contained in:
@@ -940,6 +940,9 @@ QDF_STATUS wmi_unified_send_btcoex_duty_cycle_cmd(void *wmi_hdl,
|
|||||||
QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl,
|
QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl,
|
||||||
coex_ver_cfg_t *param);
|
coex_ver_cfg_t *param);
|
||||||
|
|
||||||
|
QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl,
|
||||||
|
struct coex_config_params *param);
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_set_atf_cmd_send(void *wmi_hdl,
|
QDF_STATUS wmi_unified_set_atf_cmd_send(void *wmi_hdl,
|
||||||
struct set_atf_params *param);
|
struct set_atf_params *param);
|
||||||
|
|
||||||
|
@@ -7164,4 +7164,26 @@ enum wmi_host_active_bpf_mode {
|
|||||||
WMI_HOST_ACTIVE_BPF_ADAPTIVE = (1 << 3)
|
WMI_HOST_ACTIVE_BPF_ADAPTIVE = (1 << 3)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct coex_config_params - Coex config command params
|
||||||
|
* @vdev_id: Virtual AP device identifier
|
||||||
|
* @config_type: Configuration type - wmi_coex_config_type enum
|
||||||
|
* @config_arg1: Configuration argument based on config type
|
||||||
|
* @config_arg2: Configuration argument based on config type
|
||||||
|
* @config_arg3: Configuration argument based on config type
|
||||||
|
* @config_arg4: Configuration argument based on config type
|
||||||
|
* @config_arg5: Configuration argument based on config type
|
||||||
|
* @config_arg6: Configuration argument based on config type
|
||||||
|
*/
|
||||||
|
struct coex_config_params {
|
||||||
|
uint32_t vdev_id;
|
||||||
|
uint32_t config_type;
|
||||||
|
uint32_t config_arg1;
|
||||||
|
uint32_t config_arg2;
|
||||||
|
uint32_t config_arg3;
|
||||||
|
uint32_t config_arg4;
|
||||||
|
uint32_t config_arg5;
|
||||||
|
uint32_t config_arg6;
|
||||||
|
};
|
||||||
|
|
||||||
#endif /* _WMI_UNIFIED_PARAM_H_ */
|
#endif /* _WMI_UNIFIED_PARAM_H_ */
|
||||||
|
@@ -1030,6 +1030,10 @@ QDF_STATUS
|
|||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
(*send_coex_ver_cfg_cmd)(wmi_unified_t wmi_handle, coex_ver_cfg_t *param);
|
(*send_coex_ver_cfg_cmd)(wmi_unified_t wmi_handle, coex_ver_cfg_t *param);
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
(*send_coex_config_cmd)(wmi_unified_t wmi_handle,
|
||||||
|
struct coex_config_params *param);
|
||||||
|
|
||||||
QDF_STATUS (*extract_wds_addr_event)(wmi_unified_t wmi_handle,
|
QDF_STATUS (*extract_wds_addr_event)(wmi_unified_t wmi_handle,
|
||||||
void *evt_buf, uint16_t len, wds_addr_event_t *wds_ev);
|
void *evt_buf, uint16_t len, wds_addr_event_t *wds_ev);
|
||||||
|
|
||||||
|
@@ -6542,6 +6542,27 @@ QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl,
|
|||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wmi_unified_send_coex_config_cmd() - send coex ver cfg command
|
||||||
|
* @wmi_handle: wmi handle
|
||||||
|
* @param: wmi coex cfg cmd params
|
||||||
|
*
|
||||||
|
* Send WMI_COEX_CFG_CMD parameters to fw.
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
|
||||||
|
*/
|
||||||
|
QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl,
|
||||||
|
struct coex_config_params *param)
|
||||||
|
{
|
||||||
|
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
||||||
|
|
||||||
|
if (wmi_handle->ops->send_coex_config_cmd)
|
||||||
|
return wmi_handle->ops->send_coex_config_cmd(wmi_handle,
|
||||||
|
param);
|
||||||
|
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wmi_extract_peer_delete_response_event() -
|
* wmi_extract_peer_delete_response_event() -
|
||||||
* extract vdev id and peer mac addresse from peer delete response event
|
* extract vdev id and peer mac addresse from peer delete response event
|
||||||
|
@@ -11336,6 +11336,55 @@ send_wmm_update_cmd_tlv(wmi_unified_t wmi_handle,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* send_coex_config_cmd_tlv() - send coex config command to fw
|
||||||
|
* @wmi_handle: wmi handle
|
||||||
|
* @param: pointer to coex config param
|
||||||
|
*
|
||||||
|
* Return: 0 for success or error code
|
||||||
|
*/
|
||||||
|
static QDF_STATUS
|
||||||
|
send_coex_config_cmd_tlv(wmi_unified_t wmi_handle,
|
||||||
|
struct coex_config_params *param)
|
||||||
|
{
|
||||||
|
WMI_COEX_CONFIG_CMD_fixed_param *cmd;
|
||||||
|
wmi_buf_t buf;
|
||||||
|
QDF_STATUS ret;
|
||||||
|
int32_t len;
|
||||||
|
|
||||||
|
len = sizeof(*cmd);
|
||||||
|
buf = wmi_buf_alloc(wmi_handle, len);
|
||||||
|
if (!buf) {
|
||||||
|
WMI_LOGE("%s: wmi_buf_alloc failed\n", __func__);
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd = (WMI_COEX_CONFIG_CMD_fixed_param *)wmi_buf_data(buf);
|
||||||
|
WMITLV_SET_HDR(&cmd->tlv_header,
|
||||||
|
WMITLV_TAG_STRUC_WMI_COEX_CONFIG_CMD_fixed_param,
|
||||||
|
WMITLV_GET_STRUCT_TLVLEN(
|
||||||
|
WMITLV_TAG_STRUC_WMI_COEX_CONFIG_CMD_fixed_param));
|
||||||
|
|
||||||
|
cmd->vdev_id = param->vdev_id;
|
||||||
|
cmd->config_type = param->config_type;
|
||||||
|
cmd->config_arg1 = param->config_arg1;
|
||||||
|
cmd->config_arg2 = param->config_arg2;
|
||||||
|
cmd->config_arg3 = param->config_arg3;
|
||||||
|
cmd->config_arg4 = param->config_arg4;
|
||||||
|
cmd->config_arg5 = param->config_arg5;
|
||||||
|
cmd->config_arg6 = param->config_arg6;
|
||||||
|
|
||||||
|
ret = wmi_unified_cmd_send(wmi_handle, buf, len,
|
||||||
|
WMI_COEX_CONFIG_CMDID);
|
||||||
|
|
||||||
|
if (ret != 0) {
|
||||||
|
WMI_LOGE("Sending COEX CONFIG CMD failed\n");
|
||||||
|
wmi_buf_free(buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
void wmi_copy_resource_config(wmi_resource_config *resource_cfg,
|
void wmi_copy_resource_config(wmi_resource_config *resource_cfg,
|
||||||
target_resource_config *tgt_res_cfg)
|
target_resource_config *tgt_res_cfg)
|
||||||
@@ -17449,6 +17498,7 @@ struct wmi_ops tlv_ops = {
|
|||||||
send_vdev_spectral_enable_cmd_tlv,
|
send_vdev_spectral_enable_cmd_tlv,
|
||||||
.send_pdev_qvit_cmd = send_pdev_qvit_cmd_tlv,
|
.send_pdev_qvit_cmd = send_pdev_qvit_cmd_tlv,
|
||||||
.send_wmm_update_cmd = send_wmm_update_cmd_tlv,
|
.send_wmm_update_cmd = send_wmm_update_cmd_tlv,
|
||||||
|
.send_coex_config_cmd = send_coex_config_cmd_tlv,
|
||||||
.get_target_cap_from_service_ready = extract_service_ready_tlv,
|
.get_target_cap_from_service_ready = extract_service_ready_tlv,
|
||||||
.extract_hal_reg_cap = extract_hal_reg_cap_tlv,
|
.extract_hal_reg_cap = extract_hal_reg_cap_tlv,
|
||||||
.extract_host_mem_req = extract_host_mem_req_tlv,
|
.extract_host_mem_req = extract_host_mem_req_tlv,
|
||||||
|
Reference in New Issue
Block a user