Browse Source

qcacmn: Disable CP Stats for BE emulation

Disable CP Stats for Beryllium emulation environment. These stats are
invoked heavily by userspace and need to be retrieved from the FW.The
userpace is holding the rtnl_lock while invoking these stats. This
prevents any additional commands to be sent while a stats command is
pending. Since in emulation environment, the turnaround time is quite
high, no iwpriv/ifconfig/iw command can be sent while the CP stats are
pending, making the driver in accessible from command line.

Hence, disable CP stats by simply returning 0 to the caller in emulation
environment.

CRs-Fixed: 2984362
Change-Id: I80aee6ce2bed1c37b964dd5e7194a66287301355
Rakesh Pillai 4 years ago
parent
commit
2ee6da1686
2 changed files with 12 additions and 0 deletions
  1. 2 0
      dp/wifi3.0/be/dp_be.c
  2. 10 0
      wmi/src/wmi_unified_cp_stats_tlv.c

+ 2 - 0
dp/wifi3.0/be/dp_be.c

@@ -161,6 +161,8 @@ static inline QDF_STATUS dp_hw_cc_cmem_addr_init(
 				struct dp_soc *soc,
 				struct dp_soc *soc,
 				struct dp_hw_cookie_conversion_t *cc_ctx)
 				struct dp_hw_cookie_conversion_t *cc_ctx)
 {
 {
+	dp_info("cmem base 0x%llx, size 0x%llx",
+		soc->cmem_base, soc->cmem_size);
 	/* get CMEM for cookie conversion */
 	/* get CMEM for cookie conversion */
 	if (soc->cmem_size < DP_CC_PPT_MEM_SIZE) {
 	if (soc->cmem_size < DP_CC_PPT_MEM_SIZE) {
 		dp_err("cmem_size %llu bytes < 4K", soc->cmem_size);
 		dp_err("cmem_size %llu bytes < 4K", soc->cmem_size);

+ 10 - 0
wmi/src/wmi_unified_cp_stats_tlv.c

@@ -375,6 +375,15 @@ send_infra_cp_stats_request_cmd_tlv(wmi_unified_t wmi_handle,
 }
 }
 #endif
 #endif
 
 
+#ifdef QCA_WIFI_EMULATION
+static QDF_STATUS
+send_stats_request_cmd_tlv(wmi_unified_t wmi_handle,
+			   uint8_t macaddr[QDF_MAC_ADDR_SIZE],
+			   struct stats_request_params *param)
+{
+	return QDF_STATUS_SUCCESS;
+}
+#else
 /**
 /**
  * send_stats_request_cmd_tlv() - WMI request stats function
  * send_stats_request_cmd_tlv() - WMI request stats function
  * @param wmi_handle: handle to WMI.
  * @param wmi_handle: handle to WMI.
@@ -424,6 +433,7 @@ send_stats_request_cmd_tlv(wmi_unified_t wmi_handle,
 
 
 	return qdf_status_from_os_return(ret);
 	return qdf_status_from_os_return(ret);
 }
 }
+#endif
 
 
 #ifdef WLAN_FEATURE_BIG_DATA_STATS
 #ifdef WLAN_FEATURE_BIG_DATA_STATS
 /**
 /**