Browse Source

qcacld-3.0: Reset the rx hw ext stats on connection

CNE queries stats via the ext stats vendor cmd. As
part of this, REO commands are enqueued to HW for
each tid to get mpdu_rx and mpdu_rx_missed counts.
In the scenario where the first ext stats request
post STA disconnection and re-connection times out,
the counts from the previous connection are reused.
The second ext stats request can successfully get
the new counts from HW in which case, there is a
possiblity for the mpdu_rx count sent in the second
stats response to be lower than the count sent in
the first stats response.

Fix is to reset the mpdu_rx and mpdu_rx_missed count
on STA connection.

Change-Id: I4d5bb646050f667bb884184b4f65fa0fcf4cfd38
CRs-Fixed: 2898969
Yeshwanth Sriram Guntuka 4 years ago
parent
commit
291a013641
1 changed files with 4 additions and 0 deletions
  1. 4 0
      core/hdd/src/wlan_hdd_cm_connect.c

+ 4 - 0
core/hdd/src/wlan_hdd_cm_connect.c

@@ -782,6 +782,7 @@ hdd_cm_connect_success_pre_user_update(struct wlan_objmgr_vdev *vdev,
 	uint8_t *ie_field;
 	mac_handle_t mac_handle;
 	bool is_roam = rsp->is_reassoc;
+	ol_txrx_soc_handle soc = cds_get_context(QDF_MODULE_ID_SOC);
 
 	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 	if (!hdd_ctx) {
@@ -898,6 +899,9 @@ hdd_cm_connect_success_pre_user_update(struct wlan_objmgr_vdev *vdev,
 				  WLAN_IPA_STA_CONNECT,
 				  rsp->bssid.bytes);
 
+	if (adapter->device_mode == QDF_STA_MODE)
+		cdp_reset_rx_hw_ext_stats(soc);
+
 	wlan_hdd_auto_shutdown_enable(hdd_ctx, false);
 
 	DPTRACE(qdf_dp_trace_mgmt_pkt(QDF_DP_TRACE_MGMT_PACKET_RECORD,