qcacmn: Add support to send max ndp sessions to fw

Firmware advertises max number of ndp sessions support in
wmi_service_ready_ext2 event. If the firmware advertised value of
max ndp sessions is non-zero, then host uses a minimum of max ndp
sessions of target_resource_config and firmware advertised max ndp
sessions to configure max ndp sessions in firmware using WMI_INIT_CMD.

Change-Id: Ied6891157ce589e5d36a4f8b9694a95b5c819ad6
CRs-Fixed: 2688393
This commit is contained in:
Abhishek Ambure
2020-05-15 20:22:12 +05:30
committed by nshrivas
parent 04f7a32d29
commit 23dab4b3a5
4 changed files with 20 additions and 0 deletions

View File

@@ -369,6 +369,7 @@ struct wlan_psoc_host_service_ext_param {
* bdf_reg_db_version_minor: BDF REG DB version minor number
* @num_dbr_ring_caps: Number of direct buf rx ring capabilities
* @chwidth_num_peer_caps: Peer limit for peer_chan_width_switch WMI cmd
* @max_ndp_sessions: Max number of ndp session fw supports
*/
struct wlan_psoc_host_service_ext2_param {
uint8_t reg_db_version_major;
@@ -377,6 +378,7 @@ struct wlan_psoc_host_service_ext2_param {
uint8_t bdf_reg_db_version_minor;
uint32_t num_dbr_ring_caps;
uint32_t chwidth_num_peer_caps;
uint32_t max_ndp_sessions;
};
#endif /* _SERVICE_READY_PARAM_H_*/

View File

@@ -412,6 +412,10 @@ void init_deinit_prepare_send_init_cmd(
if (ret_val != QDF_STATUS_SUCCESS)
return;
info->wlan_res_cfg.max_ndp_sessions =
QDF_MIN(info->wlan_res_cfg.max_ndp_sessions,
info->service_ext2_param.max_ndp_sessions);
target_if_debug("FW version 0x%x ", info->target_caps.fw_version);
if (init_deinit_is_service_ext_msg(psoc, tgt_hdl) == QDF_STATUS_SUCCESS)
target_if_debug("0x%x\n",

View File

@@ -5366,6 +5366,7 @@ struct wmi_host_fw_abi_ver {
* @max_rnr_neighbours: Max supported RNR neighbors in multisoc APs
* @ema_max_vap_cnt: Number of maximum EMA tx-vaps at any instance of time
* @ema_max_profile_period: Maximum EMA profile periodicity on any pdev
* @max_ndp_sessions: Max ndp sessions support
*/
typedef struct {
uint32_t num_vdevs;
@@ -5467,6 +5468,7 @@ typedef struct {
uint32_t max_rnr_neighbours;
uint32_t ema_max_vap_cnt;
uint32_t ema_max_profile_period;
uint32_t max_ndp_sessions;
} target_resource_config;
/**

View File

@@ -6924,6 +6924,11 @@ void wmi_copy_resource_config(wmi_resource_config *resource_cfg,
resource_cfg->ema_max_vap_cnt = tgt_res_cfg->ema_max_vap_cnt;
resource_cfg->ema_max_profile_period =
tgt_res_cfg->ema_max_profile_period;
if (tgt_res_cfg->max_ndp_sessions)
resource_cfg->max_ndp_sessions =
tgt_res_cfg->max_ndp_sessions;
if (tgt_res_cfg->atf_config)
WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(resource_cfg->flag1, 1);
if (tgt_res_cfg->mgmt_comp_evt_bundle_support)
@@ -11095,6 +11100,13 @@ extract_service_ready_ext2_tlv(wmi_unified_t wmi_handle, uint8_t *event,
param->chwidth_num_peer_caps = ev->chwidth_num_peer_caps;
param->num_dbr_ring_caps = param_buf->num_dma_ring_caps;
if (param_buf->nan_cap)
param->max_ndp_sessions =
param_buf->nan_cap->max_ndp_sessions;
else
param->max_ndp_sessions = 0;
return QDF_STATUS_SUCCESS;
}