Преглед на файлове

qcacld-3.0: Print roam related info in kmsg

The event WMI_ROAM_STATS_EVENTID is received after
every roam, once the roam synch complete is sent by the host.
This event contains details regarding the btm response.

This helps to debug the scenario when roam failure happen.

Print the info received related to roam scan type & roam status
info into kmsg.

Change-Id: Idd688eb4d1e699573fa1e243873c30ffdc5bf96f
CRs-Fixed: 2794555
Abhinav Kumar преди 4 години
родител
ревизия
466382d492
променени са 3 файла, в които са добавени 49 реда и са изтрити 3 реда
  1. 18 0
      components/mlme/dispatcher/inc/wlan_mlme_api.h
  2. 28 0
      components/mlme/dispatcher/src/wlan_mlme_api.c
  3. 3 3
      core/wma/src/wma_scan_roam.c

+ 18 - 0
components/mlme/dispatcher/inc/wlan_mlme_api.h

@@ -2367,6 +2367,24 @@ wlan_mlme_get_ignore_fw_reg_offload_ind(struct wlan_objmgr_psoc *psoc,
  */
 char *mlme_get_roam_trigger_str(uint32_t roam_scan_trigger);
 
+/**
+ * mlme_get_roam_scan_type_str() - Get the string for roam sacn type
+ * @roam_scan_type: roam scan type coming from fw via
+ * wmi_roam_scan_info tlv
+ *
+ *  Return: Meaningful string for roam sacn type
+ */
+char *mlme_get_roam_scan_type_str(uint32_t roam_scan_type);
+
+/**
+ * mlme_get_roam_status_str() - Get the string for roam status
+ * @roam_status: roam status coming from fw via
+ * wmi_roam_scan_info tlv
+ *
+ *  Return: Meaningful string for roam status
+ */
+char *mlme_get_roam_status_str(uint32_t roam_status);
+
 /**
  * mlme_get_converted_timestamp() - Return time of the day
  * from timestamp

+ 28 - 0
components/mlme/dispatcher/src/wlan_mlme_api.c

@@ -3620,6 +3620,34 @@ wlan_mlme_get_ignore_fw_reg_offload_ind(struct wlan_objmgr_psoc *psoc,
 	return QDF_STATUS_SUCCESS;
 }
 
+char *mlme_get_roam_status_str(uint32_t roam_status)
+{
+	switch (roam_status) {
+	case 0:
+		return "SUCCESS";
+	case 1:
+		return "FAILED";
+	case 2:
+		return "NO ROAM";
+	default:
+		return "UNKNOWN";
+	}
+}
+
+char *mlme_get_roam_scan_type_str(uint32_t roam_scan_type)
+{
+	switch (roam_scan_type) {
+	case 0:
+		return "PARTIAL";
+	case 1:
+		return "FULL";
+	case 2:
+		return "NO SCAN";
+	default:
+		return "UNKNOWN";
+	}
+}
+
 char *mlme_get_roam_trigger_str(uint32_t roam_scan_trigger)
 {
 	switch (roam_scan_trigger) {

+ 3 - 3
core/wma/src/wma_scan_roam.c

@@ -2012,7 +2012,7 @@ wma_rso_print_scan_info(struct wmi_roam_scan_data *scan, uint8_t vdev_id,
 
 	mlme_get_converted_timestamp(timestamp, time);
 	wma_info("%s [ROAM_SCAN]: VDEV[%d] Scan_type: %s %s %s",
-		 time, vdev_id, (scan->type ? "FULL" : "PARTIAL"),
+		 time, vdev_id, mlme_get_roam_scan_type_str(scan->type),
 		 buf1, buf);
 	wma_log_roam_scan_candidates(scan->ap, scan->num_ap);
 
@@ -2040,13 +2040,13 @@ wma_rso_print_roam_result(struct wmi_roam_result *res,
 	if (!buf)
 		return;
 
-	if (!res->status)
+	if (res->status == 1)
 		qdf_snprint(buf, ROAM_FAILURE_BUF_SIZE, "Reason: %s",
 			    mlme_get_roam_fail_reason_str(res->fail_reason));
 
 	mlme_get_converted_timestamp(res->timestamp, time);
 	wma_info("%s [ROAM_RESULT]: VDEV[%d] %s %s",
-		 time, vdev_id, (res->status) ? "SUCCESS" : "FAILED", buf);
+		 time, vdev_id, mlme_get_roam_status_str(res->status), buf);
 
 	qdf_mem_free(buf);
 }