Browse Source

qcacld-3.0: Flush driver and firmware logs only for driver ring id

qcacld-2.0 to qcacld-3.0 propagation

Currently driver flushes driver and firmware logs irrespective of ring id.
Host should flush the logs only for driver ring id.

Add changes to fix the same issue.

Change-Id: I50cfde1baaf18c1a3992f956182b49044ccc4b1d
CRs-Fixed: 1053219
Sreelakshmi Konamki 8 năm trước cách đây
mục cha
commit
c3815bade7
1 tập tin đã thay đổi với 18 bổ sung11 xóa
  1. 18 11
      core/hdd/src/wlan_hdd_cfg80211.c

+ 18 - 11
core/hdd/src/wlan_hdd_cfg80211.c

@@ -4179,19 +4179,26 @@ static int __wlan_hdd_cfg80211_wifi_logger_get_ring_data(struct wiphy *wiphy,
 	if (ring_id == RING_ID_PER_PACKET_STATS) {
 		wlan_logging_set_per_pkt_stats();
 		hdd_notice("Flushing/Retrieving packet stats");
-	}
-
-	hdd_notice("Bug report triggered by framework");
+	} else if (ring_id == RING_ID_DRIVER_DEBUG) {
+		/*
+		 * As part of DRIVER ring ID, flush both driver and fw logs.
+		 * For other Ring ID's driver doesn't have any rings to flush
+		 */
+		hdd_notice("Bug report triggered by framework");
 
-	status = cds_flush_logs(WLAN_LOG_TYPE_NON_FATAL,
-			WLAN_LOG_INDICATOR_FRAMEWORK,
-			WLAN_LOG_REASON_CODE_UNUSED,
-			true, false);
-	if (QDF_STATUS_SUCCESS != status) {
-		hdd_err("Failed to trigger bug report");
-		return -EINVAL;
+		status = cds_flush_logs(WLAN_LOG_TYPE_NON_FATAL,
+				WLAN_LOG_INDICATOR_FRAMEWORK,
+				WLAN_LOG_REASON_CODE_UNUSED,
+				true, false);
+		if (QDF_STATUS_SUCCESS != status) {
+			hdd_err("Failed to trigger bug report");
+			return -EINVAL;
+		}
+	} else {
+		wlan_report_log_completion(WLAN_LOG_TYPE_NON_FATAL,
+					   WLAN_LOG_INDICATOR_FRAMEWORK,
+					   WLAN_LOG_REASON_CODE_UNUSED);
 	}
-
 	return 0;
 }