qcacld-3.0: Add support for WLAN thermal mitigation
As part of new requirement WLAN subsystem needs to perform thermal mitigation action as per the thermal state of the device. The wifi hal sends vendor command QCA_NL80211_VENDOR_SUBCMD_THERMAL_CMD with the thermal level parameter and wlan host performs the required appropriate action. wlan host driver maps the thermal level to corresponding duty cycle off percent value and duty cycle value, send WMI_THERM_THROT_SET_CONF_CMDID cmd to FW. Make changes to perform vendor command handling, mapping thermal level to duty cycle value and communicating the thermal information to FW. change-ID: I77175048c817ab755cdb838018e414ef3ee0b112 CRs-Fixed: 2610395
Este commit está contenido en:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012 - 2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012 - 2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -100,7 +100,7 @@ struct wlan_fwol_coex_config {
|
||||
};
|
||||
|
||||
#define FWOL_THERMAL_LEVEL_MAX 4
|
||||
#define FWOL_THERMAL_THROTTLE_LEVEL_MAX 4
|
||||
#define FWOL_THERMAL_THROTTLE_LEVEL_MAX 6
|
||||
/*
|
||||
* struct wlan_fwol_thermal_temp - Thermal temperature config items
|
||||
* @thermal_temp_min_level: Array of temperature minimum levels
|
||||
@@ -108,6 +108,7 @@ struct wlan_fwol_coex_config {
|
||||
* @thermal_mitigation_enable: Control for Thermal mitigation feature
|
||||
* @throttle_period: Thermal throttle period value
|
||||
* @throttle_dutycycle_level: Array of throttle duty cycle levels
|
||||
* @thermal_sampling_time: sampling time for thermal mitigation in ms
|
||||
*/
|
||||
struct wlan_fwol_thermal_temp {
|
||||
bool thermal_mitigation_enable;
|
||||
@@ -115,6 +116,7 @@ struct wlan_fwol_thermal_temp {
|
||||
uint16_t thermal_temp_min_level[FWOL_THERMAL_LEVEL_MAX];
|
||||
uint16_t thermal_temp_max_level[FWOL_THERMAL_LEVEL_MAX];
|
||||
uint32_t throttle_dutycycle_level[FWOL_THERMAL_THROTTLE_LEVEL_MAX];
|
||||
uint16_t thermal_sampling_time;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -132,14 +132,20 @@ fwol_init_thermal_temp_in_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
thermal_temp->thermal_mitigation_enable =
|
||||
cfg_get(psoc, CFG_THERMAL_MITIGATION_ENABLE);
|
||||
thermal_temp->throttle_period = cfg_get(psoc, CFG_THROTTLE_PERIOD);
|
||||
thermal_temp->thermal_sampling_time =
|
||||
cfg_get(psoc, CFG_THERMAL_SAMPLING_TIME);
|
||||
thermal_temp->throttle_dutycycle_level[0] =
|
||||
cfg_get(psoc, CFG_THROTTLE_DUTY_CYCLE_LEVEL0);
|
||||
thermal_temp->throttle_dutycycle_level[1]=
|
||||
thermal_temp->throttle_dutycycle_level[1] =
|
||||
cfg_get(psoc, CFG_THROTTLE_DUTY_CYCLE_LEVEL1);
|
||||
thermal_temp->throttle_dutycycle_level[2]=
|
||||
thermal_temp->throttle_dutycycle_level[2] =
|
||||
cfg_get(psoc, CFG_THROTTLE_DUTY_CYCLE_LEVEL2);
|
||||
thermal_temp->throttle_dutycycle_level[3]=
|
||||
thermal_temp->throttle_dutycycle_level[3] =
|
||||
cfg_get(psoc, CFG_THROTTLE_DUTY_CYCLE_LEVEL3);
|
||||
thermal_temp->throttle_dutycycle_level[4] =
|
||||
cfg_get(psoc, CFG_THROTTLE_DUTY_CYCLE_LEVEL4);
|
||||
thermal_temp->throttle_dutycycle_level[5] =
|
||||
cfg_get(psoc, CFG_THROTTLE_DUTY_CYCLE_LEVEL5);
|
||||
}
|
||||
|
||||
QDF_STATUS fwol_init_neighbor_report_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2018,2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -234,7 +234,7 @@
|
||||
* gThrottleDutyCycleLevel1 - Set Thermal mitigation throttle duty cycle level1
|
||||
* @Min: 0
|
||||
* @Max: 100
|
||||
* @Default: 50
|
||||
* @Default: 10
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
@@ -244,7 +244,7 @@
|
||||
"gThrottleDutyCycleLevel1", \
|
||||
0, \
|
||||
100, \
|
||||
50, \
|
||||
10, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"Thermal mitigation throttle duty cycle level1")
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
* gThrottleDutyCycleLevel2 - Set Thermal mitigation throttle duty cycle level2
|
||||
* @Min: 0
|
||||
* @Max: 100
|
||||
* @Default: 75
|
||||
* @Default: 30
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
@@ -263,7 +263,7 @@
|
||||
"gThrottleDutyCycleLevel2", \
|
||||
0, \
|
||||
100, \
|
||||
75, \
|
||||
30, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"Thermal mitigation throttle duty cycle level2")
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
* gThrottleDutyCycleLevel3 - Set Thermal mitigation throttle duty cycle level3
|
||||
* @Min: 0
|
||||
* @Max: 100
|
||||
* @Default: 94
|
||||
* @Default: 50
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
@@ -282,10 +282,74 @@
|
||||
"gThrottleDutyCycleLevel3", \
|
||||
0, \
|
||||
100, \
|
||||
94, \
|
||||
50, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"Thermal mitigation throttle duty cycle level3")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* gThrottleDutyCycleLevel4 - Set Thermal mitigation throttle duty cycle level4
|
||||
* @Min: 0
|
||||
* @Max: 100
|
||||
* @Default: 70
|
||||
*
|
||||
* This ini will apply the thermal throttle duty cycle value in FW
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL4 CFG_INI_UINT( \
|
||||
"gThrottleDutyCycleLevel4", \
|
||||
0, \
|
||||
100, \
|
||||
70, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"Thermal mitigation throttle duty cycle level4")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* gThrottleDutyCycleLevel5 - Set Thermal mitigation throttle duty cycle level5
|
||||
* @Min: 0
|
||||
* @Max: 100
|
||||
* @Default: 90
|
||||
*
|
||||
* This ini will apply the thermal throttle duty cycle value in FW
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL5 CFG_INI_UINT( \
|
||||
"gThrottleDutyCycleLevel5", \
|
||||
0, \
|
||||
100, \
|
||||
90, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"Thermal mitigation throttle duty cycle level5")
|
||||
|
||||
/* <ini>
|
||||
*gThermalSamplingTime - Configure the thermal mitigation sampling time in ms.
|
||||
*
|
||||
* @Min: 10
|
||||
* @Max: 100
|
||||
* @Default: 100
|
||||
*
|
||||
* This ini will control the sampling time that the thermal mitigation in FW
|
||||
* will consider while applying the duty cycle.
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* Supported features: Thermal Mitigation
|
||||
*
|
||||
*</ini>
|
||||
*/
|
||||
#define CFG_THERMAL_SAMPLING_TIME CFG_INI_UINT( \
|
||||
"gThermalSamplingTime", \
|
||||
10, \
|
||||
100, \
|
||||
100, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"Thermal mitigation sampling time")
|
||||
|
||||
#define CFG_THERMAL_TEMP_ALL \
|
||||
CFG(CFG_THERMAL_TEMP_MIN_LEVEL0) \
|
||||
CFG(CFG_THERMAL_TEMP_MAX_LEVEL0) \
|
||||
@@ -300,7 +364,10 @@
|
||||
CFG(CFG_THROTTLE_DUTY_CYCLE_LEVEL0) \
|
||||
CFG(CFG_THROTTLE_DUTY_CYCLE_LEVEL1) \
|
||||
CFG(CFG_THROTTLE_DUTY_CYCLE_LEVEL2) \
|
||||
CFG(CFG_THROTTLE_DUTY_CYCLE_LEVEL3)
|
||||
CFG(CFG_THROTTLE_DUTY_CYCLE_LEVEL3) \
|
||||
CFG(CFG_THROTTLE_DUTY_CYCLE_LEVEL4) \
|
||||
CFG(CFG_THROTTLE_DUTY_CYCLE_LEVEL5) \
|
||||
CFG(CFG_THERMAL_SAMPLING_TIME)
|
||||
|
||||
#endif
|
||||
|
||||
|
Referencia en una nueva incidencia
Block a user