qcacld-3.0: Add INI to configure thermal action

There is customer requirement that once wifi chip overheat,
we should switch the tx chain mask to 1X1 to cool down the
chip instead of halting the tx completely.
Add new INI gThermalMgmtAction to configure thermal mgmt action
with default 0. The valid thermal mgmt action INI value is defined
as enum thermal_mgmt_action_code. To set it to 3 -
THERMAL_MGMT_ACTION_CHAINSCALING to meet customer requirement.

Change-Id: I88b1237fae1f476ad9ff0e7b5a469ec314a42bf9
CRs-Fixed: 2765289
This commit is contained in:
Liangwei Dong
2020-09-01 14:29:05 +08:00
committed by snandini
parent af475b303e
commit 662bade898
7 changed files with 54 additions and 11 deletions

View File

@@ -112,6 +112,7 @@ struct wlan_fwol_coex_config {
* @mon_id: Monitor client id either the wpps or apps
* @priority_apps: Priority of the apps mitigation to consider by fw
* @priority_wpps: Priority of the wpps mitigation to consider by fw
* @thermal_action: thermal action as defined enum thermal_mgmt_action_code
*/
struct wlan_fwol_thermal_temp {
bool thermal_mitigation_enable;
@@ -123,6 +124,7 @@ struct wlan_fwol_thermal_temp {
uint8_t mon_id;
uint8_t priority_apps;
uint8_t priority_wpps;
enum thermal_mgmt_action_code thermal_action;
};
/**

View File

@@ -151,6 +151,9 @@ fwol_init_thermal_temp_in_cfg(struct wlan_objmgr_psoc *psoc,
cfg_get(psoc, CFG_THERMAL_APPS_PRIORITY);
thermal_temp->priority_wpps =
cfg_get(psoc, CFG_THERMAL_WPPS_PRIOITY);
thermal_temp->thermal_action =
cfg_get(psoc, CFG_THERMAL_MGMT_ACTION);
}
QDF_STATUS fwol_init_neighbor_report_cfg(struct wlan_objmgr_psoc *psoc,

View File

@@ -400,6 +400,36 @@
CFG_VALUE_OR_DEFAULT, \
"Thermal mitigation priority for WPPS")
/* <ini>
* gThermalMgmtAction - Configure the thermal management action
*
* @Min: 0
* @Max: 3
* @Default: 0
*
* This ini will control the thermal throttle action to be performed by target
* when the thermal temperature increase/decrease to threshold.
* The valid thermal mgmt action INI value is defined as
* enum thermal_mgmt_action_code.
* 0 - THERMAL_MGMT_ACTION_DEFAULT: target default throttle behaviour
* 1 - THERMAL_MGMT_ACTION_HALT_TRAFFIC: Halt tx traffic
* 2 - THERMAL_MGMT_ACTION_NOTIFY_HOST: Notify host
* 3 - THERMAL_MGMT_ACTION_CHAINSCALING: Tx Chain scaling
*
* Usage: External
*
* Supported features: Thermal Mitigation
*
* </ini>
*/
#define CFG_THERMAL_MGMT_ACTION CFG_INI_UINT( \
"gThermalMgmtAction", \
0, \
3, \
0, \
CFG_VALUE_OR_DEFAULT, \
"Thermal management action")
#define CFG_THERMAL_TEMP_ALL \
CFG(CFG_THERMAL_TEMP_MIN_LEVEL0) \
CFG(CFG_THERMAL_TEMP_MAX_LEVEL0) \
@@ -419,7 +449,7 @@
CFG(CFG_THROTTLE_DUTY_CYCLE_LEVEL5) \
CFG(CFG_THERMAL_SAMPLING_TIME) \
CFG(CFG_THERMAL_APPS_PRIORITY) \
CFG(CFG_THERMAL_WPPS_PRIOITY)
CFG(CFG_THERMAL_WPPS_PRIOITY) \
CFG(CFG_THERMAL_MGMT_ACTION)
#endif