qcacld-3.0: Update for converged thermal throttle params
Update qcacld driver to use converged CFG component for thermal mitigation throttle offload feature config params. Also cleanup hdd ini config based redundant entries. Change-Id: I9c94d1cd7bf9f630ed92ebe0f9f6d6233a216ee5 CRs-fixed: 2358492
This commit is contained in:
parent
0af1ee5fc2
commit
9045e2e664
@ -63,26 +63,22 @@ struct wlan_fwol_coex_config {
|
|||||||
int16_t bt_interference_high_ul;
|
int16_t bt_interference_high_ul;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define FWOL_THERMAL_LEVEL_MAX 4
|
||||||
|
#define FWOL_THERMAL_THROTTLE_LEVEL_MAX 4
|
||||||
/*
|
/*
|
||||||
* struct wlan_fwol_thermal_temp - Thermal temperature config items
|
* struct wlan_fwol_thermal_temp - Thermal temperature config items
|
||||||
* @thermal_temp_min_level0: Thermal temperature minimum level 0
|
* @thermal_temp_min_level: Array of temperature minimum levels
|
||||||
* @thermal_temp_max_level0: Thermal temperature maximum level 0
|
* @thermal_temp_max_level: Array of temperature maximum levels
|
||||||
* @thermal_temp_min_level1: Thermal temperature minimum level 1
|
* @thermal_mitigation_enable: Control for Thermal mitigation feature
|
||||||
* @thermal_temp_max_level1: Thermal temperature maximum level 1
|
* @throttle_period: Thermal throttle period value
|
||||||
* @thermal_temp_min_level2: Thermal temperature minimum level 2
|
* @throttle_dutycycle_level: Array of throttle duty cycle levels
|
||||||
* @thermal_temp_max_level2: Thermal temperature maximum level 2
|
|
||||||
* @thermal_temp_min_level3: Thermal temperature minimum level 3
|
|
||||||
* @thermal_temp_max_level3: Thermal temperature maximum level 3
|
|
||||||
*/
|
*/
|
||||||
struct wlan_fwol_thermal_temp {
|
struct wlan_fwol_thermal_temp {
|
||||||
uint16_t thermal_temp_min_level0;
|
bool thermal_mitigation_enable;
|
||||||
uint16_t thermal_temp_max_level0;
|
uint32_t throttle_period;
|
||||||
uint16_t thermal_temp_min_level1;
|
uint16_t thermal_temp_min_level[FWOL_THERMAL_LEVEL_MAX];
|
||||||
uint16_t thermal_temp_max_level1;
|
uint16_t thermal_temp_max_level[FWOL_THERMAL_LEVEL_MAX];
|
||||||
uint16_t thermal_temp_min_level2;
|
uint32_t throttle_dutycycle_level[FWOL_THERMAL_THROTTLE_LEVEL_MAX];
|
||||||
uint16_t thermal_temp_max_level2;
|
|
||||||
uint16_t thermal_temp_min_level3;
|
|
||||||
uint16_t thermal_temp_max_level3;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -57,22 +57,34 @@ static void
|
|||||||
fwol_init_thermal_temp_in_cfg(struct wlan_objmgr_psoc *psoc,
|
fwol_init_thermal_temp_in_cfg(struct wlan_objmgr_psoc *psoc,
|
||||||
struct wlan_fwol_thermal_temp *thermal_temp)
|
struct wlan_fwol_thermal_temp *thermal_temp)
|
||||||
{
|
{
|
||||||
thermal_temp->thermal_temp_min_level0 =
|
thermal_temp->thermal_temp_min_level[0] =
|
||||||
cfg_get(psoc, CFG_THERMAL_TEMP_MIN_LEVEL0);
|
cfg_get(psoc, CFG_THERMAL_TEMP_MIN_LEVEL0);
|
||||||
thermal_temp->thermal_temp_max_level0 =
|
thermal_temp->thermal_temp_max_level[0] =
|
||||||
cfg_get(psoc, CFG_THERMAL_TEMP_MAX_LEVEL0);
|
cfg_get(psoc, CFG_THERMAL_TEMP_MAX_LEVEL0);
|
||||||
thermal_temp->thermal_temp_min_level1 =
|
thermal_temp->thermal_temp_min_level[1] =
|
||||||
cfg_get(psoc, CFG_THERMAL_TEMP_MIN_LEVEL1);
|
cfg_get(psoc, CFG_THERMAL_TEMP_MIN_LEVEL1);
|
||||||
thermal_temp->thermal_temp_max_level1 =
|
thermal_temp->thermal_temp_max_level[1] =
|
||||||
cfg_get(psoc, CFG_THERMAL_TEMP_MAX_LEVEL1);
|
cfg_get(psoc, CFG_THERMAL_TEMP_MAX_LEVEL1);
|
||||||
thermal_temp->thermal_temp_min_level2 =
|
thermal_temp->thermal_temp_min_level[2] =
|
||||||
cfg_get(psoc, CFG_THERMAL_TEMP_MIN_LEVEL2);
|
cfg_get(psoc, CFG_THERMAL_TEMP_MIN_LEVEL2);
|
||||||
thermal_temp->thermal_temp_max_level2 =
|
thermal_temp->thermal_temp_max_level[2] =
|
||||||
cfg_get(psoc, CFG_THERMAL_TEMP_MAX_LEVEL2);
|
cfg_get(psoc, CFG_THERMAL_TEMP_MAX_LEVEL2);
|
||||||
thermal_temp->thermal_temp_min_level3 =
|
thermal_temp->thermal_temp_min_level[3] =
|
||||||
cfg_get(psoc, CFG_THERMAL_TEMP_MIN_LEVEL3);
|
cfg_get(psoc, CFG_THERMAL_TEMP_MIN_LEVEL3);
|
||||||
thermal_temp->thermal_temp_max_level3 =
|
thermal_temp->thermal_temp_max_level[3] =
|
||||||
cfg_get(psoc, CFG_THERMAL_TEMP_MAX_LEVEL3);
|
cfg_get(psoc, CFG_THERMAL_TEMP_MAX_LEVEL3);
|
||||||
|
|
||||||
|
thermal_temp->thermal_mitigation_enable =
|
||||||
|
cfg_get(psoc, CFG_THERMAL_MITIGATION_ENABLE);
|
||||||
|
thermal_temp->throttle_period = cfg_get(psoc, CFG_THROTTLE_PERIOD);
|
||||||
|
thermal_temp->throttle_dutycycle_level[0] =
|
||||||
|
cfg_get(psoc, CFG_THROTTLE_DUTY_CYCLE_LEVEL0);
|
||||||
|
thermal_temp->throttle_dutycycle_level[1]=
|
||||||
|
cfg_get(psoc, CFG_THROTTLE_DUTY_CYCLE_LEVEL1);
|
||||||
|
thermal_temp->throttle_dutycycle_level[2]=
|
||||||
|
cfg_get(psoc, CFG_THROTTLE_DUTY_CYCLE_LEVEL2);
|
||||||
|
thermal_temp->throttle_dutycycle_level[3]=
|
||||||
|
cfg_get(psoc, CFG_THROTTLE_DUTY_CYCLE_LEVEL3);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -23,6 +23,17 @@
|
|||||||
#ifndef __CFG_THERMAL_TEMP_H
|
#ifndef __CFG_THERMAL_TEMP_H
|
||||||
#define __CFG_THERMAL_TEMP_H
|
#define __CFG_THERMAL_TEMP_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gThermalTempMinLevel0 - Set Thermal Temp Min Level0
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1000
|
||||||
|
* @Default: 0
|
||||||
|
*
|
||||||
|
* Usage: External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
#define CFG_THERMAL_TEMP_MIN_LEVEL0 CFG_INI_UINT( \
|
#define CFG_THERMAL_TEMP_MIN_LEVEL0 CFG_INI_UINT( \
|
||||||
"gThermalTempMinLevel0", \
|
"gThermalTempMinLevel0", \
|
||||||
0, \
|
0, \
|
||||||
@ -31,6 +42,17 @@
|
|||||||
CFG_VALUE_OR_DEFAULT, \
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
"Thermal Temp Min Level0")
|
"Thermal Temp Min Level0")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gThermalTempMaxLevel0 - Set Thermal Temp Max Level0
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1000
|
||||||
|
* @Default: 90
|
||||||
|
*
|
||||||
|
* Usage: External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
#define CFG_THERMAL_TEMP_MAX_LEVEL0 CFG_INI_UINT( \
|
#define CFG_THERMAL_TEMP_MAX_LEVEL0 CFG_INI_UINT( \
|
||||||
"gThermalTempMaxLevel0", \
|
"gThermalTempMaxLevel0", \
|
||||||
0, \
|
0, \
|
||||||
@ -39,6 +61,17 @@
|
|||||||
CFG_VALUE_OR_DEFAULT, \
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
"Thermal Temp Max Level0")
|
"Thermal Temp Max Level0")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gThermalTempMinLevel1 - Set Thermal Temp Min Level1
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1000
|
||||||
|
* @Default: 70
|
||||||
|
*
|
||||||
|
* Usage: External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
#define CFG_THERMAL_TEMP_MIN_LEVEL1 CFG_INI_UINT( \
|
#define CFG_THERMAL_TEMP_MIN_LEVEL1 CFG_INI_UINT( \
|
||||||
"gThermalTempMinLevel1", \
|
"gThermalTempMinLevel1", \
|
||||||
0, \
|
0, \
|
||||||
@ -47,6 +80,17 @@
|
|||||||
CFG_VALUE_OR_DEFAULT, \
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
"Thermal Temp Min Level1")
|
"Thermal Temp Min Level1")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gThermalTempMaxLevel1 - Set Thermal Temp Max Level1
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1000
|
||||||
|
* @Default: 110
|
||||||
|
*
|
||||||
|
* Usage: External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
#define CFG_THERMAL_TEMP_MAX_LEVEL1 CFG_INI_UINT( \
|
#define CFG_THERMAL_TEMP_MAX_LEVEL1 CFG_INI_UINT( \
|
||||||
"gThermalTempMaxLevel1", \
|
"gThermalTempMaxLevel1", \
|
||||||
0, \
|
0, \
|
||||||
@ -55,6 +99,17 @@
|
|||||||
CFG_VALUE_OR_DEFAULT, \
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
"Thermal Temp Max Level1")
|
"Thermal Temp Max Level1")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gThermalTempMinLevel2 - Set Thermal Temp Min Level2
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1000
|
||||||
|
* @Default: 90
|
||||||
|
*
|
||||||
|
* Usage: External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
#define CFG_THERMAL_TEMP_MIN_LEVEL2 CFG_INI_UINT( \
|
#define CFG_THERMAL_TEMP_MIN_LEVEL2 CFG_INI_UINT( \
|
||||||
"gThermalTempMinLevel2", \
|
"gThermalTempMinLevel2", \
|
||||||
0, \
|
0, \
|
||||||
@ -63,6 +118,17 @@
|
|||||||
CFG_VALUE_OR_DEFAULT, \
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
"Thermal Temp Min Level2")
|
"Thermal Temp Min Level2")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gThermalTempMaxLevel2 - Set Thermal Temp Max Level2
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1000
|
||||||
|
* @Default: 125
|
||||||
|
*
|
||||||
|
* Usage: External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
#define CFG_THERMAL_TEMP_MAX_LEVEL2 CFG_INI_UINT( \
|
#define CFG_THERMAL_TEMP_MAX_LEVEL2 CFG_INI_UINT( \
|
||||||
"gThermalTempMaxLevel2", \
|
"gThermalTempMaxLevel2", \
|
||||||
0, \
|
0, \
|
||||||
@ -71,6 +137,17 @@
|
|||||||
CFG_VALUE_OR_DEFAULT, \
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
"Thermal Temp Max Level2")
|
"Thermal Temp Max Level2")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gThermalTempMinLevel3 - Set Thermal Temp Min Level3
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1000
|
||||||
|
* @Default: 110
|
||||||
|
*
|
||||||
|
* Usage: External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
#define CFG_THERMAL_TEMP_MIN_LEVEL3 CFG_INI_UINT( \
|
#define CFG_THERMAL_TEMP_MIN_LEVEL3 CFG_INI_UINT( \
|
||||||
"gThermalTempMinLevel3", \
|
"gThermalTempMinLevel3", \
|
||||||
0, \
|
0, \
|
||||||
@ -79,6 +156,17 @@
|
|||||||
CFG_VALUE_OR_DEFAULT, \
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
"Thermal Temp Min Level3")
|
"Thermal Temp Min Level3")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gThermalTempMaxLevel3 - Set Thermal Temp Max Level3
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1000
|
||||||
|
* @Default: 0
|
||||||
|
*
|
||||||
|
* Usage: External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
#define CFG_THERMAL_TEMP_MAX_LEVEL3 CFG_INI_UINT( \
|
#define CFG_THERMAL_TEMP_MAX_LEVEL3 CFG_INI_UINT( \
|
||||||
"gThermalTempMaxLevel3", \
|
"gThermalTempMaxLevel3", \
|
||||||
0, \
|
0, \
|
||||||
@ -87,6 +175,117 @@
|
|||||||
CFG_VALUE_OR_DEFAULT, \
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
"Thermal Temp Max Level3")
|
"Thermal Temp Max Level3")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gThermalMitigationEnable - Set Thermal mitigation feature control
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1
|
||||||
|
* @Default: 0
|
||||||
|
*
|
||||||
|
* Usage: External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_THERMAL_MITIGATION_ENABLE CFG_INI_BOOL( \
|
||||||
|
"gThermalMitigationEnable", \
|
||||||
|
0, \
|
||||||
|
"Thermal mitigation feature control")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gThrottlePeriod - Set Thermal mitigation throttle period
|
||||||
|
* @Min: 10
|
||||||
|
* @Max: 10000
|
||||||
|
* @Default: 4000
|
||||||
|
*
|
||||||
|
* Usage: External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_THROTTLE_PERIOD CFG_INI_UINT( \
|
||||||
|
"gThrottlePeriod", \
|
||||||
|
10, \
|
||||||
|
10000, \
|
||||||
|
4000, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
|
"Thermal mitigation throttle period")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gThrottleDutyCycleLevel0 - Set Thermal mitigation throttle duty cycle level0
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 0
|
||||||
|
* @Default: 0
|
||||||
|
*
|
||||||
|
* Usage: External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL0 CFG_INI_UINT( \
|
||||||
|
"gThrottleDutyCycleLevel0", \
|
||||||
|
0, \
|
||||||
|
0, \
|
||||||
|
0, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
|
"Thermal mitigation throttle duty cycle level0")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gThrottleDutyCycleLevel1 - Set Thermal mitigation throttle duty cycle level1
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 100
|
||||||
|
* @Default: 50
|
||||||
|
*
|
||||||
|
* Usage: External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL1 CFG_INI_UINT( \
|
||||||
|
"gThrottleDutyCycleLevel1", \
|
||||||
|
0, \
|
||||||
|
100, \
|
||||||
|
50, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
|
"Thermal mitigation throttle duty cycle level1")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gThrottleDutyCycleLevel2 - Set Thermal mitigation throttle duty cycle level2
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 100
|
||||||
|
* @Default: 75
|
||||||
|
*
|
||||||
|
* Usage: External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL2 CFG_INI_UINT( \
|
||||||
|
"gThrottleDutyCycleLevel2", \
|
||||||
|
0, \
|
||||||
|
100, \
|
||||||
|
75, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
|
"Thermal mitigation throttle duty cycle level2")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gThrottleDutyCycleLevel3 - Set Thermal mitigation throttle duty cycle level3
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 100
|
||||||
|
* @Default: 94
|
||||||
|
*
|
||||||
|
* Usage: External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL3 CFG_INI_UINT( \
|
||||||
|
"gThrottleDutyCycleLevel3", \
|
||||||
|
0, \
|
||||||
|
100, \
|
||||||
|
94, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
|
"Thermal mitigation throttle duty cycle level3")
|
||||||
|
|
||||||
#define CFG_THERMAL_TEMP_ALL \
|
#define CFG_THERMAL_TEMP_ALL \
|
||||||
CFG(CFG_THERMAL_TEMP_MIN_LEVEL0) \
|
CFG(CFG_THERMAL_TEMP_MIN_LEVEL0) \
|
||||||
CFG(CFG_THERMAL_TEMP_MAX_LEVEL0) \
|
CFG(CFG_THERMAL_TEMP_MAX_LEVEL0) \
|
||||||
@ -96,6 +295,12 @@
|
|||||||
CFG(CFG_THERMAL_TEMP_MAX_LEVEL2) \
|
CFG(CFG_THERMAL_TEMP_MAX_LEVEL2) \
|
||||||
CFG(CFG_THERMAL_TEMP_MIN_LEVEL3) \
|
CFG(CFG_THERMAL_TEMP_MIN_LEVEL3) \
|
||||||
CFG(CFG_THERMAL_TEMP_MAX_LEVEL3) \
|
CFG(CFG_THERMAL_TEMP_MAX_LEVEL3) \
|
||||||
|
CFG(CFG_THERMAL_MITIGATION_ENABLE) \
|
||||||
|
CFG(CFG_THROTTLE_PERIOD) \
|
||||||
|
CFG(CFG_THROTTLE_DUTY_CYCLE_LEVEL0) \
|
||||||
|
CFG(CFG_THROTTLE_DUTY_CYCLE_LEVEL1) \
|
||||||
|
CFG(CFG_THROTTLE_DUTY_CYCLE_LEVEL2) \
|
||||||
|
CFG(CFG_THROTTLE_DUTY_CYCLE_LEVEL3)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1933,47 +1933,6 @@ enum hdd_link_speed_rpt_type {
|
|||||||
#define CFG_BAD_PEER_TX_CTL_TX_LIMIT_LEVEL_IEEEAC_DEFAULT (3)
|
#define CFG_BAD_PEER_TX_CTL_TX_LIMIT_LEVEL_IEEEAC_DEFAULT (3)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Enable/Disable Thermal Mitigation feature
|
|
||||||
* Default: Enable
|
|
||||||
*/
|
|
||||||
#define CFG_THERMAL_MIGRATION_ENABLE_NAME "gThermalMitigationEnable"
|
|
||||||
#define CFG_THERMAL_MIGRATION_ENABLE_MIN (0)
|
|
||||||
#define CFG_THERMAL_MIGRATION_ENABLE_MAX (1)
|
|
||||||
#define CFG_THERMAL_MIGRATION_ENABLE_DEFAULT (0)
|
|
||||||
|
|
||||||
#define CFG_THROTTLE_PERIOD_NAME "gThrottlePeriod"
|
|
||||||
#define CFG_THROTTLE_PERIOD_MIN (10)
|
|
||||||
#define CFG_THROTTLE_PERIOD_MAX (10000)
|
|
||||||
#define CFG_THROTTLE_PERIOD_DEFAULT (4000)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Configure Throttle Period Different Level Duty Cycle in percentage
|
|
||||||
* When temperature measured is greater than threshold at particular level,
|
|
||||||
* then throtling level will get increased by one level and
|
|
||||||
* will reduce TX duty by the given percentage
|
|
||||||
*/
|
|
||||||
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL0_NAME "gThrottleDutyCycleLevel0"
|
|
||||||
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL0_MIN (0)
|
|
||||||
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL0_MAX (0)
|
|
||||||
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL0_DEFAULT (0)
|
|
||||||
|
|
||||||
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL1_NAME "gThrottleDutyCycleLevel1"
|
|
||||||
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL1_MIN (0)
|
|
||||||
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL1_MAX (100)
|
|
||||||
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL1_DEFAULT (50)
|
|
||||||
|
|
||||||
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL2_NAME "gThrottleDutyCycleLevel2"
|
|
||||||
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL2_MIN (0)
|
|
||||||
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL2_MAX (100)
|
|
||||||
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL2_DEFAULT (75)
|
|
||||||
|
|
||||||
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL3_NAME "gThrottleDutyCycleLevel3"
|
|
||||||
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL3_MIN (0)
|
|
||||||
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL3_MAX (100)
|
|
||||||
#define CFG_THROTTLE_DUTY_CYCLE_LEVEL3_DEFAULT (94)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* <ini>
|
* <ini>
|
||||||
* gMCAddrListEnable - Enable/Disable Multicast MAC Address List feature
|
* gMCAddrListEnable - Enable/Disable Multicast MAC Address List feature
|
||||||
@ -3631,12 +3590,6 @@ struct hdd_config {
|
|||||||
int32_t linkSpeedRssiHigh;
|
int32_t linkSpeedRssiHigh;
|
||||||
int32_t linkSpeedRssiMid;
|
int32_t linkSpeedRssiMid;
|
||||||
int32_t linkSpeedRssiLow;
|
int32_t linkSpeedRssiLow;
|
||||||
uint8_t thermalMitigationEnable;
|
|
||||||
uint32_t throttlePeriod;
|
|
||||||
uint32_t throttle_dutycycle_level0;
|
|
||||||
uint32_t throttle_dutycycle_level1;
|
|
||||||
uint32_t throttle_dutycycle_level2;
|
|
||||||
uint32_t throttle_dutycycle_level3;
|
|
||||||
#if defined(CONFIG_HL_SUPPORT) && defined(QCA_BAD_PEER_TX_FLOW_CL)
|
#if defined(CONFIG_HL_SUPPORT) && defined(QCA_BAD_PEER_TX_FLOW_CL)
|
||||||
bool bad_peer_txctl_enable;
|
bool bad_peer_txctl_enable;
|
||||||
uint32_t bad_peer_txctl_prd;
|
uint32_t bad_peer_txctl_prd;
|
||||||
|
@ -310,48 +310,6 @@ struct reg_table_entry g_registry_table[] = {
|
|||||||
CFG_LINK_SPEED_RSSI_LOW_MAX,
|
CFG_LINK_SPEED_RSSI_LOW_MAX,
|
||||||
NULL, 0),
|
NULL, 0),
|
||||||
|
|
||||||
REG_VARIABLE(CFG_THERMAL_MIGRATION_ENABLE_NAME, WLAN_PARAM_Integer,
|
|
||||||
struct hdd_config, thermalMitigationEnable,
|
|
||||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
|
||||||
CFG_THERMAL_MIGRATION_ENABLE_DEFAULT,
|
|
||||||
CFG_THERMAL_MIGRATION_ENABLE_MIN,
|
|
||||||
CFG_THERMAL_MIGRATION_ENABLE_MAX),
|
|
||||||
|
|
||||||
REG_VARIABLE(CFG_THROTTLE_PERIOD_NAME, WLAN_PARAM_Integer,
|
|
||||||
struct hdd_config, throttlePeriod,
|
|
||||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
|
||||||
CFG_THROTTLE_PERIOD_DEFAULT,
|
|
||||||
CFG_THROTTLE_PERIOD_MIN,
|
|
||||||
CFG_THROTTLE_PERIOD_MAX),
|
|
||||||
|
|
||||||
REG_VARIABLE(CFG_THROTTLE_DUTY_CYCLE_LEVEL0_NAME, WLAN_PARAM_Integer,
|
|
||||||
struct hdd_config, throttle_dutycycle_level0,
|
|
||||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
|
||||||
CFG_THROTTLE_DUTY_CYCLE_LEVEL0_DEFAULT,
|
|
||||||
CFG_THROTTLE_DUTY_CYCLE_LEVEL0_MIN,
|
|
||||||
CFG_THROTTLE_DUTY_CYCLE_LEVEL0_MAX),
|
|
||||||
|
|
||||||
REG_VARIABLE(CFG_THROTTLE_DUTY_CYCLE_LEVEL1_NAME, WLAN_PARAM_Integer,
|
|
||||||
struct hdd_config, throttle_dutycycle_level1,
|
|
||||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
|
||||||
CFG_THROTTLE_DUTY_CYCLE_LEVEL1_DEFAULT,
|
|
||||||
CFG_THROTTLE_DUTY_CYCLE_LEVEL1_MIN,
|
|
||||||
CFG_THROTTLE_DUTY_CYCLE_LEVEL1_MAX),
|
|
||||||
|
|
||||||
REG_VARIABLE(CFG_THROTTLE_DUTY_CYCLE_LEVEL2_NAME, WLAN_PARAM_Integer,
|
|
||||||
struct hdd_config, throttle_dutycycle_level2,
|
|
||||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
|
||||||
CFG_THROTTLE_DUTY_CYCLE_LEVEL2_DEFAULT,
|
|
||||||
CFG_THROTTLE_DUTY_CYCLE_LEVEL2_MIN,
|
|
||||||
CFG_THROTTLE_DUTY_CYCLE_LEVEL2_MAX),
|
|
||||||
|
|
||||||
REG_VARIABLE(CFG_THROTTLE_DUTY_CYCLE_LEVEL3_NAME, WLAN_PARAM_Integer,
|
|
||||||
struct hdd_config, throttle_dutycycle_level3,
|
|
||||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
|
||||||
CFG_THROTTLE_DUTY_CYCLE_LEVEL3_DEFAULT,
|
|
||||||
CFG_THROTTLE_DUTY_CYCLE_LEVEL3_MIN,
|
|
||||||
CFG_THROTTLE_DUTY_CYCLE_LEVEL3_MAX),
|
|
||||||
|
|
||||||
REG_VARIABLE(CFG_ENABLE_FIRST_SCAN_2G_ONLY_NAME, WLAN_PARAM_Integer,
|
REG_VARIABLE(CFG_ENABLE_FIRST_SCAN_2G_ONLY_NAME, WLAN_PARAM_Integer,
|
||||||
struct hdd_config, enableFirstScan2GOnly,
|
struct hdd_config, enableFirstScan2GOnly,
|
||||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||||
|
@ -9944,47 +9944,10 @@ static int hdd_update_user_config(struct hdd_context *hdd_ctx)
|
|||||||
*/
|
*/
|
||||||
static int hdd_init_thermal_info(struct hdd_context *hdd_ctx)
|
static int hdd_init_thermal_info(struct hdd_context *hdd_ctx)
|
||||||
{
|
{
|
||||||
tSmeThermalParams thermal_param;
|
|
||||||
QDF_STATUS status;
|
QDF_STATUS status;
|
||||||
mac_handle_t mac_handle;
|
mac_handle_t mac_handle = hdd_ctx->mac_handle;
|
||||||
struct wlan_fwol_thermal_temp thermal_temp = {0};
|
|
||||||
|
|
||||||
thermal_param.smeThermalMgmtEnabled =
|
status = sme_init_thermal_info(mac_handle);
|
||||||
hdd_ctx->config->thermalMitigationEnable;
|
|
||||||
thermal_param.smeThrottlePeriod = hdd_ctx->config->throttlePeriod;
|
|
||||||
|
|
||||||
thermal_param.sme_throttle_duty_cycle_tbl[0] =
|
|
||||||
hdd_ctx->config->throttle_dutycycle_level0;
|
|
||||||
thermal_param.sme_throttle_duty_cycle_tbl[1] =
|
|
||||||
hdd_ctx->config->throttle_dutycycle_level1;
|
|
||||||
thermal_param.sme_throttle_duty_cycle_tbl[2] =
|
|
||||||
hdd_ctx->config->throttle_dutycycle_level2;
|
|
||||||
thermal_param.sme_throttle_duty_cycle_tbl[3] =
|
|
||||||
hdd_ctx->config->throttle_dutycycle_level3;
|
|
||||||
|
|
||||||
status = ucfg_fwol_get_thermal_temp(hdd_ctx->psoc, &thermal_temp);
|
|
||||||
if (QDF_IS_STATUS_ERROR(status))
|
|
||||||
return qdf_status_to_os_return(status);
|
|
||||||
|
|
||||||
thermal_param.smeThermalLevels[0].smeMinTempThreshold =
|
|
||||||
thermal_temp.thermal_temp_min_level0;
|
|
||||||
thermal_param.smeThermalLevels[0].smeMaxTempThreshold =
|
|
||||||
thermal_temp.thermal_temp_max_level0;
|
|
||||||
thermal_param.smeThermalLevels[1].smeMinTempThreshold =
|
|
||||||
thermal_temp.thermal_temp_min_level1;
|
|
||||||
thermal_param.smeThermalLevels[1].smeMaxTempThreshold =
|
|
||||||
thermal_temp.thermal_temp_max_level1;
|
|
||||||
thermal_param.smeThermalLevels[2].smeMinTempThreshold =
|
|
||||||
thermal_temp.thermal_temp_min_level2;
|
|
||||||
thermal_param.smeThermalLevels[2].smeMaxTempThreshold =
|
|
||||||
thermal_temp.thermal_temp_max_level2;
|
|
||||||
thermal_param.smeThermalLevels[3].smeMinTempThreshold =
|
|
||||||
thermal_temp.thermal_temp_min_level3;
|
|
||||||
thermal_param.smeThermalLevels[3].smeMaxTempThreshold =
|
|
||||||
thermal_temp.thermal_temp_max_level3;
|
|
||||||
|
|
||||||
mac_handle = hdd_ctx->mac_handle;
|
|
||||||
status = sme_init_thermal_info(mac_handle, thermal_param);
|
|
||||||
|
|
||||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||||
return qdf_status_to_os_return(status);
|
return qdf_status_to_os_return(status);
|
||||||
|
@ -188,17 +188,6 @@ typedef struct {
|
|||||||
uint16_t smeMaxTempThreshold;
|
uint16_t smeMaxTempThreshold;
|
||||||
} tSmeThermalLevelInfo;
|
} tSmeThermalLevelInfo;
|
||||||
|
|
||||||
#define SME_MAX_THERMAL_LEVELS (4)
|
|
||||||
#define SME_MAX_THROTTLE_LEVELS (4)
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* Array of thermal levels */
|
|
||||||
tSmeThermalLevelInfo smeThermalLevels[SME_MAX_THERMAL_LEVELS];
|
|
||||||
uint8_t smeThermalMgmtEnabled;
|
|
||||||
uint32_t smeThrottlePeriod;
|
|
||||||
uint8_t sme_throttle_duty_cycle_tbl[SME_MAX_THROTTLE_LEVELS];
|
|
||||||
} tSmeThermalParams;
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
SME_AC_BK = 0,
|
SME_AC_BK = 0,
|
||||||
SME_AC_BE = 1,
|
SME_AC_BE = 1,
|
||||||
@ -1009,8 +998,7 @@ QDF_STATUS sme_roam_csa_ie_request(mac_handle_t mac_handle,
|
|||||||
int sme_set_addba_accept(mac_handle_t mac_handle, uint8_t session_id,
|
int sme_set_addba_accept(mac_handle_t mac_handle, uint8_t session_id,
|
||||||
int value);
|
int value);
|
||||||
|
|
||||||
QDF_STATUS sme_init_thermal_info(mac_handle_t mac_handle,
|
QDF_STATUS sme_init_thermal_info(mac_handle_t mac_handle);
|
||||||
tSmeThermalParams thermalParam);
|
|
||||||
|
|
||||||
QDF_STATUS sme_set_thermal_level(mac_handle_t mac_handle, uint8_t level);
|
QDF_STATUS sme_set_thermal_level(mac_handle_t mac_handle, uint8_t level);
|
||||||
QDF_STATUS sme_txpower_limit(mac_handle_t mac_handle, tSirTxPowerLimit *psmetx);
|
QDF_STATUS sme_txpower_limit(mac_handle_t mac_handle, tSirTxPowerLimit *psmetx);
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
#include "wlan_mlme_public_struct.h"
|
#include "wlan_mlme_public_struct.h"
|
||||||
#include "wlan_mlme_main.h"
|
#include "wlan_mlme_main.h"
|
||||||
#include "cfg_ucfg_api.h"
|
#include "cfg_ucfg_api.h"
|
||||||
|
#include "wlan_fwol_ucfg_api.h"
|
||||||
|
|
||||||
static tSelfRecoveryStats g_self_recovery_stats;
|
static tSelfRecoveryStats g_self_recovery_stats;
|
||||||
|
|
||||||
@ -10445,45 +10446,50 @@ QDF_STATUS sme_roam_csa_ie_request(mac_handle_t mac_handle,
|
|||||||
* thermalParam : thermal mitigation parameters
|
* thermalParam : thermal mitigation parameters
|
||||||
* Return QDF_STATUS
|
* Return QDF_STATUS
|
||||||
*/
|
*/
|
||||||
QDF_STATUS sme_init_thermal_info(mac_handle_t mac_handle, tSmeThermalParams
|
QDF_STATUS sme_init_thermal_info(mac_handle_t mac_handle)
|
||||||
thermalParam)
|
|
||||||
{
|
{
|
||||||
t_thermal_mgmt *pWmaParam;
|
t_thermal_mgmt *pWmaParam;
|
||||||
struct scheduler_msg msg = {0};
|
struct scheduler_msg msg = {0};
|
||||||
struct mac_context *mac = MAC_CONTEXT(mac_handle);
|
struct mac_context *mac = MAC_CONTEXT(mac_handle);
|
||||||
|
struct wlan_fwol_thermal_temp thermal_temp = {0};
|
||||||
|
QDF_STATUS status;
|
||||||
|
|
||||||
pWmaParam = qdf_mem_malloc(sizeof(t_thermal_mgmt));
|
pWmaParam = qdf_mem_malloc(sizeof(t_thermal_mgmt));
|
||||||
if (!pWmaParam)
|
if (!pWmaParam)
|
||||||
return QDF_STATUS_E_NOMEM;
|
return QDF_STATUS_E_NOMEM;
|
||||||
|
|
||||||
pWmaParam->thermalMgmtEnabled = thermalParam.smeThermalMgmtEnabled;
|
status = ucfg_fwol_get_thermal_temp(mac->psoc, &thermal_temp);
|
||||||
pWmaParam->throttlePeriod = thermalParam.smeThrottlePeriod;
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
|
return qdf_status_to_os_return(status);
|
||||||
|
|
||||||
|
pWmaParam->thermalMgmtEnabled = thermal_temp.thermal_mitigation_enable;
|
||||||
|
pWmaParam->throttlePeriod = thermal_temp.throttle_period;
|
||||||
|
|
||||||
pWmaParam->throttle_duty_cycle_tbl[0] =
|
pWmaParam->throttle_duty_cycle_tbl[0] =
|
||||||
thermalParam.sme_throttle_duty_cycle_tbl[0];
|
thermal_temp.throttle_dutycycle_level[0];
|
||||||
pWmaParam->throttle_duty_cycle_tbl[1] =
|
pWmaParam->throttle_duty_cycle_tbl[1] =
|
||||||
thermalParam.sme_throttle_duty_cycle_tbl[1];
|
thermal_temp.throttle_dutycycle_level[1];
|
||||||
pWmaParam->throttle_duty_cycle_tbl[2] =
|
pWmaParam->throttle_duty_cycle_tbl[2] =
|
||||||
thermalParam.sme_throttle_duty_cycle_tbl[2];
|
thermal_temp.throttle_dutycycle_level[2];
|
||||||
pWmaParam->throttle_duty_cycle_tbl[3] =
|
pWmaParam->throttle_duty_cycle_tbl[3] =
|
||||||
thermalParam.sme_throttle_duty_cycle_tbl[3];
|
thermal_temp.throttle_dutycycle_level[3];
|
||||||
|
|
||||||
pWmaParam->thermalLevels[0].minTempThreshold =
|
pWmaParam->thermalLevels[0].minTempThreshold =
|
||||||
thermalParam.smeThermalLevels[0].smeMinTempThreshold;
|
thermal_temp.thermal_temp_min_level[0];
|
||||||
pWmaParam->thermalLevels[0].maxTempThreshold =
|
pWmaParam->thermalLevels[0].maxTempThreshold =
|
||||||
thermalParam.smeThermalLevels[0].smeMaxTempThreshold;
|
thermal_temp.thermal_temp_max_level[0];
|
||||||
pWmaParam->thermalLevels[1].minTempThreshold =
|
pWmaParam->thermalLevels[1].minTempThreshold =
|
||||||
thermalParam.smeThermalLevels[1].smeMinTempThreshold;
|
thermal_temp.thermal_temp_min_level[1];
|
||||||
pWmaParam->thermalLevels[1].maxTempThreshold =
|
pWmaParam->thermalLevels[1].maxTempThreshold =
|
||||||
thermalParam.smeThermalLevels[1].smeMaxTempThreshold;
|
thermal_temp.thermal_temp_max_level[1];
|
||||||
pWmaParam->thermalLevels[2].minTempThreshold =
|
pWmaParam->thermalLevels[2].minTempThreshold =
|
||||||
thermalParam.smeThermalLevels[2].smeMinTempThreshold;
|
thermal_temp.thermal_temp_min_level[2];
|
||||||
pWmaParam->thermalLevels[2].maxTempThreshold =
|
pWmaParam->thermalLevels[2].maxTempThreshold =
|
||||||
thermalParam.smeThermalLevels[2].smeMaxTempThreshold;
|
thermal_temp.thermal_temp_max_level[2];
|
||||||
pWmaParam->thermalLevels[3].minTempThreshold =
|
pWmaParam->thermalLevels[3].minTempThreshold =
|
||||||
thermalParam.smeThermalLevels[3].smeMinTempThreshold;
|
thermal_temp.thermal_temp_min_level[3];
|
||||||
pWmaParam->thermalLevels[3].maxTempThreshold =
|
pWmaParam->thermalLevels[3].maxTempThreshold =
|
||||||
thermalParam.smeThermalLevels[3].smeMaxTempThreshold;
|
thermal_temp.thermal_temp_max_level[3];
|
||||||
|
|
||||||
if (QDF_STATUS_SUCCESS == sme_acquire_global_lock(&mac->sme)) {
|
if (QDF_STATUS_SUCCESS == sme_acquire_global_lock(&mac->sme)) {
|
||||||
msg.type = WMA_INIT_THERMAL_INFO_CMD;
|
msg.type = WMA_INIT_THERMAL_INFO_CMD;
|
||||||
|
Loading…
Reference in New Issue
Block a user