Browse Source

qcacld-3.0: Remove legacy implementation of stats event handler

Driver has a stats infrastructure and all the stats related
commands are using this infrastructure and for this
target_if_mc_cp_stats_stats_event_handler is getting used.

Remove legacy implementation of stats event handler
wma_stats_event_handler and related APIs.
With this change remove unused structures also.

Change-Id: I9a892b5f7486a406654256fc2cc8177f2fafe790
CRs-Fixed: 2481937
Ashish Kumar Dhanotiya 5 years ago
parent
commit
1ac4188eb5

+ 2 - 86
core/mac/inc/sir_api.h

@@ -48,6 +48,7 @@ struct mac_context;
 #include "wlan_policy_mgr_api.h"
 #include "wlan_tdls_public_structs.h"
 #include "qca_vendor.h"
+#include "wlan_cp_stats_mc_defs.h"
 
 #define OFFSET_OF(structType, fldName)   (&((structType *)0)->fldName)
 
@@ -1383,41 +1384,6 @@ struct set_context_rsp {
 	struct qdf_mac_addr peer_macaddr;
 };
 
-/*
- * tpAniGetPEStatsRsp is tied to
- * for PE ==> SME eWNI_SME_GET_STATISTICS_RSP msgId  and
- * for HAL ==> PE SIR_HAL_GET_STATISTICS_RSP msgId
- */
-typedef struct sAniGetPEStatsRsp {
-	/* Common for all types are responses */
-	uint16_t msgType;       /* message type is same as the request type */
-	/* length of the entire request, includes the pStatsBuf length too */
-	uint16_t msgLen;
-	uint8_t sessionId;
-	uint32_t rc;            /* success/failure */
-	uint32_t staId;         /* Per STA stats request must contain valid */
-	/* categories of stats requested. look at ePEStatsMask */
-	uint32_t statsMask;
-	/* void                  *pStatsBuf; */
-	/*
-	 * The Stats buffer starts here and can be an aggregate of more than one
-	 * statistics structure depending on statsMask. The void pointer
-	 * "pStatsBuf" is commented out intentionally and the src code that uses
-	 * this structure should take that into account.
-	 */
-} tAniGetPEStatsRsp, *tpAniGetPEStatsRsp;
-
-typedef struct sAniGetRssiReq {
-	/* Common for all types are requests */
-	uint16_t msgType;       /* message type is same as the request type */
-	uint16_t msgLen;        /* length of the entire request */
-	uint8_t sessionId;
-	uint8_t staId;
-	int8_t lastRSSI;        /* in case of error, return last RSSI */
-	void *rssiCallback;
-	void *pDevContext;      /* device context */
-} tAniGetRssiReq, *tpAniGetRssiReq;
-
 typedef struct sAniGetSnrReq {
 	/* Common for all types are requests */
 	uint16_t msgType;       /* message type is same as the request type */
@@ -1459,29 +1425,7 @@ typedef struct sAniTXFailMonitorInd {
 	void *txFailIndCallback;
 } tAniTXFailMonitorInd, *tpAniTXFailMonitorInd;
 
-#ifndef QCA_SUPPORT_CP_STATS
-/**
- * enum tx_rate_info - tx_rate flags
- * @TX_RATE_LEGACY: Legacy rates
- * @TX_RATE_HT20: HT20 rates
- * @TX_RATE_HT40: HT40 rates
- * @TX_RATE_SGI: Rate with Short guard interval
- * @TX_RATE_LGI: Rate with Long guard interval
- * @TX_RATE_VHT20: VHT 20 rates
- * @TX_RATE_VHT40: VHT 40 rates
- * @TX_RATE_VHT80: VHT 80 rates
- */
-enum tx_rate_info {
-	TX_RATE_LEGACY = 0x1,
-	TX_RATE_HT20 = 0x2,
-	TX_RATE_HT40 = 0x4,
-	TX_RATE_SGI = 0x8,
-	TX_RATE_LGI = 0x10,
-	TX_RATE_VHT20 = 0x20,
-	TX_RATE_VHT40 = 0x40,
-	TX_RATE_VHT80 = 0x80
-};
-#endif
+
 /**********************PE Statistics end*************************/
 
 typedef struct sSirP2PNoaAttr {
@@ -2589,34 +2533,6 @@ struct link_speed_info {
 	uint32_t estLinkSpeed;  /* Linkspeed from firmware */
 };
 
-/**
- * struct sir_peer_info - peer information struct
- * @peer_macaddr: MAC address
- * @rssi: rssi
- * @tx_rate: last tx rate
- * @rx_rate: last rx rate
- *
- * a station's information
- */
-struct sir_peer_info {
-	struct qdf_mac_addr peer_macaddr;
-	int8_t rssi;
-	uint32_t tx_rate;
-	uint32_t rx_rate;
-};
-
-/**
- * struct sir_peer_info_resp - all peers information struct
- * @count: peer's number
- * @info: peer information
- *
- * all station's information
- */
-struct sir_peer_info_resp {
-	uint8_t count;
-	struct sir_peer_info info[0];
-};
-
 /**
  * struct sir_peer_info_ext_req - peer info request struct
  * @peer_macaddr: MAC address

+ 1 - 1
core/mac/inc/wni_api.h

@@ -157,7 +157,7 @@ enum eWniMsgTypes {
 	eWNI_SME_DFS_CSAIE_TX_COMPLETE_IND = SIR_SME_MSG_TYPES_BEGIN + 88,
 	/* update in beacons/probe rsp */
 	eWNI_SME_STATS_EXT_EVENT = SIR_SME_MSG_TYPES_BEGIN + 89,
-	eWNI_SME_GET_PEER_INFO_IND = SIR_SME_MSG_TYPES_BEGIN + 90,
+	/* Unused SIR_SME_MSG_TYPES_BEGIN + 90 */
 	eWNI_SME_GET_PEER_INFO_EXT_IND = SIR_SME_MSG_TYPES_BEGIN + 91,
 	/* indicates Additional IE from hdd to PE */
 	eWNI_SME_UPDATE_ADDITIONAL_IES = SIR_SME_MSG_TYPES_BEGIN + 93,

+ 0 - 1
core/mac/src/sys/legacy/src/utils/src/mac_trace.c

@@ -357,7 +357,6 @@ uint8_t *mac_trace_get_sme_msg_string(uint16_t sme_msg)
 		CASE_RETURN_STRING(eWNI_SME_DEFAULT_SCAN_IE);
 		CASE_RETURN_STRING(eWNI_SME_ROAM_SCAN_OFFLOAD_REQ);
 		CASE_RETURN_STRING(eWNI_SME_LOST_LINK_INFO_IND);
-		CASE_RETURN_STRING(eWNI_SME_GET_PEER_INFO_IND);
 		CASE_RETURN_STRING(eWNI_SME_GET_PEER_INFO_EXT_IND);
 		CASE_RETURN_STRING(eWNI_SME_RSO_CMD_STATUS_IND);
 		CASE_RETURN_STRING(eWNI_SME_TRIGGER_SAE);

+ 0 - 1
core/sme/inc/csr_api.h

@@ -1420,7 +1420,6 @@ QDF_STATUS csr_set_channels(struct mac_context *mac,
 const char *get_e_roam_cmd_status_str(eRoamCmdStatus val);
 const char *get_e_csr_roam_result_str(eCsrRoamResult val);
 const char *csr_phy_mode_str(eCsrPhyMode phy_mode);
-typedef void (*tCsrRssiCallback)(int8_t rssi, uint32_t staId, void *pContext);
 
 #ifdef FEATURE_WLAN_ESE
 typedef void (*tCsrTsmStatsCallback)(tAniTrafStrmMetrics tsmMetrics,

+ 0 - 14
core/sme/inc/csr_internal.h

@@ -180,14 +180,6 @@ enum csr_roam_wmstatus_changetypes {
 	eCsrDeauthenticated
 };
 
-enum csr_roam_stats_classtypes {
-	eCsrSummaryStats = 0,
-	eCsrGlobalClassAStats,
-	eCsrGlobalClassDStats,
-	csr_per_chain_rssi_stats,
-	eCsrMaxStats
-};
-
 enum csr_diagwlan_status_eventsubtype {
 	eCSR_WLAN_STATUS_CONNECT = 0,
 	eCSR_WLAN_STATUS_DISCONNECT
@@ -686,12 +678,6 @@ struct csr_roamstruct {
 	uint32_t numValidChannels;       /* total number of channels in CFG */
 	int32_t sPendingCommands;
 	qdf_mc_timer_t hTimerWaitForKey; /* support timeout for WaitForKey */
-#ifndef QCA_SUPPORT_CP_STATS
-	tCsrSummaryStatsInfo summaryStatsInfo;
-	tCsrGlobalClassAStatsInfo classAStatsInfo;
-	tCsrGlobalClassDStatsInfo classDStatsInfo;
-	struct csr_per_chain_rssi_stats_info  per_chain_rssi_stats;
-#endif
 	struct csr_timer_info WaitForKeyTimerInfo;
 	struct csr_roam_session *roamSession;
 	tCsrNeighborRoamControlInfo neighborRoamInfo[WLAN_MAX_VDEVS];

+ 1 - 4
core/sme/inc/sme_internal.h

@@ -317,10 +317,7 @@ struct sme_context {
 	/* linkspeed callback */
 	sme_link_speed_cb link_speed_cb;
 	void *link_speed_context;
-	/* get peer info callback */
-	void (*pget_peer_info_ind_cb)(struct sir_peer_info_resp *param,
-		void *pcontext);
-	void *pget_peer_info_cb_context;
+
 	/* get extended peer info callback */
 	void (*pget_peer_info_ext_ind_cb)(struct sir_peer_info_ext_resp *param,
 		void *pcontext);

+ 1 - 3
core/sme/inc/sme_trace.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2019 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
@@ -69,8 +69,6 @@ enum {
 	TRACE_CODE_SME_RX_HDD_EXIT_WOWL,
 	TRACE_CODE_SME_RX_HDD_SET_KEY,
 	TRACE_CODE_SME_RX_HDD_REMOVE_KEY,
-	TRACE_CODE_SME_RX_HDD_GET_STATS,
-	TRACE_CODE_SME_RX_HDD_GET_RSSI,
 	TRACE_CODE_SME_RX_HDD_GET_CNTRYCODE,
 	TRACE_CODE_SME_RX_HDD_SET_CNTRYCODE,
 	TRACE_CODE_SME_RX_HDD_SET_CFGPRIVACY,

+ 0 - 19
core/sme/src/common/sme_api.c

@@ -1941,8 +1941,6 @@ static QDF_STATUS sme_process_antenna_mode_resp(struct mac_context *mac,
 QDF_STATUS sme_process_msg(struct mac_context *mac, struct scheduler_msg *pMsg)
 {
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;
-	struct sir_peer_info *peer_stats;
-	struct sir_peer_info_resp *peer_info_rsp;
 
 	if (!pMsg) {
 		sme_err("Empty message for SME");
@@ -2096,23 +2094,6 @@ QDF_STATUS sme_process_msg(struct mac_context *mac, struct scheduler_msg *pMsg)
 		status = sme_stats_ext_event(mac, pMsg->bodyptr);
 		qdf_mem_free(pMsg->bodyptr);
 		break;
-	case eWNI_SME_GET_PEER_INFO_IND:
-		if (mac->sme.pget_peer_info_ind_cb)
-			mac->sme.pget_peer_info_ind_cb(pMsg->bodyptr,
-				mac->sme.pget_peer_info_cb_context);
-		if (pMsg->bodyptr) {
-			peer_info_rsp = (struct sir_peer_info_resp *)
-							(pMsg->bodyptr);
-			peer_stats = (struct sir_peer_info *)
-							(peer_info_rsp->info);
-			if (peer_stats) {
-				mac->peer_rssi = peer_stats[0].rssi;
-				mac->peer_txrate = peer_stats[0].tx_rate;
-				mac->peer_rxrate = peer_stats[0].rx_rate;
-			}
-		}
-		qdf_mem_free(pMsg->bodyptr);
-		break;
 	case eWNI_SME_GET_PEER_INFO_EXT_IND:
 		if (mac->sme.pget_peer_info_ext_ind_cb)
 			mac->sme.pget_peer_info_ext_ind_cb(pMsg->bodyptr,

+ 1 - 3
core/sme/src/common/sme_trace.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2019 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
@@ -85,8 +85,6 @@ static uint8_t *sme_trace_get_rx_msg_string(uint32_t code)
 		CASE_RETURN_STRING(TRACE_CODE_SME_RX_HDD_EXIT_WOWL);
 		CASE_RETURN_STRING(TRACE_CODE_SME_RX_HDD_SET_KEY);
 		CASE_RETURN_STRING(TRACE_CODE_SME_RX_HDD_REMOVE_KEY);
-		CASE_RETURN_STRING(TRACE_CODE_SME_RX_HDD_GET_STATS);
-		CASE_RETURN_STRING(TRACE_CODE_SME_RX_HDD_GET_RSSI);
 		CASE_RETURN_STRING(TRACE_CODE_SME_RX_HDD_GET_CNTRYCODE);
 		CASE_RETURN_STRING(TRACE_CODE_SME_RX_HDD_SET_CNTRYCODE);
 		CASE_RETURN_STRING(TRACE_CODE_SME_RX_HDD_SET_CFGPRIVACY);

+ 0 - 10
core/sme/src/csr/csr_api_roam.c

@@ -1121,15 +1121,6 @@ QDF_STATUS csr_update_channel_list(struct mac_context *mac)
 	return QDF_STATUS_SUCCESS;
 }
 
-#ifdef QCA_SUPPORT_CP_STATS
-static void csr_init_tl_stats(struct mac_context *mac_ctx) {}
-#else
-static void csr_init_tl_stats(struct mac_context *mac_ctx)
-{
-	mac_ctx->roam.tlStatsReqInfo.numClient = 0;
-}
-#endif /* QCA_SUPPORT_CP_STATS */
-
 QDF_STATUS csr_start(struct mac_context *mac)
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
@@ -1146,7 +1137,6 @@ QDF_STATUS csr_start(struct mac_context *mac)
 		mac->roam.sPendingCommands = 0;
 		for (i = 0; i < WLAN_MAX_VDEVS; i++)
 			status = csr_neighbor_roam_init(mac, i);
-		csr_init_tl_stats(mac);
 		if (!QDF_IS_STATUS_SUCCESS(status)) {
 			sme_warn("Couldn't Init HO control blk");
 			break;

+ 0 - 16
core/wma/inc/wma.h

@@ -199,12 +199,6 @@
 
 #define WMA_VDEV_SET_KEY_WAKELOCK_TIMEOUT	WAKELOCK_DURATION_RECOMMENDED
 
-#define WMA_TGT_INVALID_SNR (0)
-#define WMA_TGT_IS_VALID_RSSI(x)  ((x) != 0xFF)
-
-#define WMA_TGT_IS_VALID_SNR(x)  ((x) >= 0 && (x) < WMA_TGT_MAX_SNR)
-#define WMA_TGT_IS_INVALID_SNR(x) (!WMA_TGT_IS_VALID_SNR(x))
-
 #define WMA_TX_Q_RECHECK_TIMER_WAIT      2      /* 2 ms */
 #define WMA_MAX_NUM_ARGS 8
 
@@ -735,7 +729,6 @@ struct roam_synch_frame_ind {
  * @key: GTK key
  * @uapsd_cached_val: uapsd cached value
  * @stats_rsp: stats response
- * @fw_stats_set: fw stats value
  * @del_staself_req: delete sta self request
  * @bss_status: bss status
  * @rate_flags: rate flags
@@ -801,8 +794,6 @@ struct wma_txrx_node {
 	wma_igtk_key_t key;
 #endif /* WLAN_FEATURE_11W */
 	uint32_t uapsd_cached_val;
-	tAniGetPEStatsRsp *stats_rsp;
-	uint8_t fw_stats_set;
 	void *del_staself_req;
 	bool is_del_sta_defered;
 	qdf_atomic_t bss_status;
@@ -957,7 +948,6 @@ struct wma_wlm_stats_data {
  * @pGetRssiReq: get RSSI request
  * @get_one_peer_info: When a "get peer info" request is active, is
  *   the request for a single peer?
- * @get_sta_peer_info: Is a "get peer info" request active?
  * @peer_macaddr: When @get_one_peer_info is true, the peer's mac address
  * @thermal_mgmt_info: Thermal mitigation related info
  * @enable_mc_list: To Check if Multicast list filtering is enabled in FW
@@ -994,10 +984,6 @@ struct wma_wlm_stats_data {
  * @old_hw_mode_index: Previous configured HW mode index
  * @new_hw_mode_index: Current configured HW mode index
  * @peer_authorized_cb: peer authorized hdd callback
- * @wow_unspecified_wake_count: Number of wake events which did not
- *   correspond to known wake events. Note that known wake events are
- *   tracked on a per-vdev basis via the struct sir_vdev_wow_stats
- *   wow_stats in struct wma_txrx_node
  * @ocb_config_req: OCB request context
  * @self_gen_frm_pwr: Self-generated frame power
  * @tx_chain_mask_cck: Is the CCK tx chain mask enabled
@@ -1091,7 +1077,6 @@ typedef struct {
 	uint8_t powersave_mode;
 	void *pGetRssiReq;
 	bool get_one_peer_info;
-	bool get_sta_peer_info;
 	struct qdf_mac_addr peer_macaddr;
 	t_thermal_mgmt thermal_mgmt_info;
 	bool enable_mc_list;
@@ -1129,7 +1114,6 @@ typedef struct {
 	uint32_t old_hw_mode_index;
 	uint32_t new_hw_mode_index;
 	wma_peer_authorized_fp peer_authorized_cb;
-	uint32_t wow_unspecified_wake_count;
 	struct sir_ocb_config *ocb_config_req;
 	uint16_t self_gen_frm_pwr;
 	bool tx_chain_mask_cck;

+ 0 - 7
core/wma/inc/wma_internal.h

@@ -32,17 +32,10 @@
 
 #define WMA_2_4_GHZ_MAX_FREQ  3000
 
-/* pdev vdev and peer stats*/
-#define FW_PDEV_STATS_SET 0x1
-#define FW_VDEV_STATS_SET 0x2
-#define FW_PEER_STATS_SET 0x4
-#define FW_RSSI_PER_CHAIN_STATS_SET 0x8
-
 /*AR9888/AR6320  noise floor approx value
  * similar to the mentioned the WMA
  */
 #define WMA_TGT_NOISE_FLOOR_DBM (-96)
-#define WMA_TGT_MAX_SNR         (WMA_TGT_NOISE_FLOOR_DBM * (-1))
 #define WMA_INVALID_PER_CHAIN_SNR  (0x80)
 #define WMA_INVALID_PER_CHAIN_RSSI (0xFF)
 

+ 0 - 4
core/wma/src/wma_data.c

@@ -731,7 +731,6 @@ ht_vht_done:
 	return ret;
 }
 
-#ifdef QCA_SUPPORT_CP_STATS
 /**
  * wma_cp_stats_set_rate_flag() - set rate flags within cp_stats priv object
  * @wma: wma handle
@@ -756,9 +755,6 @@ static void wma_cp_stats_set_rate_flag(tp_wma_handle wma, uint8_t vdev_id)
 	ucfg_mc_cp_stats_set_rate_flags(vdev, iface->rate_flags);
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_WMA_ID);
 }
-#else
-static void wma_cp_stats_set_rate_flag(tp_wma_handle wma, uint8_t vdev_id) {}
-#endif
 
 /**
  * wma_set_bss_rate_flags() - set rate flags based on BSS capability

+ 0 - 11
core/wma/src/wma_dev_if.c

@@ -6018,12 +6018,6 @@ void wma_delete_bss_ho_fail(tp_wma_handle wma, tpDeleteBssParams params)
 		goto fail_del_bss_ho_fail;
 	}
 
-	/* Free the allocated stats response buffer for the the session */
-	if (iface->stats_rsp) {
-		qdf_mem_free(iface->stats_rsp);
-		iface->stats_rsp = NULL;
-	}
-
 	if (iface->psnr_req) {
 		qdf_mem_free(iface->psnr_req);
 		iface->psnr_req = NULL;
@@ -6191,11 +6185,6 @@ void wma_delete_bss(tp_wma_handle wma, tpDeleteBssParams params)
 				__func__, params->smesessionId);
 		goto out;
 	}
-	/*Free the allocated stats response buffer for the the session */
-	if (iface->stats_rsp) {
-		qdf_mem_free(iface->stats_rsp);
-		iface->stats_rsp = NULL;
-	}
 
 	if (iface->psnr_req) {
 		qdf_mem_free(iface->psnr_req);

+ 0 - 20
core/wma/src/wma_main.c

@@ -2909,11 +2909,6 @@ void wma_vdev_deinit(struct wma_txrx_node *vdev)
 		vdev->del_staself_req = NULL;
 	}
 
-	if (vdev->stats_rsp) {
-		qdf_mem_free(vdev->stats_rsp);
-		vdev->stats_rsp = NULL;
-	}
-
 	if (vdev->psnr_req) {
 		qdf_mem_free(vdev->psnr_req);
 		vdev->psnr_req = NULL;
@@ -2970,18 +2965,6 @@ void wma_wmi_stop(void)
 	wmi_stop(wma_handle->wmi_handle);
 }
 
-#ifdef QCA_SUPPORT_CP_STATS
-static void wma_register_stats_events(wmi_unified_t wmi_handle) {}
-#else
-static void wma_register_stats_events(wmi_unified_t wmi_handle)
-{
-	wmi_unified_register_event_handler(wmi_handle,
-					   wmi_update_stats_event_id,
-					   wma_stats_event_handler,
-					   WMA_RX_SERIALIZER_CTX);
-}
-#endif
-
 #ifdef CONFIG_WMI_BCN_OFFLOAD
 static QDF_STATUS
 wma_register_swba_events(wmi_unified_t wmi_handle)
@@ -3425,9 +3408,6 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc,
 					   wma_peer_sta_kickout_event_handler,
 					   WMA_RX_SERIALIZER_CTX);
 
-	/* register for stats event */
-	wma_register_stats_events(wma_handle->wmi_handle);
-
 	/* register for stats response event */
 	wmi_unified_register_event_handler(wma_handle->wmi_handle,
 					   wmi_get_arp_stats_req_id,

+ 0 - 691
core/wma/src/wma_utils.c

@@ -284,54 +284,6 @@ rate_found:
 	return match_rate ? index : INVALID_MCS_IDX;
 }
 
-#ifndef QCA_SUPPORT_CP_STATS
-/**
- * wma_peek_vdev_req() - peek what request message is queued for response.
- *			 the function does not delete the node after found
- * @wma: WMA handle
- * @vdev_id: vdev ID
- * @type: request message type
- *
- * Return: the request message found
- */
-static struct wma_target_req *wma_peek_vdev_req(tp_wma_handle wma,
-						uint8_t vdev_id, uint8_t type)
-{
-	struct wma_target_req *req_msg = NULL;
-	bool found = false;
-	qdf_list_node_t *node1 = NULL, *node2 = NULL;
-
-	qdf_spin_lock_bh(&wma->vdev_respq_lock);
-	if (QDF_STATUS_SUCCESS != qdf_list_peek_front(&wma->vdev_resp_queue,
-							&node2)) {
-		qdf_spin_unlock_bh(&wma->vdev_respq_lock);
-		return NULL;
-	}
-
-	do {
-		node1 = node2;
-		req_msg = qdf_container_of(node1, struct wma_target_req, node);
-		if (req_msg->vdev_id != vdev_id)
-			continue;
-		if (req_msg->type != type)
-			continue;
-
-		found = true;
-		break;
-	} while (QDF_STATUS_SUCCESS == qdf_list_peek_next(&wma->vdev_resp_queue,
-							  node1, &node2));
-	qdf_spin_unlock_bh(&wma->vdev_respq_lock);
-	if (!found) {
-		WMA_LOGE(FL("target request not found for vdev_id %d type %d"),
-			 vdev_id, type);
-		return NULL;
-	}
-	WMA_LOGD(FL("target request found for vdev id: %d type %d msg %d"),
-		 vdev_id, type, req_msg->msg_type);
-	return req_msg;
-}
-#endif /* QCA_SUPPORT_CP_STATS */
-
 void wma_lost_link_info_handler(tp_wma_handle wma, uint32_t vdev_id,
 					int32_t rssi)
 {
@@ -2434,300 +2386,8 @@ void wma_config_stats_ext_threshold(tp_wma_handle wma,
 	if (QDF_IS_STATUS_ERROR(status))
 		wmi_buf_free(buf);
 }
-
 #endif /* WLAN_FEATURE_LINK_LAYER_STATS */
 
-#ifndef QCA_SUPPORT_CP_STATS
-/**
- * wma_update_pdev_stats() - update pdev stats
- * @wma: wma handle
- * @pdev_stats: pdev stats
- *
- * Return: none
- */
-static void wma_update_pdev_stats(tp_wma_handle wma,
-				  wmi_pdev_stats *pdev_stats)
-{
-	tAniGetPEStatsRsp *stats_rsp_params;
-	uint32_t temp_mask;
-	uint8_t *stats_buf;
-	tCsrGlobalClassAStatsInfo *classa_stats = NULL;
-	struct wma_txrx_node *node;
-	uint8_t i;
-
-	for (i = 0; i < wma->max_bssid; i++) {
-		node = &wma->interfaces[i];
-		stats_rsp_params = node->stats_rsp;
-		if (stats_rsp_params) {
-			node->fw_stats_set |= FW_PDEV_STATS_SET;
-			WMA_LOGD("<---FW PDEV STATS received for vdevId:%d", i);
-			stats_buf = (uint8_t *) (stats_rsp_params + 1);
-			temp_mask = stats_rsp_params->statsMask;
-			if (temp_mask & (1 << eCsrSummaryStats))
-				stats_buf += sizeof(tCsrSummaryStatsInfo);
-
-			if (temp_mask & (1 << eCsrGlobalClassAStats)) {
-				classa_stats =
-					(tCsrGlobalClassAStatsInfo *) stats_buf;
-				classa_stats->max_pwr = pdev_stats->chan_tx_pwr;
-			}
-		}
-	}
-}
-
-/**
- * wma_vdev_stats_lost_link_helper() - helper function to extract
- * lost link information from vdev statistics event while deleting BSS.
- * @wma: WMA handle
- * @vdev_stats: statistics information from firmware
- *
- * This is for informing HDD to collect lost link information while
- * disconnection. Following conditions to check
- * 1. vdev is up
- * 2. bssid is zero. When handling DELETE_BSS request message, it sets bssid to
- * zero, hence add the check here to indicate the event comes during deleting
- * BSS
- * 3. DELETE_BSS is the request message queued. Put this condition check on the
- * last one as it consumes more resource searching entries in the  list
- *
- * Return: none
- */
-static void wma_vdev_stats_lost_link_helper(tp_wma_handle wma,
-					    wmi_vdev_stats *vdev_stats)
-{
-	struct wma_txrx_node *node;
-	int8_t rssi;
-	struct wma_target_req *req_msg;
-	static const uint8_t zero_mac[QDF_MAC_ADDR_SIZE] = {0};
-	bool db2dbm_enabled;
-
-	if (vdev_stats->vdev_id >= wma->max_bssid) {
-		WMA_LOGE("%s: Invalid vdev_id %hu",
-			__func__, vdev_stats->vdev_id);
-		return;
-	}
-
-	db2dbm_enabled = wlan_psoc_nif_fw_ext_cap_get(wma->psoc,
-						      WLAN_SOC_CEXT_HW_DB2DBM);
-	node = &wma->interfaces[vdev_stats->vdev_id];
-	if (wma_is_vdev_up(vdev_stats->vdev_id) &&
-	    !qdf_mem_cmp(node->bssid, zero_mac, QDF_MAC_ADDR_SIZE)) {
-		req_msg = wma_peek_vdev_req(wma, vdev_stats->vdev_id,
-					    WMA_TARGET_REQ_TYPE_VDEV_STOP);
-		if ((!req_msg) ||
-		    (WMA_DELETE_BSS_REQ != req_msg->msg_type)) {
-			WMA_LOGD(FL("cannot find DELETE_BSS request message"));
-			return;
-		}
-
-		WMA_LOGD(FL("get vdev id %d, beancon snr %d, data snr %d"),
-			vdev_stats->vdev_id, vdev_stats->vdev_snr.bcn_snr,
-			vdev_stats->vdev_snr.dat_snr);
-
-		wlan_util_stats_get_rssi(db2dbm_enabled,
-					 vdev_stats->vdev_snr.bcn_snr,
-					 vdev_stats->vdev_snr.dat_snr,
-					 &rssi);
-
-		wma_lost_link_info_handler(wma, vdev_stats->vdev_id, rssi);
-	}
-}
-
-/**
- * wma_update_vdev_stats() - update vdev stats
- * @wma: wma handle
- * @vdev_stats: vdev stats
- *
- * Return: none
- */
-static void wma_update_vdev_stats(tp_wma_handle wma,
-				  wmi_vdev_stats *vdev_stats)
-{
-	tAniGetPEStatsRsp *stats_rsp_params;
-	tCsrSummaryStatsInfo *summary_stats = NULL;
-	uint8_t *stats_buf;
-	struct wma_txrx_node *node;
-	uint8_t i;
-	int8_t rssi = 0;
-	QDF_STATUS qdf_status;
-	tAniGetRssiReq *pGetRssiReq = (tAniGetRssiReq *) wma->pGetRssiReq;
-	struct scheduler_msg sme_msg = { 0 };
-	int32_t bcn_snr, dat_snr;
-	bool db2dbm_enabled;
-
-	if (vdev_stats->vdev_id >= wma->max_bssid) {
-		WMA_LOGE("%s: Invalid vdev_id %hu",
-			__func__, vdev_stats->vdev_id);
-		return;
-	}
-
-	bcn_snr = vdev_stats->vdev_snr.bcn_snr;
-	dat_snr = vdev_stats->vdev_snr.dat_snr;
-	WMA_LOGD("vdev id %d beancon snr %d data snr %d",
-		 vdev_stats->vdev_id, bcn_snr, dat_snr);
-
-	db2dbm_enabled = wlan_psoc_nif_fw_ext_cap_get(wma->psoc,
-						      WLAN_SOC_CEXT_HW_DB2DBM);
-	node = &wma->interfaces[vdev_stats->vdev_id];
-	stats_rsp_params = node->stats_rsp;
-	if (stats_rsp_params) {
-		stats_buf = (uint8_t *) (stats_rsp_params + 1);
-		node->fw_stats_set |= FW_VDEV_STATS_SET;
-		WMA_LOGD("<---FW VDEV STATS received for vdevId:%d",
-			 vdev_stats->vdev_id);
-		if (stats_rsp_params->statsMask & (1 << eCsrSummaryStats)) {
-			summary_stats = (tCsrSummaryStatsInfo *) stats_buf;
-			for (i = 0; i < 4; i++) {
-				summary_stats->tx_frm_cnt[i] =
-					vdev_stats->tx_frm_cnt[i];
-				summary_stats->fail_cnt[i] =
-					vdev_stats->fail_cnt[i];
-				summary_stats->multiple_retry_cnt[i] =
-					vdev_stats->multiple_retry_cnt[i];
-			}
-
-			summary_stats->rx_frm_cnt = vdev_stats->rx_frm_cnt;
-			summary_stats->rx_error_cnt = vdev_stats->rx_err_cnt;
-			summary_stats->rx_discard_cnt =
-				vdev_stats->rx_discard_cnt;
-			summary_stats->ack_fail_cnt = vdev_stats->ack_fail_cnt;
-			summary_stats->rts_succ_cnt = vdev_stats->rts_succ_cnt;
-			summary_stats->rts_fail_cnt = vdev_stats->rts_fail_cnt;
-			/* Update SNR and RSSI in SummaryStats */
-			wlan_util_stats_get_rssi(db2dbm_enabled,
-						 bcn_snr, dat_snr,
-						 &summary_stats->rssi);
-			summary_stats->snr = summary_stats->rssi -
-							WMA_TGT_NOISE_FLOOR_DBM;
-		}
-	}
-
-	if (pGetRssiReq && pGetRssiReq->sessionId == vdev_stats->vdev_id) {
-		wlan_util_stats_get_rssi(db2dbm_enabled, bcn_snr, dat_snr,
-					 &rssi);
-
-		WMA_LOGD("Average Rssi = %d, vdev id= %d", rssi,
-			 pGetRssiReq->sessionId);
-
-		/* update the average rssi value to UMAC layer */
-		if (pGetRssiReq->rssiCallback) {
-			((tCsrRssiCallback) (pGetRssiReq->rssiCallback))(rssi,
-						pGetRssiReq->staId,
-						pGetRssiReq->pDevContext);
-		}
-
-		qdf_mem_free(pGetRssiReq);
-		wma->pGetRssiReq = NULL;
-	}
-
-	if (node->psnr_req) {
-		tAniGetSnrReq *p_snr_req = node->psnr_req;
-
-		if (WMA_TGT_IS_VALID_SNR(bcn_snr))
-			p_snr_req->snr = bcn_snr;
-		else if (WMA_TGT_IS_VALID_SNR(dat_snr))
-			p_snr_req->snr = dat_snr;
-		else
-			p_snr_req->snr = WMA_TGT_INVALID_SNR;
-
-		sme_msg.type = eWNI_SME_SNR_IND;
-		sme_msg.bodyptr = p_snr_req;
-		sme_msg.bodyval = 0;
-
-		qdf_status = scheduler_post_message(QDF_MODULE_ID_WMA,
-						    QDF_MODULE_ID_SME,
-						    QDF_MODULE_ID_SME,
-						    &sme_msg);
-		if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
-			WMA_LOGE("%s: Fail to post snr ind msg", __func__);
-			qdf_mem_free(p_snr_req);
-		}
-
-		node->psnr_req = NULL;
-	}
-	wma_vdev_stats_lost_link_helper(wma, vdev_stats);
-}
-
-/**
- * wma_update_peer_stats() - update peer stats
- * @wma: wma handle
- * @peer_stats: peer stats
- *
- * Return: none
- */
-static void wma_update_peer_stats(tp_wma_handle wma,
-				  wmi_peer_stats *peer_stats)
-{
-	tAniGetPEStatsRsp *stats_rsp_params;
-	tCsrGlobalClassAStatsInfo *classa_stats = NULL;
-	struct wma_txrx_node *node;
-	uint8_t *stats_buf, vdev_id, macaddr[QDF_MAC_ADDR_SIZE], mcsRateFlags;
-	uint32_t temp_mask;
-	uint8_t nss;
-
-	WMI_MAC_ADDR_TO_CHAR_ARRAY(&peer_stats->peer_macaddr, &macaddr[0]);
-	if (!wma_find_vdev_by_bssid(wma, macaddr, &vdev_id))
-		return;
-
-	node = &wma->interfaces[vdev_id];
-	stats_rsp_params = (tAniGetPEStatsRsp *) node->stats_rsp;
-	if (stats_rsp_params) {
-		node->fw_stats_set |= FW_PEER_STATS_SET;
-		WMA_LOGD("<-- FW PEER STATS received for vdevId:%d", vdev_id);
-		stats_buf = (uint8_t *) (stats_rsp_params + 1);
-		temp_mask = stats_rsp_params->statsMask;
-		if (temp_mask & (1 << eCsrSummaryStats))
-			stats_buf += sizeof(tCsrSummaryStatsInfo);
-
-		if (temp_mask & (1 << eCsrGlobalClassAStats)) {
-			classa_stats = (tCsrGlobalClassAStatsInfo *) stats_buf;
-			WMA_LOGD("peer tx rate:%d", peer_stats->peer_tx_rate);
-			WMA_LOGD("peer rx rate:%d", peer_stats->peer_rx_rate);
-			/* The linkspeed returned by fw is in kbps so convert
-			 * it in to units of 500kbps which is expected by UMAC
-			 */
-			if (peer_stats->peer_tx_rate) {
-				classa_stats->tx_rate =
-					peer_stats->peer_tx_rate / 500;
-			}
-
-			if (peer_stats->peer_rx_rate) {
-				classa_stats->rx_rate =
-					peer_stats->peer_rx_rate / 500;
-			}
-
-			classa_stats->tx_rx_rate_flags = node->rate_flags;
-			if (!(node->rate_flags & TX_RATE_LEGACY)) {
-				nss = node->nss;
-				classa_stats->tx_mcs_index =
-					wma_get_mcs_idx(
-						(peer_stats->peer_tx_rate /
-						100), node->rate_flags,
-						&nss, &mcsRateFlags);
-				classa_stats->tx_nss = nss;
-				classa_stats->tx_mcs_rate_flags = mcsRateFlags;
-			}
-
-			if (!(node->rate_flags & TX_RATE_LEGACY)) {
-				nss = node->nss;
-				classa_stats->rx_mcs_index =
-					wma_get_mcs_idx(
-						(peer_stats->peer_rx_rate /
-						100), node->rate_flags,
-						&nss, &mcsRateFlags);
-				classa_stats->rx_nss = nss;
-				classa_stats->rx_mcs_rate_flags = mcsRateFlags;
-			}
-			/* FW returns tx power in intervals of 0.5 dBm
-			 * Convert it back to intervals of 1 dBm
-			 */
-			classa_stats->max_pwr =
-				roundup(classa_stats->max_pwr, 2) >> 1;
-		}
-	}
-}
-#endif /* WMA_GET_STATISTICS_RSP */
-
 /**
  * wma_post_link_status() - post link status to SME
  * @pGetLinkStatus: SME Link status
@@ -2755,96 +2415,6 @@ void wma_post_link_status(tAniGetLinkStatus *pGetLinkStatus,
 	}
 }
 
-#ifndef QCA_SUPPORT_CP_STATS
-/**
- * wma_update_per_chain_rssi_stats() - to store per chain rssi stats
- * @wma: wma handle
- * @rssi_stats: rssi stats
- * @rssi_per_chain_stats: buffer where rssi stats to be stored
- *
- * This function stores per chain rssi stats received from fw for all vdevs for
- * which the stats were requested into a csr stats structure.
- *
- * Return: void
- */
-static void wma_update_per_chain_rssi_stats(tp_wma_handle wma,
-		wmi_rssi_stats *rssi_stats,
-		struct csr_per_chain_rssi_stats_info *rssi_per_chain_stats)
-{
-	int i;
-	int32_t bcn_snr, dat_snr;
-	bool db2dbm_enabled;
-
-	db2dbm_enabled = wlan_psoc_nif_fw_ext_cap_get(wma->psoc,
-						      WLAN_SOC_CEXT_HW_DB2DBM);
-	for (i = 0; i < NUM_CHAINS_MAX; i++) {
-		bcn_snr = rssi_stats->rssi_avg_beacon[i];
-		dat_snr = rssi_stats->rssi_avg_data[i];
-		WMA_LOGD("chain %d beacon snr %d data snr %d",
-			i, bcn_snr, dat_snr);
-
-		wlan_util_stats_get_rssi(db2dbm_enabled, bcn_snr, dat_snr,
-					 &rssi_per_chain_stats->rssi[i]);
-
-		WMI_MAC_ADDR_TO_CHAR_ARRAY(&(rssi_stats->peer_macaddr),
-			rssi_per_chain_stats->peer_mac_addr);
-	}
-}
-
-/**
- * wma_update_rssi_stats() - to update rssi stats for all vdevs
- *         for which the stats were requested.
- * @wma: wma handle
- * @rssi_stats: rssi stats
- *
- * This function updates the rssi stats for all vdevs for which
- * the stats were requested.
- *
- * Return: void
- */
-static void wma_update_rssi_stats(tp_wma_handle wma,
-			wmi_rssi_stats *rssi_stats)
-{
-	tAniGetPEStatsRsp *stats_rsp_params;
-	struct csr_per_chain_rssi_stats_info *rssi_per_chain_stats = NULL;
-	struct wma_txrx_node *node;
-	uint8_t *stats_buf;
-	uint32_t temp_mask;
-	uint8_t vdev_id;
-
-	if (rssi_stats->vdev_id >= wma->max_bssid) {
-		WMA_LOGE("%s: Invalid vdev_id %hu",
-			__func__, rssi_stats->vdev_id);
-		return;
-	}
-
-	vdev_id = rssi_stats->vdev_id;
-	node = &wma->interfaces[vdev_id];
-	stats_rsp_params = (tAniGetPEStatsRsp *) node->stats_rsp;
-	if (stats_rsp_params) {
-		node->fw_stats_set |=  FW_RSSI_PER_CHAIN_STATS_SET;
-		WMA_LOGD("<-- FW RSSI PER CHAIN STATS received for vdevId:%d",
-				vdev_id);
-		stats_buf = (uint8_t *) (stats_rsp_params + 1);
-		temp_mask = stats_rsp_params->statsMask;
-
-		if (temp_mask & (1 << eCsrSummaryStats))
-			stats_buf += sizeof(tCsrSummaryStatsInfo);
-		if (temp_mask & (1 << eCsrGlobalClassAStats))
-			stats_buf += sizeof(tCsrGlobalClassAStatsInfo);
-		if (temp_mask & (1 << eCsrGlobalClassDStats))
-			stats_buf += sizeof(tCsrGlobalClassDStatsInfo);
-
-		if (temp_mask & (1 << csr_per_chain_rssi_stats)) {
-			rssi_per_chain_stats =
-			     (struct csr_per_chain_rssi_stats_info *)stats_buf;
-			wma_update_per_chain_rssi_stats(wma, rssi_stats,
-					rssi_per_chain_stats);
-		}
-	}
-}
-#endif /* QCA_SUPPORT_CP_STATS */
-
 /**
  * wma_link_status_event_handler() - link status event handler
  * @handle: wma handle
@@ -2950,267 +2520,6 @@ int wma_rso_cmd_status_event_handler(wmi_roam_event_fixed_param *wmi_event)
 	return 0;
 }
 
-#ifndef QCA_SUPPORT_CP_STATS
-/**
- * wma_handle_sta_peer_info() - handle peer information in
- * peer stats
- * @num_peer_stats: peer number
- * @peer_stats: peer stats received from firmware
- * @peer_macaddr: the specified mac address
- * @sapaddr: sap mac address
- *
- * This function will send eWNI_SME_GET_PEER_INFO_IND
- * to sme with stations' information
- *
- */
-static void wma_handle_sta_peer_info(uint32_t num_peer_stats,
-					wmi_peer_stats *peer_stats,
-					struct qdf_mac_addr peer_macaddr,
-					uint8_t *sapaddr)
-{
-	QDF_STATUS qdf_status;
-	wmi_mac_addr temp_addr;
-	struct sir_peer_info_resp *peer_info;
-	struct scheduler_msg sme_msg = {0};
-	uint32_t  i;
-	uint32_t  j = 0;
-
-	if (!qdf_is_macaddr_broadcast(&peer_macaddr)) {
-		WMI_CHAR_ARRAY_TO_MAC_ADDR(peer_macaddr.bytes, &temp_addr);
-		for (i = 0; i < num_peer_stats; i++) {
-			if ((((temp_addr.mac_addr47to32) & 0x0000ffff) ==
-				((peer_stats->peer_macaddr.mac_addr47to32) &
-								0x0000ffff))
-				&& (temp_addr.mac_addr31to0 ==
-				peer_stats->peer_macaddr.mac_addr31to0)) {
-
-				break;
-			}
-			peer_stats = peer_stats + 1;
-		}
-		peer_info = qdf_mem_malloc(sizeof(*peer_info) +
-				sizeof(peer_info->info[0]));
-		if (!peer_info)
-			return;
-
-		if (i < num_peer_stats) {
-			peer_info->count = 1;
-			WMI_MAC_ADDR_TO_CHAR_ARRAY(&(peer_stats->peer_macaddr),
-				peer_info->info[0].peer_macaddr.bytes);
-			peer_info->info[0].rssi = peer_stats->peer_rssi;
-			peer_info->info[0].tx_rate = peer_stats->peer_tx_rate;
-			peer_info->info[0].rx_rate = peer_stats->peer_rx_rate;
-			WMA_LOGD("%s peer %pM rssi %d tx_rate %d rx_rate %d",
-					 __func__,
-					 peer_info->info[0].peer_macaddr.bytes,
-					 peer_stats->peer_rssi,
-					 peer_stats->peer_tx_rate,
-					 peer_stats->peer_rx_rate);
-		} else {
-			WMA_LOGE("%s: no match mac address", __func__);
-			peer_info->count = 0;
-		}
-	} else {
-		peer_info = qdf_mem_malloc(sizeof(*peer_info) +
-				num_peer_stats * sizeof(peer_info->info[0]));
-		if (!peer_info)
-			return;
-
-		peer_info->count = num_peer_stats;
-
-		for (i = 0; i < num_peer_stats; i++) {
-			WMI_MAC_ADDR_TO_CHAR_ARRAY(&(peer_stats->peer_macaddr),
-					peer_info->info[j].peer_macaddr.bytes);
-			peer_info->info[j].rssi = peer_stats->peer_rssi;
-			peer_info->info[j].tx_rate = peer_stats->peer_tx_rate;
-			peer_info->info[j].rx_rate = peer_stats->peer_rx_rate;
-			WMA_LOGD("%s peer %pM rssi %d tx_rate %d rx_rate %d",
-					__func__,
-					peer_info->info[j].peer_macaddr.bytes,
-					peer_stats->peer_rssi,
-					peer_stats->peer_tx_rate,
-					peer_stats->peer_rx_rate);
-			if (!qdf_mem_cmp(peer_info->info[j].peer_macaddr.bytes,
-					sapaddr, QDF_MAC_ADDR_SIZE)) {
-				peer_info->count = peer_info->count - 1;
-			} else {
-				j++;
-			}
-			peer_stats = peer_stats + 1;
-		}
-		WMA_LOGD("WDA send peer num %d", peer_info->count);
-	}
-
-	sme_msg.type = eWNI_SME_GET_PEER_INFO_IND;
-	sme_msg.bodyptr = peer_info;
-	sme_msg.bodyval = 0;
-
-	qdf_status = scheduler_post_message(QDF_MODULE_ID_WMA,
-					    QDF_MODULE_ID_SME,
-					    QDF_MODULE_ID_SME, &sme_msg);
-	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
-		WMA_LOGE("%s: Fail to post get rssi msg", __func__);
-		qdf_mem_free(peer_info);
-	}
-
-	return;
-}
-
-/**
- * wma_stats_event_handler() - stats event handler
- * @handle: wma handle
- * @cmd_param_info: data from event
- * @len: length
- *
- * Return: 0 for success or error code
- */
-int wma_stats_event_handler(void *handle, uint8_t *cmd_param_info,
-			    uint32_t len)
-{
-	tp_wma_handle wma = (tp_wma_handle) handle;
-	WMI_UPDATE_STATS_EVENTID_param_tlvs *param_buf;
-	wmi_stats_event_fixed_param *event;
-	wmi_pdev_stats *pdev_stats;
-	wmi_vdev_stats *vdev_stats;
-	wmi_peer_stats *peer_stats;
-	wmi_rssi_stats *rssi_stats;
-	wmi_per_chain_rssi_stats *rssi_event;
-	struct wma_txrx_node *node;
-	uint8_t *temp;
-	uint32_t i;
-	uint32_t buf_len = 0;
-	bool excess_data = false;
-	struct mac_context *mac;
-
-	param_buf = (WMI_UPDATE_STATS_EVENTID_param_tlvs *) cmd_param_info;
-	if (!param_buf) {
-		WMA_LOGA("%s: Invalid stats event", __func__);
-		return -EINVAL;
-	}
-	event = param_buf->fixed_param;
-	temp = (uint8_t *) param_buf->data;
-
-	do {
-		if (event->num_pdev_stats > ((WMI_SVC_MSG_MAX_SIZE -
-		    sizeof(*event)) / sizeof(*pdev_stats))) {
-			excess_data = true;
-			break;
-		} else {
-			buf_len += event->num_pdev_stats * sizeof(*pdev_stats);
-		}
-
-		if (event->num_vdev_stats > ((WMI_SVC_MSG_MAX_SIZE -
-		    sizeof(*event)) / sizeof(*vdev_stats))) {
-			excess_data = true;
-			break;
-		} else {
-			buf_len += event->num_vdev_stats * sizeof(*vdev_stats);
-		}
-
-		if (event->num_peer_stats > ((WMI_SVC_MSG_MAX_SIZE -
-		    sizeof(*event)) / sizeof(*peer_stats))) {
-			excess_data = true;
-			break;
-		} else {
-			buf_len += event->num_peer_stats * sizeof(*peer_stats);
-		}
-
-		if (buf_len > param_buf->num_data) {
-			WMA_LOGE("%s: num_data: %d Invalid num_pdev_stats:%d or num_vdev_stats:%d or num_peer_stats:%d",
-				__func__, param_buf->num_data,
-				event->num_pdev_stats,
-				event->num_vdev_stats, event->num_peer_stats);
-			return -EINVAL;
-		}
-
-		rssi_event =
-			(wmi_per_chain_rssi_stats *) param_buf->chain_stats;
-		if (rssi_event) {
-			if (rssi_event->num_per_chain_rssi_stats >
-			    ((WMI_SVC_MSG_MAX_SIZE - sizeof(*event)) /
-			    sizeof(*rssi_event))) {
-				excess_data = true;
-				break;
-			} else {
-				buf_len += sizeof(*rssi_event) *
-					rssi_event->num_per_chain_rssi_stats;
-			}
-		}
-	} while (0);
-
-	if (excess_data ||
-		(buf_len > WMI_SVC_MSG_MAX_SIZE - sizeof(*event))) {
-		WMA_LOGE("excess wmi buffer: stats pdev %d vdev %d peer %d",
-			 event->num_pdev_stats, event->num_vdev_stats,
-			 event->num_peer_stats);
-		return -EINVAL;
-	}
-
-	if (event->num_pdev_stats > 0) {
-		for (i = 0; i < event->num_pdev_stats; i++) {
-			pdev_stats = (wmi_pdev_stats *) temp;
-			wma_update_pdev_stats(wma, pdev_stats);
-			temp += sizeof(wmi_pdev_stats);
-		}
-	}
-
-	if (event->num_vdev_stats > 0) {
-		for (i = 0; i < event->num_vdev_stats; i++) {
-			vdev_stats = (wmi_vdev_stats *) temp;
-			wma_update_vdev_stats(wma, vdev_stats);
-			temp += sizeof(wmi_vdev_stats);
-		}
-	}
-
-	if (event->num_peer_stats > 0) {
-		if (wma->get_sta_peer_info == true) {
-			wma_handle_sta_peer_info(event->num_peer_stats,
-				(wmi_peer_stats *)temp,
-				wma->peer_macaddr,
-				wma->myaddr);
-		} else {
-			for (i = 0; i < event->num_peer_stats; i++) {
-				peer_stats = (wmi_peer_stats *) temp;
-				wma_update_peer_stats(wma, peer_stats);
-				temp += sizeof(wmi_peer_stats);
-			}
-		}
-	}
-
-	rssi_event = (wmi_per_chain_rssi_stats *) param_buf->chain_stats;
-	if (rssi_event) {
-		if (rssi_event->num_per_chain_rssi_stats >
-		    param_buf->num_rssi_stats) {
-			WMA_LOGE("%s: Invalid num_per_chain_rssi_stats:%d",
-				__func__, rssi_event->num_per_chain_rssi_stats);
-			return -EINVAL;
-		}
-		if (((rssi_event->tlv_header & 0xFFFF0000) >> 16 ==
-			  WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats) &&
-			  ((rssi_event->tlv_header & 0x0000FFFF) ==
-			  WMITLV_GET_STRUCT_TLVLEN(wmi_per_chain_rssi_stats))) {
-			if (rssi_event->num_per_chain_rssi_stats > 0) {
-				temp = (uint8_t *) rssi_event;
-				temp += sizeof(*rssi_event);
-
-				/* skip past struct array tlv header */
-				temp += WMI_TLV_HDR_SIZE;
-
-				for (i = 0;
-				     i < rssi_event->num_per_chain_rssi_stats;
-				     i++) {
-					rssi_stats = (wmi_rssi_stats *)temp;
-					wma_update_rssi_stats(wma, rssi_stats);
-					temp += sizeof(wmi_rssi_stats);
-				}
-			}
-		}
-	}
-
-	return 0;
-}
-#endif /* QCA_SUPPORT_CP_STATS */
-
 /**
  * wma_fill_peer_info() - fill SIR peer info from WMI peer info struct
  * @wma: wma interface

+ 0 - 8
os_if/tdls/src/wlan_cfg80211_tdls.c

@@ -33,9 +33,7 @@
 #include <qdf_mem.h>
 #include <wlan_utility.h>
 #include <wlan_reg_services_api.h>
-#ifdef QCA_SUPPORT_CP_STATS
 #include "wlan_cfg80211_mc_cp_stats.h"
-#endif
 
 #define MAX_CHANNEL (NUM_24GHZ_CHANNELS + NUM_5GHZ_CHANNELS)
 
@@ -684,7 +682,6 @@ fail:
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_TDLS_NB_ID);
 }
 
-#ifdef QCA_SUPPORT_CP_STATS
 static void wlan_cfg80211_update_tdls_peers_rssi(struct wlan_objmgr_vdev *vdev)
 {
 	int ret = 0, i;
@@ -706,11 +703,6 @@ static void wlan_cfg80211_update_tdls_peers_rssi(struct wlan_objmgr_vdev *vdev)
 
 	wlan_cfg80211_mc_cp_stats_free_stats_event(rssi_info);
 }
-#else
-static void wlan_cfg80211_update_tdls_peers_rssi(struct wlan_objmgr_vdev *vdev)
-{
-}
-#endif
 
 int wlan_cfg80211_tdls_get_all_peers(struct wlan_objmgr_vdev *vdev,
 				char *buf, int buflen)