Browse Source

qcacld-3.0: Report DIAG event if TX throttled completely

When thermal level higher than MITIGATION, TX will be
throttled completely.
Report DIAG event to notify user-space explicitly.

Change-Id: Ic2d8adfb6810ad03f3ec3b0847a176b694ace33a
CRs-Fixed: 2922102
Lin Bai 3 years ago
parent
commit
39f31e9d96
1 changed files with 7 additions and 0 deletions
  1. 7 0
      core/hdd/src/wlan_hdd_thermal.c

+ 7 - 0
core/hdd/src/wlan_hdd_thermal.c

@@ -501,6 +501,13 @@ hdd_notify_thermal_throttle_handler(struct wlan_objmgr_psoc *psoc,
 	if (ret)
 		return QDF_STATUS_E_FAILURE;
 
+	/* TX will be throttled completely if above MITIGATION level.
+	 * So report additional DIAG event to notify user-space explicitly.
+	 */
+	if (info->level == THERMAL_SHUTOFF ||
+	    info->level == THERMAL_SHUTDOWN_TARGET)
+		host_log_device_status(WLAN_STATUS_DEVICE_TEMPERATURE_HIGH);
+
 	data_len = NLMSG_HDRLEN + nla_total_size(sizeof(uint32_t));
 	vendor_event = wlan_cfg80211_vendor_event_alloc(
 				hdd_ctx->wiphy, NULL, data_len,