瀏覽代碼

qcacld-3.0: Roam trigger log optimize

Reserve log like "[18:11:32.086000] [ROAM_TRIGGER]: VDEV[0]"
for common roam and special roam.

Some customers are used to get log from serial port, reserve
this log can better support debug.

Change-Id: I79565c87cfcf42ae5de3d6895c27666d2676370b
CRs-Fixed: 3451003
chunquan luo 2 年之前
父節點
當前提交
6bb8117d77

+ 16 - 5
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c

@@ -6006,6 +6006,7 @@ void cm_roam_trigger_info_event(struct wmi_roam_trigger_info *data,
 
 	wlan_diag_event.trigger_reason =
 		cm_get_diag_roam_reason(data->trigger_reason);
+
 	wlan_diag_event.trigger_sub_reason =
 		cm_get_diag_roam_sub_reason(data->trigger_sub_reason);
 
@@ -6032,9 +6033,14 @@ void cm_roam_trigger_info_event(struct wmi_roam_trigger_info *data,
 	}
 
 	if (data->trigger_reason == ROAM_TRIGGER_REASON_PERIODIC ||
-	    data->trigger_reason == ROAM_TRIGGER_REASON_LOW_RSSI)
-		wlan_diag_event.rssi_thresh =
+	    data->trigger_reason == ROAM_TRIGGER_REASON_LOW_RSSI) {
+		if (data->common_roam)
+			wlan_diag_event.rssi_thresh =
+					(-1) * data->low_rssi_trig_data.roam_rssi_threshold;
+		else
+			wlan_diag_event.rssi_thresh =
 					(-1) * data->rssi_trig_data.threshold;
+	}
 
 	wlan_diag_event.is_full_scan = is_full_scan;
 
@@ -6299,9 +6305,14 @@ void cm_roam_trigger_info_event(struct wmi_roam_trigger_info *data,
 	}
 
 	if (data->trigger_reason == ROAM_TRIGGER_REASON_PERIODIC ||
-	    data->trigger_reason == ROAM_TRIGGER_REASON_LOW_RSSI)
-		log_record->roam_trig.rssi_threshold =
-			(-1) * data->rssi_trig_data.threshold;
+	    data->trigger_reason == ROAM_TRIGGER_REASON_LOW_RSSI) {
+		if (data->common_roam)
+			log_record->roam_trig.rssi_threshold =
+				(-1) * data->low_rssi_trig_data.roam_rssi_threshold;
+		else
+			log_record->roam_trig.rssi_threshold =
+				(-1) * data->rssi_trig_data.threshold;
+	}
 
 	log_record->roam_trig.is_full_scan = is_full_scan;
 	log_record->fw_timestamp_us = (uint64_t)data->timestamp * 1000;

+ 12 - 7
components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c

@@ -2748,10 +2748,16 @@ cm_roam_stats_get_trigger_detail_str(struct wmi_roam_trigger_info *ptr,
 		 * ptr->rssi_trig_data.threshold gives the rssi threshold
 		 * for the Low Rssi/Periodic scan trigger.
 		 */
-		buf_cons = qdf_snprint(temp, buf_left,
-				       "Cur_Rssi threshold:%d Current AP RSSI: %d",
-				       ptr->rssi_trig_data.threshold,
-				       ptr->current_rssi);
+		if (ptr->common_roam)
+			buf_cons = qdf_snprint(temp, buf_left,
+					       "Cur_Rssi threshold:%d Current AP RSSI: %d",
+					       ptr->low_rssi_trig_data.roam_rssi_threshold,
+					       ptr->low_rssi_trig_data.current_rssi);
+		else
+			buf_cons = qdf_snprint(temp, buf_left,
+					       "Cur_Rssi threshold:%d Current AP RSSI: %d",
+					       ptr->rssi_trig_data.threshold,
+					       ptr->current_rssi);
 		temp += buf_cons;
 		buf_left -= buf_cons;
 		break;
@@ -2823,9 +2829,8 @@ cm_roam_stats_print_trigger_info(struct wlan_objmgr_psoc *psoc,
 	/* Update roam trigger info to userspace */
 	cm_roam_trigger_info_event(data, scan_data, vdev_id, is_full_scan);
 
-	if (!data->common_roam)
-		mlme_nofl_info("%s [ROAM_TRIGGER]: VDEV[%d] %s",
-			       time, vdev_id, buf);
+	mlme_nofl_info("%s [ROAM_TRIGGER]: VDEV[%d] %s",
+		       time, vdev_id, buf);
 	qdf_mem_free(buf);
 
 	status = wlan_cm_update_roam_states(psoc, vdev_id, data->trigger_reason,