Преглед изворни кода

qcacld-3.0: Incorrect throughput value in Connectivity logging

In the api cm_roam_candidate_info_event(), the value of
throughput is sent in Mbps whereas throughput is expected
in Kbps

Correct this by converting the throughput to Kbps instead of
sending it in Mbps.

Change-Id: I0fe95efc3a02d43187ff2c0423813529687c2ee9
CRs-Fixed: 3224754
VIJAY RAJ пре 2 година
родитељ
комит
7b37f88e1d
1 измењених фајлова са 10 додато и 1 уклоњено
  1. 10 1
      components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c

+ 10 - 1
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c

@@ -5671,10 +5671,13 @@ void cm_roam_trigger_info_event(struct wmi_roam_trigger_info *data,
 	qdf_mem_free(log_record);
 }
 
+#define ETP_MAX_VALUE 10000000
+
 void cm_roam_candidate_info_event(struct wmi_roam_candidate_info *ap,
 				  uint8_t cand_ap_idx)
 {
 	struct wlan_log_record *log_record = NULL;
+	uint32_t etp;
 
 	log_record = qdf_mem_malloc(sizeof(*log_record));
 	if (!log_record)
@@ -5694,7 +5697,13 @@ void cm_roam_candidate_info_event(struct wmi_roam_candidate_info *ap,
 	log_record->ap.rssi  = (-1) * ap->rssi;
 	log_record->ap.cu_load = ap->cu_load;
 	log_record->ap.total_score = ap->total_score;
-	log_record->ap.etp = ap->etp;
+	etp = ap->etp * 1000;
+
+	if (etp > ETP_MAX_VALUE)
+		log_record->ap.etp = ETP_MAX_VALUE;
+	else
+		log_record->ap.etp = etp;
+
 	log_record->ap.idx = cand_ap_idx;
 	log_record->ap.freq = ap->freq;