Browse Source

qcacmn: fill htt peer data version as part of init cmd

With latest architecture there are different HTT peer
data versions supported by the firmware, supported htt peer
version will be sent in the service ready and need to feedback
to the firmware in the init command.

Change-Id: Icd0470843198387cd7e0192cbe3821d45ef0534e
CRs-Fixed: 3008706
Arun Kumar Khandavalli 4 năm trước cách đây
mục cha
commit
09cd3e0dd9

+ 19 - 0
target_if/core/inc/target_if.h

@@ -2688,4 +2688,23 @@ void target_psoc_get_twt_ack_cap(struct target_psoc_info *psoc_info, bool *val)
 
 	*val = psoc_info->info.service_ext2_param.twt_ack_support_cap;
 }
+
+/**
+ * target_psoc_target_cap_flags() - flags containing information about target
+ * capabilities
+ * @psoc_info:  pointer to structure target_psoc_info
+ *
+ * API to get flags containing information about target capabilities
+ *
+ * Return: no of target_cap_flags
+ */
+static inline uint32_t target_psoc_get_target_cap_flags
+		(struct target_psoc_info *psoc_info)
+{
+	if (!psoc_info)
+		return 0;
+
+	return psoc_info->info.service_ext2_param.target_cap_flags;
+}
+
 #endif

+ 2 - 0
target_if/init_deinit/inc/service_ready_param.h

@@ -428,6 +428,7 @@ struct wlan_psoc_host_service_ext_param {
  * @max_users_dl_mumimo: Max number of users per-PPDU for Downlink MU-MIMO
  * @max_users_ul_mumimo: Max number of users per-PPDU for Uplink MU-MIMO
  * @twt_ack_support_cap: TWT ack capability support
+ * @target_cap_flags: Rx peer metadata version number used by target
  */
 struct wlan_psoc_host_service_ext2_param {
 	uint8_t reg_db_version_major;
@@ -444,6 +445,7 @@ struct wlan_psoc_host_service_ext2_param {
 	uint16_t max_users_dl_mumimo;
 	uint16_t max_users_ul_mumimo;
 	uint32_t twt_ack_support_cap:1;
+	uint32_t target_cap_flags;
 };
 
 #endif /* _SERVICE_READY_PARAM_H_*/

+ 3 - 0
target_if/init_deinit/src/init_cmd_api.c

@@ -467,6 +467,9 @@ void init_deinit_prepare_send_init_cmd(
 	if (info->service_ext2_param.twt_ack_support_cap)
 		info->wlan_res_cfg.twt_ack_support_cap = true;
 
+	info->wlan_res_cfg.target_cap_flags =
+		target_psoc_get_target_cap_flags(tgt_hdl);
+
 	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",

+ 1 - 0
wmi/inc/wmi_unified_param.h

@@ -5541,6 +5541,7 @@ typedef struct {
 	bool dynamic_pcie_gen_speed_change;
 	bool twt_ack_support_cap;
 	uint32_t ema_init_config;
+	uint32_t target_cap_flags;
 } target_resource_config;
 
 /**

+ 5 - 1
wmi/src/wmi_unified_tlv.c

@@ -7595,6 +7595,9 @@ void wmi_copy_resource_config(wmi_resource_config *resource_cfg,
 	if (tgt_res_cfg->twt_ack_support_cap)
 		WMI_RSRC_CFG_HOST_SERVICE_FLAG_STA_TWT_SYNC_EVT_SUPPORT_SET(
 			resource_cfg->host_service_flags, 1);
+
+	WMI_TARGET_CAP_FLAGS_RX_PEER_METADATA_VERSION_SET(resource_cfg->flags2,
+						 tgt_res_cfg->target_cap_flags);
 }
 
 /* copy_hw_mode_id_in_init_cmd() - Helper routine to copy hw_mode in init cmd
@@ -11418,7 +11421,8 @@ extract_service_ready_ext2_tlv(wmi_unified_t wmi_handle, uint8_t *event,
 						ev->max_user_per_ppdu_mumimo);
 	param->max_users_ul_mumimo = WMI_MAX_USER_PER_PPDU_UL_MUMIMO_GET(
 						ev->max_user_per_ppdu_mumimo);
-
+	param->target_cap_flags = ev->target_cap_flags;
+	wmi_debug("htt peer data :%d", ev->target_cap_flags);
 	return QDF_STATUS_SUCCESS;
 }