Ver Fonte

qcacld-3.0: Fix check in wlan_hdd_tsf_reg_update_details API

Currently in wlan_hdd_tsf_reg_update_details there is check for
change in tsf_id and mac_id, If current and new values are same
tsf_details_valid bit will not be set (In case of tsf_id = 0 and
mac_id = 0), which we result in host continuously reading via WMI
command instead of scratch register.

So to Fix the issue only check for tsf_id_valid and update the
values.

Change-Id: I8007a40baa7be249afa5ff316d57983983ce988a
CRs-Fixed: 3351476
Amit Mehta há 2 anos atrás
pai
commit
7f32cd3b69
1 ficheiros alterados com 4 adições e 7 exclusões
  1. 4 7
      core/hdd/src/wlan_hdd_tsf.c

+ 4 - 7
core/hdd/src/wlan_hdd_tsf.c

@@ -585,13 +585,10 @@ static inline int hdd_tsf_reg_is_details_valid(struct hdd_adapter *adapter)
 static inline void
 wlan_hdd_tsf_reg_update_details(struct hdd_adapter *adapter, struct stsf *ptsf)
 {
-	if (adapter->tsf_id != ptsf->tsf_id ||
-	    adapter->tsf_mac_id != ptsf->mac_id) {
-		if (ptsf->tsf_id_valid) {
-			adapter->tsf_id = ptsf->tsf_id;
-			adapter->tsf_mac_id = ptsf->mac_id;
-			qdf_atomic_set(&adapter->tsf_details_valid, 1);
-		}
+	if (ptsf->tsf_id_valid) {
+		adapter->tsf_id = ptsf->tsf_id;
+		adapter->tsf_mac_id = ptsf->mac_id;
+		qdf_atomic_set(&adapter->tsf_details_valid, 1);
 	}
 	hdd_info("vdev_id %u tsf_id %u tsf_id_valid %u mac_id %u",
 		 adapter->vdev_id, ptsf->tsf_id, ptsf->tsf_id_valid,