qcacmn: Process scan radio capabilities TLV
FW advertises scan radio capabilities as part of service ready ext2 event. This is an optional TLV, presence of which indicates scan radio support for the that pdev. CRS-Fixed: 2746769 Change-Id: I5a0231c54375e9f00c85f0ad92839e2fa6c79f39
Este commit está contenido en:

cometido por
snandini

padre
1de57c2150
commit
e0f284b015
@@ -282,6 +282,13 @@ static int init_deinit_service_ext2_ready_event_handler(ol_scn_t scn_handle,
|
||||
|
||||
target_if_add_11ax_modes(psoc, tgt_hdl);
|
||||
|
||||
err_code = init_deinit_populate_scan_radio_cap_ext2(wmi_handle, event,
|
||||
info);
|
||||
if (err_code) {
|
||||
target_if_err("failed to populate scan radio cap ext2");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* send init command */
|
||||
init_deinit_set_send_init_cmd(psoc, tgt_hdl);
|
||||
|
||||
|
@@ -779,6 +779,66 @@ int init_deinit_populate_hal_reg_cap_ext2(wmi_unified_t wmi_handle,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int init_deinit_populate_scan_radio_cap_ext2(wmi_unified_t wmi_handle,
|
||||
uint8_t *event,
|
||||
struct tgt_info *info)
|
||||
{
|
||||
struct wlan_psoc_host_scan_radio_caps *param;
|
||||
uint32_t num_scan_radio_caps;
|
||||
uint8_t cap_idx;
|
||||
QDF_STATUS status;
|
||||
|
||||
if (!event) {
|
||||
target_if_err("Invalid event buffer");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
num_scan_radio_caps = info->service_ext2_param.num_scan_radio_caps;
|
||||
target_if_debug("num scan radio capabilities = %d",
|
||||
num_scan_radio_caps);
|
||||
|
||||
if (!num_scan_radio_caps)
|
||||
return 0;
|
||||
|
||||
info->scan_radio_caps = qdf_mem_malloc(
|
||||
sizeof(struct wlan_psoc_host_scan_radio_caps) *
|
||||
num_scan_radio_caps);
|
||||
|
||||
if (!info->scan_radio_caps) {
|
||||
target_if_err("Failed to allocate memory for scan radio caps");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
for (cap_idx = 0; cap_idx < num_scan_radio_caps; cap_idx++) {
|
||||
param = &info->scan_radio_caps[cap_idx];
|
||||
status = wmi_extract_scan_radio_cap_service_ready_ext2(
|
||||
wmi_handle, event, cap_idx, param);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
target_if_err("Extraction of scan radio cap failed");
|
||||
goto free_and_return;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
free_and_return:
|
||||
qdf_mem_free(info->scan_radio_caps);
|
||||
info->scan_radio_caps = NULL;
|
||||
|
||||
return qdf_status_to_os_return(status);
|
||||
}
|
||||
|
||||
QDF_STATUS init_deinit_scan_radio_cap_free(
|
||||
struct target_psoc_info *tgt_psoc_info)
|
||||
{
|
||||
qdf_mem_free(tgt_psoc_info->info.scan_radio_caps);
|
||||
tgt_psoc_info->info.scan_radio_caps = NULL;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
qdf_export_symbol(init_deinit_scan_radio_cap_free);
|
||||
|
||||
static bool init_deinit_regdmn_160mhz_support(
|
||||
struct wlan_psoc_host_hal_reg_capabilities_ext *hal_cap)
|
||||
{
|
||||
|
Referencia en una nueva incidencia
Block a user