qcacld-3.0: Decrease resource in ftm mode

Decrease resource which were sent by WMI_INIT_CMD in ftm mode to
save FW memory. Otherwise, qca6490 will crash because of short
of resource in ftm mode.

Change-Id: Ic84e1076693130e9831ad0c08b813e6622f1f99d
CRs-Fixed: 3064388
This commit is contained in:
Guisen Yang
2021-10-20 16:37:18 +08:00
committed by Madan Koyyalamudi
parent 26da68629a
commit 3d7755da2c
2 changed files with 24 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -83,7 +84,10 @@ hdd_get_num_wow_filters(struct hdd_context *hdd_ctx, uint8_t *num_filters)
if (QDF_IS_STATUS_ERROR(status)) if (QDF_IS_STATUS_ERROR(status))
return status; return status;
*num_filters = ucfg_pmo_get_num_wow_filters(hdd_ctx->psoc); if (cds_get_conparam() == QDF_GLOBAL_FTM_MODE)
*num_filters = 0;
else
*num_filters = ucfg_pmo_get_num_wow_filters(hdd_ctx->psoc);
wlan_objmgr_psoc_release_ref(psoc, WLAN_HDD_ID_OBJ_MGR); wlan_objmgr_psoc_release_ref(psoc, WLAN_HDD_ID_OBJ_MGR);

View File

@@ -310,6 +310,8 @@ static void wma_set_default_tgt_config(tp_wma_handle wma_handle,
target_resource_config *tgt_cfg, target_resource_config *tgt_cfg,
struct cds_config_info *cds_cfg) struct cds_config_info *cds_cfg)
{ {
enum QDF_GLOBAL_MODE con_mode;
qdf_mem_zero(tgt_cfg, sizeof(target_resource_config)); qdf_mem_zero(tgt_cfg, sizeof(target_resource_config));
tgt_cfg->num_vdevs = cds_cfg->num_vdevs; tgt_cfg->num_vdevs = cds_cfg->num_vdevs;
@@ -382,9 +384,20 @@ static void wma_set_default_tgt_config(tp_wma_handle wma_handle,
cfg_nan_get_max_ndi(wma_handle->psoc, cfg_nan_get_max_ndi(wma_handle->psoc,
&tgt_cfg->max_ndi); &tgt_cfg->max_ndi);
if (cds_get_conparam() == QDF_GLOBAL_MONITOR_MODE) con_mode = cds_get_conparam();
if (con_mode == QDF_GLOBAL_MONITOR_MODE)
tgt_cfg->rx_decap_mode = CFG_TGT_RX_DECAP_MODE_RAW; tgt_cfg->rx_decap_mode = CFG_TGT_RX_DECAP_MODE_RAW;
if (con_mode == QDF_GLOBAL_FTM_MODE) {
tgt_cfg->num_offload_peers = 0;
tgt_cfg->num_offload_reorder_buffs = 0;
tgt_cfg->bmiss_offload_max_vdev = 0;
tgt_cfg->roam_offload_max_vdev = 0;
tgt_cfg->roam_offload_max_ap_profiles = 0;
tgt_cfg->beacon_tx_offload_max_vdev = 1;
tgt_cfg->num_multicast_filter_entries = 0;
tgt_cfg->gtk_offload_max_vdev = 0;
}
cfg_nan_get_ndp_max_sessions(wma_handle->psoc, cfg_nan_get_ndp_max_sessions(wma_handle->psoc,
&tgt_cfg->max_ndp_sessions); &tgt_cfg->max_ndp_sessions);
@@ -4609,7 +4622,11 @@ static void wma_update_fw_config(struct wlan_objmgr_psoc *psoc,
target_if_get_max_frag_entry(tgt_hdl)); target_if_get_max_frag_entry(tgt_hdl));
target_if_set_max_frag_entry(tgt_hdl, cfg->max_frag_entries); target_if_set_max_frag_entry(tgt_hdl, cfg->max_frag_entries);
cfg->num_wow_filters = ucfg_pmo_get_num_wow_filters(psoc); if (cds_get_conparam() == QDF_GLOBAL_FTM_MODE)
cfg->num_wow_filters = 0;
else
cfg->num_wow_filters = ucfg_pmo_get_num_wow_filters(psoc);
cfg->apf_instruction_size = ucfg_pmo_get_apf_instruction_size(psoc); cfg->apf_instruction_size = ucfg_pmo_get_apf_instruction_size(psoc);
cfg->num_packet_filters = ucfg_pmo_get_num_packet_filters(psoc); cfg->num_packet_filters = ucfg_pmo_get_num_packet_filters(psoc);
} }