Jelajahi Sumber

qcacmn: Handle TWT ack event support in wmi init

In WMI INIT, check whether firmware supports the ack event or
not. If it supports then enable driver support and send it to
firmware during WMI INIT.

Change-Id: Icfdee6bc06e6a393de880b87fdab70665ea7c8b4
CRs-Fixed: 2987898
Jyoti Kumari 4 tahun lalu
induk
melakukan
e831cf3415

+ 4 - 1
target_if/init_deinit/src/init_cmd_api.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -464,6 +464,9 @@ void init_deinit_prepare_send_init_cmd(
 		QDF_MIN(info->wlan_res_cfg.max_ndp_sessions,
 			info->service_ext2_param.max_ndp_sessions);
 
+	if (info->service_ext2_param.twt_ack_support_cap)
+		info->wlan_res_cfg.twt_ack_support_cap = true;
+
 	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

@@ -5535,6 +5535,7 @@ typedef struct {
 	uint32_t is_go_connected_d3wow_enabled;
 	bool sae_eapol_offload;
 	bool dynamic_pcie_gen_speed_change;
+	bool twt_ack_support_cap;
 } target_resource_config;
 
 /**

+ 4 - 0
wmi/src/wmi_unified_tlv.c

@@ -7583,6 +7583,10 @@ void wmi_copy_resource_config(wmi_resource_config *resource_cfg,
 		 tgt_res_cfg->dynamic_pcie_gen_speed_change);
 
 	WMI_RSRC_CFG_FLAGS2_IS_DYNAMIC_PCIE_GEN_SPEED_SWITCH_ENABLED_SET(resource_cfg->flags2, tgt_res_cfg->dynamic_pcie_gen_speed_change);
+
+	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);
 }
 
 /* copy_hw_mode_id_in_init_cmd() - Helper routine to copy hw_mode in init cmd