qcacld-3.0: Add support to get thermal throttle stats

Add support for sending WMI_REQUEST_THERMAL_STATS_CMDID
to request for the thermal stats via vendor cmd:
QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_TYPE_GET_THERMAL_STATS
This vendor cmd can either be used to clear the thermal
stats or to request for the thermal stats.
Added ini gThermalStatsTempOffset, which can
configure thermal temperature offset value for capturing
thermal stats in  thermal range such as Thermal STATS
starts capturing from temperature threshold to temperature
threshold + offset.
If this ini is set to 0, then the events are disabled.
Also, add support for the FW event where the requested
thermal stats are sent in FW event
WMI_THERM_THROT_STATS_EVENTID().
The following attributes are sent in the events for every
level:
	STATS_MIN_TEMPERATURE
	STATS_MAX_TEMPERATURE
	STATS_DWELL_TIME
	STATS_TEMP_LEVEL_COUNTER

Change-Id: If8acdeec5bde33be346332ccaf39d78d0151203d
CRs-Fixed: 3016818
此提交包含在:
Utkarsh Bhatnagar
2021-08-11 18:32:30 +05:30
提交者 Madan Koyyalamudi
父節點 e13583c8c9
當前提交 ac66479f44
共有 17 個檔案被更改,包括 777 行新增36 行删除

查看文件

@@ -116,4 +116,12 @@ static inline int os_if_fwol_disable_mdns_offload(struct wlan_objmgr_psoc *psoc)
}
#endif /* WLAN_FEATURE_MDNS_OFFLOAD */
#ifdef THERMAL_STATS_SUPPORT
int os_if_fwol_get_thermal_stats_req(struct wlan_objmgr_psoc *psoc,
enum thermal_stats_request_type req,
void (*callback)(void *context,
struct thermal_throttle_info *response),
void *context);
#endif /* THERMAL_STATS_SUPPORT */
#endif /* __OS_IF_FWOL_H__ */

查看文件

@@ -198,3 +198,23 @@ out:
return ret;
}
#endif /* WLAN_FEATURE_MDNS_OFFLOAD */
#ifdef THERMAL_STATS_SUPPORT
int os_if_fwol_get_thermal_stats_req(struct wlan_objmgr_psoc *psoc,
enum thermal_stats_request_type req,
void (*callback)(void *context,
struct thermal_throttle_info *response),
void *context)
{
QDF_STATUS status;
status = ucfg_fwol_send_get_thermal_stats_cmd(psoc, req, callback,
context);
if (!QDF_IS_STATUS_SUCCESS(status))
osif_err("Failed to send get thermal stats cmd to FW, %d",
status);
return qdf_status_to_os_return(status);
}
#endif