qcacld-3.0: Remove legacy powersave ini and refactor to mlme component

Add the functionality changes to replace the legacy powersave
parameters corresponding to the ini values that were converged.

Remove the legacy powersave ini items.

Change-Id: I1da9af9aac4a02a16dc22a43f7f9d526e196d599
CRs-Fixed: 2364964
This commit is contained in:
Pragaspathi Thilagaraj
2018-12-02 22:47:29 +05:30
committed by nshrivas
parent 43455535fc
commit 784c492c07
13 changed files with 333 additions and 217 deletions

View File

@@ -1973,4 +1973,81 @@ wlan_mlme_get_mcc_feature(struct wlan_objmgr_psoc *psoc,
*/ */
QDF_STATUS wlan_mlme_get_rrm_enabled(struct wlan_objmgr_psoc *psoc, QDF_STATUS wlan_mlme_get_rrm_enabled(struct wlan_objmgr_psoc *psoc,
bool *value); bool *value);
/*
* wlan_mlme_get_dtim_selection_diversity() - get dtim selection diversity
* bitmap
* @psoc: pointer to psoc object
* @dtim_selection_div: value that is requested by the caller
* This function gets the dtim selection diversity bitmap to be
* sent to the firmware
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
QDF_STATUS wlan_mlme_get_dtim_selection_diversity(struct wlan_objmgr_psoc *psoc,
uint32_t *dtim_selection_div);
/**
* wlan_mlme_get_bmps_min_listen_interval() - get beacon mode powersave
* minimum listen interval value
* @psoc: pointer to psoc object
* @value: value that is requested by the caller
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
QDF_STATUS wlan_mlme_get_bmps_min_listen_interval(struct wlan_objmgr_psoc *psoc,
uint32_t *value);
/**
* wlan_mlme_get_bmps_max_listen_interval() - get beacon mode powersave
* maximum listen interval value
* @psoc: pointer to psoc object
* @value: value that is requested by the caller
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
QDF_STATUS wlan_mlme_get_bmps_max_listen_interval(struct wlan_objmgr_psoc *psoc,
uint32_t *value);
/**
* wlan_mlme_get_auto_bmps_timer_value() - get bmps timer value
* @psoc: pointer to psoc object
* @value: value that is requested by the caller
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
QDF_STATUS wlan_mlme_get_auto_bmps_timer_value(struct wlan_objmgr_psoc *psoc,
uint32_t *value);
/**
* wlan_mlme_is_bmps_enabled() - check if beacon mode powersave is
* enabled/disabled
* @psoc: pointer to psoc object
* @value: value that is requested by the caller
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
QDF_STATUS wlan_mlme_is_bmps_enabled(struct wlan_objmgr_psoc *psoc,
bool *value);
/**
* wlan_mlme_override_bmps_imps() - disable imps/bmps
* @psoc: pointer to psoc object
* @value: value that is requested by the caller
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
QDF_STATUS wlan_mlme_override_bmps_imps(struct wlan_objmgr_psoc *psoc);
/**
* wlan_mlme_is_imps_enabled() - check if idle mode powersave is
* enabled/disabled
* @psoc: pointer to psoc object
* @value: value that is requested by the caller
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
QDF_STATUS wlan_mlme_is_imps_enabled(struct wlan_objmgr_psoc *psoc,
bool *value);
#endif /* _WLAN_MLME_API_H_ */ #endif /* _WLAN_MLME_API_H_ */

View File

@@ -3219,4 +3219,118 @@ QDF_STATUS ucfg_wlan_mlme_get_rrm_enabled(struct wlan_objmgr_psoc *psoc,
QDF_STATUS QDF_STATUS
ucfg_mlme_get_latency_enable(struct wlan_objmgr_psoc *psoc, bool *value); ucfg_mlme_get_latency_enable(struct wlan_objmgr_psoc *psoc, bool *value);
/**
* ucfg_mlme_get_dtim_selection_diversity() - get dtim selection diversity
* bitmap
* @psoc: pointer to psoc object
* @dtim_selection_div: value that is requested by the caller
*
* Inline UCFG API to be used by HDD/OSIF callers
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
static inline QDF_STATUS
ucfg_mlme_get_dtim_selection_diversity(struct wlan_objmgr_psoc *psoc,
uint32_t *dtim_selection_div)
{
return wlan_mlme_get_dtim_selection_diversity(psoc, dtim_selection_div);
}
/**
* ucfg_mlme_get_bmps_min_listen_interval() - get beacon mode powersave
* minimum listen interval value
* @psoc: pointer to psoc object
* @value: value that is requested by the caller
*
* Inline UCFG API to be used by HDD/OSIF callers
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
static inline QDF_STATUS
ucfg_mlme_get_bmps_min_listen_interval(struct wlan_objmgr_psoc *psoc,
uint32_t *value)
{
return wlan_mlme_get_bmps_min_listen_interval(psoc, value);
}
/**
* ucfg_mlme_get_bmps_max_listen_interval() - get beacon mode powersave
* maximum listen interval value
* @psoc: pointer to psoc object
* @value: value that is requested by the caller
*
* Inline UCFG API to be used by HDD/OSIF callers
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
static inline QDF_STATUS
ucfg_mlme_get_bmps_max_listen_interval(struct wlan_objmgr_psoc *psoc,
uint32_t *value)
{
return wlan_mlme_get_bmps_max_listen_interval(psoc, value);
}
/**
* ucfg_mlme_get_auto_bmps_timer_value() - get bmps timer value
* minimum listen interval value
* @psoc: pointer to psoc object
* @value: value that is requested by the caller
*
* Inline UCFG API to be used by HDD/OSIF callers
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
static inline QDF_STATUS
ucfg_mlme_get_auto_bmps_timer_value(struct wlan_objmgr_psoc *psoc,
uint32_t *value)
{
return wlan_mlme_get_auto_bmps_timer_value(psoc, value);
}
/**
* ucfg_mlme_is_bmps_enabled() - check if beacon mode powersave is
* enabled/disabled
* @psoc: pointer to psoc object
* @value: value that is requested by the caller
*
* Inline UCFG API to be used by HDD/OSIF callers
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
static inline QDF_STATUS
ucfg_mlme_is_bmps_enabled(struct wlan_objmgr_psoc *psoc, bool *value)
{
return wlan_mlme_is_bmps_enabled(psoc, value);
}
/**
* ucfg_mlme_is_imps_enabled() - check if idle mode powersave is
* enabled/disabled
* @psoc: pointer to psoc object
* @value: value that is requested by the caller
*
* Inline UCFG API to be used by HDD/OSIF callers
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
static inline QDF_STATUS
ucfg_mlme_is_imps_enabled(struct wlan_objmgr_psoc *psoc, bool *value)
{
return wlan_mlme_is_imps_enabled(psoc, value);
}
/**
* ucfg_mlme_override_bmps_imps() - disable imps/bmps as part of
* override to disable all ps features
* @psoc: pointer to psoc object
* Inline UCFG API to be used by HDD/OSIF callers
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
static inline QDF_STATUS
ucfg_mlme_override_bmps_imps(struct wlan_objmgr_psoc *psoc)
{
return wlan_mlme_override_bmps_imps(psoc);
}
#endif /* _WLAN_MLME_UCFG_API_H_ */ #endif /* _WLAN_MLME_UCFG_API_H_ */

View File

@@ -2876,6 +2876,54 @@ QDF_STATUS wlan_mlme_is_sap_uapsd_enabled(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
QDF_STATUS wlan_mlme_get_dtim_selection_diversity(struct wlan_objmgr_psoc *psoc,
uint32_t *dtim_selection_div)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
*dtim_selection_div = cfg_default(CFG_DTIM_SELECTION_DIVERSITY);
return QDF_STATUS_E_FAILURE;
}
*dtim_selection_div = mlme_obj->cfg.ps_params.dtim_selection_diversity;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_get_bmps_min_listen_interval(struct wlan_objmgr_psoc *psoc,
uint32_t *value)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
*value = cfg_default(CFG_BMPS_MINIMUM_LI);
return QDF_STATUS_E_FAILURE;
}
*value = mlme_obj->cfg.ps_params.bmps_min_listen_interval;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_get_bmps_max_listen_interval(struct wlan_objmgr_psoc *psoc,
uint32_t *value)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
*value = cfg_default(CFG_BMPS_MAXIMUM_LI);
return QDF_STATUS_E_FAILURE;
}
*value = mlme_obj->cfg.ps_params.bmps_max_listen_interval;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_set_sap_uapsd_flag(struct wlan_objmgr_psoc *psoc, QDF_STATUS wlan_mlme_set_sap_uapsd_flag(struct wlan_objmgr_psoc *psoc,
bool value) bool value)
{ {
@@ -2900,6 +2948,67 @@ QDF_STATUS wlan_mlme_get_rrm_enabled(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
*value = mlme_obj->cfg.rrm_config.rrm_enabled; *value = mlme_obj->cfg.rrm_config.rrm_enabled;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_get_auto_bmps_timer_value(struct wlan_objmgr_psoc *psoc,
uint32_t *value)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
*value = cfg_default(CFG_AUTO_BMPS_ENABLE_TIMER);
return QDF_STATUS_E_FAILURE;
}
*value = mlme_obj->cfg.ps_params.auto_bmps_timer_val;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_is_bmps_enabled(struct wlan_objmgr_psoc *psoc,
bool *value)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
*value = cfg_default(CFG_ENABLE_PS);
return QDF_STATUS_E_FAILURE;
}
*value = mlme_obj->cfg.ps_params.is_bmps_enabled;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_is_imps_enabled(struct wlan_objmgr_psoc *psoc,
bool *value)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
*value = cfg_default(CFG_ENABLE_IMPS);
return QDF_STATUS_E_FAILURE;
}
*value = mlme_obj->cfg.ps_params.is_imps_enabled;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_override_bmps_imps(struct wlan_objmgr_psoc *psoc)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj)
return QDF_STATUS_E_FAILURE;
mlme_obj->cfg.ps_params.is_imps_enabled = 0;
mlme_obj->cfg.ps_params.is_bmps_enabled = 0;
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }

View File

@@ -2516,118 +2516,6 @@ enum hdd_link_speed_rpt_type {
#define CFG_5G_MAX_RSSI_PENALIZE_MAX (20) #define CFG_5G_MAX_RSSI_PENALIZE_MAX (20)
#define CFG_5G_MAX_RSSI_PENALIZE_DEFAULT (10) #define CFG_5G_MAX_RSSI_PENALIZE_DEFAULT (10)
/*
* <ini>
* gEnableImps - Enable/Disable IMPS
* @Min: 0
* @Max: 1
* @Default: 1
*
* This ini is used to enable/Disable IMPS(IdleModePowerSave) Mode
*
* Related: None
*
* Supported Feature: Power Save
*
* Usage: External
*
* </ini>
*/
#define CFG_ENABLE_IMPS_NAME "gEnableImps"
#define CFG_ENABLE_IMPS_MIN (0)
#define CFG_ENABLE_IMPS_MAX (1)
#define CFG_ENABLE_IMPS_DEFAULT (1)
/*
* <ini>
* gEnableBmps - Enable/Disable BMPS
* @Min: 0
* @Max: 1
* @Default: 1
*
* This ini is used to enable/Disable BMPS(BeaconModePowerSave) Mode
*
* Related: None
*
* Supported Feature: Power Save
*
* Usage: External
*
* </ini>
*/
#define CFG_ENABLE_PS_NAME "gEnableBmps"
#define CFG_ENABLE_PS_MIN (0)
#define CFG_ENABLE_PS_MAX (1)
#define CFG_ENABLE_PS_DEFAULT (1)
/*
* <ini>
* gAutoBmpsTimerValue - Set Auto BMPS Timer value
* @Min: 0
* @Max: 120
* @Default: 90
*
* This ini is used to set Auto BMPS Timer value in seconds
*
* Related: gEnableBmps
*
* Supported Feature: Power Save
*
* Usage: External
*
* </ini>
*/
#define CFG_AUTO_PS_ENABLE_TIMER_NAME "gAutoBmpsTimerValue"
#define CFG_AUTO_PS_ENABLE_TIMER_MIN (0)
#define CFG_AUTO_PS_ENABLE_TIMER_MAX (120)
#define CFG_AUTO_PS_ENABLE_TIMER_DEFAULT (90)
/*
* <ini>
* gBmpsMinListenInterval - Set BMPS Minimum Listen Interval
* @Min: 1
* @Max: 65535
* @Default: 1
*
* This ini is used to set BMPS Minimum Listen Interval. If gPowerUsage
* is set "Min", this INI need to be set.
*
* Related: gEnableBmps, gPowerUsage
*
* Supported Feature: Power Save
*
* Usage: External
*
* </ini>
*/
#define CFG_BMPS_MINIMUM_LI_NAME "gBmpsMinListenInterval"
#define CFG_BMPS_MINIMUM_LI_MIN (1)
#define CFG_BMPS_MINIMUM_LI_MAX (65535)
#define CFG_BMPS_MINIMUM_LI_DEFAULT (1)
/*
* <ini>
* gBmpsMaxListenInterval - Set BMPS Maximum Listen Interval
* @Min: 1
* @Max: 65535
* @Default: 1
*
* This ini is used to set BMPS Maximum Listen Interval. If gPowerUsage
* is set "Max", this INI need to be set.
*
* Related: gEnableBmps, gPowerUsage
*
* Supported Feature: Power Save
*
* Usage: External
*
* </ini>
*/
#define CFG_BMPS_MAXIMUM_LI_NAME "gBmpsMaxListenInterval"
#define CFG_BMPS_MAXIMUM_LI_MIN (1)
#define CFG_BMPS_MAXIMUM_LI_MAX (65535)
#define CFG_BMPS_MAXIMUM_LI_DEFAULT (1)
/* /*
* <ini> * <ini>
* gActiveUcBpfMode - Control UC active APF mode * gActiveUcBpfMode - Control UC active APF mode
@@ -3278,23 +3166,6 @@ enum hdd_link_speed_rpt_type {
#define CFG_OFFLOAD_NEIGHBOR_REPORT_MAX_REQ_CAP_MAX (300) #define CFG_OFFLOAD_NEIGHBOR_REPORT_MAX_REQ_CAP_MAX (300)
#define CFG_OFFLOAD_NEIGHBOR_REPORT_MAX_REQ_CAP_DEFAULT (3) #define CFG_OFFLOAD_NEIGHBOR_REPORT_MAX_REQ_CAP_DEFAULT (3)
/*
* <ini>
* gEnableDTIMSelectionDiversity - Enable/Disable chain
* selection optimization for one chain dtim
* @Min: 0
* @Max: 30
* @Default: 5
*
* Usage: External
*
* </ini>
*/
#define CFG_DTIM_SELECTION_DIVERSITY_NAME "gEnableDTIMSelectionDiversity"
#define CFG_DTIM_SELECTION_DIVERSITY_MIN (0)
#define CFG_DTIM_SELECTION_DIVERSITY_MAX (30)
#define CFG_DTIM_SELECTION_DIVERSITY_DEFAULT (5)
/* /*
* <ini> * <ini>
* gTxSchDelay - Enable/Disable Tx sch delay * gTxSchDelay - Enable/Disable Tx sch delay
@@ -3458,12 +3329,6 @@ struct hdd_config {
/* Config parameters */ /* Config parameters */
bool enable_connected_scan; bool enable_connected_scan;
char PowerUsageControl[4]; char PowerUsageControl[4];
bool fSupplicantCountryCodeHasPriority;
bool fIsImpsEnabled;
bool is_ps_enabled;
uint32_t auto_bmps_timer_val;
uint32_t nBmpsMaxListenInterval;
uint32_t nBmpsMinListenInterval;
enum hdd_dot11_mode dot11Mode; enum hdd_dot11_mode dot11Mode;
uint32_t nChannelBondingMode24GHz; uint32_t nChannelBondingMode24GHz;
uint32_t nChannelBondingMode5GHz; uint32_t nChannelBondingMode5GHz;
@@ -3664,7 +3529,6 @@ struct hdd_config {
#ifdef WLAN_FEATURE_SAE #ifdef WLAN_FEATURE_SAE
bool is_sae_enabled; bool is_sae_enabled;
#endif #endif
bool enable_dtim_selection_diversity;
bool gcmp_enabled; bool gcmp_enabled;
bool is_11k_offload_supported; bool is_11k_offload_supported;
uint32_t offload_11k_enable_bitmask; uint32_t offload_11k_enable_bitmask;

View File

@@ -2459,15 +2459,17 @@ static int hdd_change_sta_state_authenticated(struct hdd_adapter *adapter,
struct csr_roam_info *roaminfo) struct csr_roam_info *roaminfo)
{ {
QDF_STATUS status; QDF_STATUS status;
uint32_t timeout; uint32_t timeout, auto_bmps_timer_val;
uint8_t staid = HDD_WLAN_INVALID_STA_ID; uint8_t staid = HDD_WLAN_INVALID_STA_ID;
struct hdd_station_ctx *hddstactx = struct hdd_station_ctx *hddstactx =
WLAN_HDD_GET_STATION_CTX_PTR(adapter); WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
ucfg_mlme_get_auto_bmps_timer_value(hdd_ctx->psoc,
&auto_bmps_timer_val);
timeout = hddstactx->hdd_reassoc_scenario ? timeout = hddstactx->hdd_reassoc_scenario ?
AUTO_PS_ENTRY_TIMER_DEFAULT_VALUE : AUTO_PS_ENTRY_TIMER_DEFAULT_VALUE :
hdd_ctx->config->auto_bmps_timer_val * 1000; (auto_bmps_timer_val * 1000);
if (QDF_IBSS_MODE == adapter->device_mode) if (QDF_IBSS_MODE == adapter->device_mode)
staid = hdd_get_ibss_peer_staid(hddstactx, roaminfo); staid = hdd_get_ibss_peer_staid(hddstactx, roaminfo);

View File

@@ -56,41 +56,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_ENABLE_CONNECTED_SCAN_MIN, CFG_ENABLE_CONNECTED_SCAN_MIN,
CFG_ENABLE_CONNECTED_SCAN_MAX), CFG_ENABLE_CONNECTED_SCAN_MAX),
REG_VARIABLE(CFG_ENABLE_IMPS_NAME, WLAN_PARAM_Integer,
struct hdd_config, fIsImpsEnabled,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_ENABLE_IMPS_DEFAULT,
CFG_ENABLE_IMPS_MIN,
CFG_ENABLE_IMPS_MAX),
REG_VARIABLE(CFG_ENABLE_PS_NAME, WLAN_PARAM_Integer,
struct hdd_config, is_ps_enabled,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_ENABLE_PS_DEFAULT,
CFG_ENABLE_PS_MIN,
CFG_ENABLE_PS_MAX),
REG_VARIABLE(CFG_AUTO_PS_ENABLE_TIMER_NAME, WLAN_PARAM_Integer,
struct hdd_config, auto_bmps_timer_val,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_AUTO_PS_ENABLE_TIMER_DEFAULT,
CFG_AUTO_PS_ENABLE_TIMER_MIN,
CFG_AUTO_PS_ENABLE_TIMER_MAX),
REG_VARIABLE(CFG_BMPS_MINIMUM_LI_NAME, WLAN_PARAM_Integer,
struct hdd_config, nBmpsMinListenInterval,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_BMPS_MINIMUM_LI_DEFAULT,
CFG_BMPS_MINIMUM_LI_MIN,
CFG_BMPS_MINIMUM_LI_MAX),
REG_VARIABLE(CFG_BMPS_MAXIMUM_LI_NAME, WLAN_PARAM_Integer,
struct hdd_config, nBmpsMaxListenInterval,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_BMPS_MAXIMUM_LI_DEFAULT,
CFG_BMPS_MAXIMUM_LI_MIN,
CFG_BMPS_MAXIMUM_LI_MAX),
REG_VARIABLE(CFG_DOT11_MODE_NAME, WLAN_PARAM_Integer, REG_VARIABLE(CFG_DOT11_MODE_NAME, WLAN_PARAM_Integer,
struct hdd_config, dot11Mode, struct hdd_config, dot11Mode,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
@@ -841,14 +806,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_OFFLOAD_NEIGHBOR_REPORT_MAX_REQ_CAP_MIN, CFG_OFFLOAD_NEIGHBOR_REPORT_MAX_REQ_CAP_MIN,
CFG_OFFLOAD_NEIGHBOR_REPORT_MAX_REQ_CAP_MAX), CFG_OFFLOAD_NEIGHBOR_REPORT_MAX_REQ_CAP_MAX),
REG_VARIABLE(CFG_DTIM_SELECTION_DIVERSITY_NAME,
WLAN_PARAM_Integer,
struct hdd_config, enable_dtim_selection_diversity,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_DTIM_SELECTION_DIVERSITY_DEFAULT,
CFG_DTIM_SELECTION_DIVERSITY_MIN,
CFG_DTIM_SELECTION_DIVERSITY_MAX),
REG_VARIABLE(CFG_TX_SCH_DELAY_NAME, REG_VARIABLE(CFG_TX_SCH_DELAY_NAME,
WLAN_PARAM_Integer, WLAN_PARAM_Integer,
struct hdd_config, enable_tx_sch_delay, struct hdd_config, enable_tx_sch_delay,
@@ -1629,27 +1586,27 @@ done:
*/ */
static void hdd_set_power_save_offload_config(struct hdd_context *hdd_ctx) static void hdd_set_power_save_offload_config(struct hdd_context *hdd_ctx)
{ {
struct hdd_config *pConfig = hdd_ctx->config; uint32_t listen_interval = 0;
uint32_t listenInterval = 0;
if (strcmp(ucfg_mlme_get_power_usage(hdd_ctx->psoc), "Min") == 0) if (strcmp(ucfg_mlme_get_power_usage(hdd_ctx->psoc), "Min") == 0)
listenInterval = pConfig->nBmpsMinListenInterval; ucfg_mlme_get_bmps_min_listen_interval(hdd_ctx->psoc,
&listen_interval);
else if (strcmp(ucfg_mlme_get_power_usage(hdd_ctx->psoc), "Max") == 0) else if (strcmp(ucfg_mlme_get_power_usage(hdd_ctx->psoc), "Max") == 0)
listenInterval = pConfig->nBmpsMaxListenInterval; ucfg_mlme_get_bmps_max_listen_interval(hdd_ctx->psoc,
&listen_interval);
/* /*
* Based on Mode Set the LI * Based on Mode Set the LI
* Otherwise default LI value of 1 will * Otherwise default LI value of 1 will
* be taken * be taken
*/ */
if (listenInterval) { if (listen_interval) {
/* /*
* setcfg for listenInterval. * setcfg for listenInterval.
* Make sure CFG is updated because PE reads this * Make sure CFG is updated because PE reads this
* from CFG at the time of assoc or reassoc * from CFG at the time of assoc or reassoc
*/ */
ucfg_mlme_set_sap_listen_interval(hdd_ctx->psoc, ucfg_mlme_set_sap_listen_interval(hdd_ctx->psoc,
listenInterval); listen_interval);
} }
} }
@@ -1827,8 +1784,7 @@ static void hdd_override_all_ps(struct hdd_context *hdd_ctx)
{ {
struct hdd_config *cfg_ini = hdd_ctx->config; struct hdd_config *cfg_ini = hdd_ctx->config;
cfg_ini->fIsImpsEnabled = 0; ucfg_mlme_override_bmps_imps(hdd_ctx->psoc);
cfg_ini->is_ps_enabled = 0;
hdd_disable_runtime_pm(cfg_ini); hdd_disable_runtime_pm(cfg_ini);
hdd_disable_auto_shutdown(cfg_ini); hdd_disable_auto_shutdown(cfg_ini);
} }
@@ -2528,9 +2484,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
/* Update maximum interfaces information */ /* Update maximum interfaces information */
smeConfig->csrConfig.max_intf_count = hdd_ctx->max_intf_count; smeConfig->csrConfig.max_intf_count = hdd_ctx->max_intf_count;
smeConfig->csrConfig.is_ps_enabled = hdd_ctx->config->is_ps_enabled;
smeConfig->csrConfig.auto_bmps_timer_val =
hdd_ctx->config->auto_bmps_timer_val;
hdd_set_fine_time_meas_cap(hdd_ctx); hdd_set_fine_time_meas_cap(hdd_ctx);
cds_set_multicast_logging(hdd_ctx->config->multicast_host_fw_msgs); cds_set_multicast_logging(hdd_ctx->config->multicast_host_fw_msgs);

View File

@@ -435,6 +435,7 @@ static int __wlan_hdd_cfg80211_encrypt_decrypt_msg(struct wiphy *wiphy,
struct net_device *dev = wdev->netdev; struct net_device *dev = wdev->netdev;
struct hdd_adapter *adapter = NULL; struct hdd_adapter *adapter = NULL;
int ret; int ret;
bool is_bmps_enabled;
hdd_enter_dev(dev); hdd_enter_dev(dev);
@@ -444,7 +445,8 @@ static int __wlan_hdd_cfg80211_encrypt_decrypt_msg(struct wiphy *wiphy,
adapter = WLAN_HDD_GET_PRIV_PTR(dev); adapter = WLAN_HDD_GET_PRIV_PTR(dev);
if (hdd_ctx->config->is_ps_enabled) { ucfg_mlme_is_bmps_enabled(hdd_ctx->psoc, &is_bmps_enabled);
if (is_bmps_enabled) {
hdd_debug("DISA is not supported when PS is enabled"); hdd_debug("DISA is not supported when PS is enabled");
return -EINVAL; return -EINVAL;
} }

View File

@@ -4823,6 +4823,7 @@ int hdd_set_fw_params(struct hdd_adapter *adapter)
struct hdd_context *hdd_ctx; struct hdd_context *hdd_ctx;
bool bval = false; bool bval = false;
uint8_t max_amsdu_len; uint8_t max_amsdu_len;
uint32_t dtim_sel_diversity;
hdd_enter_dev(adapter->dev); hdd_enter_dev(adapter->dev);
@@ -4843,12 +4844,13 @@ int hdd_set_fw_params(struct hdd_adapter *adapter)
goto error; goto error;
} }
ucfg_mlme_get_dtim_selection_diversity(hdd_ctx->psoc,
&dtim_sel_diversity);
ret = sme_cli_set_command( ret = sme_cli_set_command(
adapter->session_id, adapter->session_id,
WMI_PDEV_PARAM_1CH_DTIM_OPTIMIZED_CHAIN_SELECTION, WMI_PDEV_PARAM_1CH_DTIM_OPTIMIZED_CHAIN_SELECTION,
hdd_ctx->config->enable_dtim_selection_diversity, dtim_sel_diversity, PDEV_CMD);
PDEV_CMD);
if (ret) { if (ret) {
hdd_err("Failed to set DTIM_OPTIMIZED_CHAIN_SELECTION"); hdd_err("Failed to set DTIM_OPTIMIZED_CHAIN_SELECTION");
goto error; goto error;
@@ -10901,7 +10903,7 @@ static int hdd_features_init(struct hdd_context *hdd_ctx)
int ret; int ret;
mac_handle_t mac_handle; mac_handle_t mac_handle;
struct hdd_config *cfg; struct hdd_config *cfg;
bool b_cts2self; bool b_cts2self, is_imps_enabled;
hdd_enter(); hdd_enter();
@@ -10923,10 +10925,8 @@ static int hdd_features_init(struct hdd_context *hdd_ctx)
cfg-> cfg->
etsi13_srd_chan_in_master_mode); etsi13_srd_chan_in_master_mode);
if (hdd_ctx->config->fIsImpsEnabled) ucfg_mlme_is_imps_enabled(hdd_ctx->psoc, &is_imps_enabled);
hdd_set_idle_ps_config(hdd_ctx, true); hdd_set_idle_ps_config(hdd_ctx, is_imps_enabled);
else
hdd_set_idle_ps_config(hdd_ctx, false);
/* Send Enable/Disable data stall detection cmd to FW */ /* Send Enable/Disable data stall detection cmd to FW */
sme_cli_set_command(0, WMI_PDEV_PARAM_DATA_STALL_DETECT_ENABLE, sme_cli_set_command(0, WMI_PDEV_PARAM_DATA_STALL_DETECT_ENABLE,
@@ -11848,6 +11848,7 @@ int hdd_wlan_startup(struct hdd_context *hdd_ctx)
{ {
QDF_STATUS status; QDF_STATUS status;
int errno; int errno;
bool is_imps_enabled;
hdd_enter(); hdd_enter();
@@ -11931,7 +11932,8 @@ int hdd_wlan_startup(struct hdd_context *hdd_ctx)
if (QDF_IS_STATUS_ERROR(status)) if (QDF_IS_STATUS_ERROR(status))
goto unregister_notifiers; goto unregister_notifiers;
hdd_set_idle_ps_config(hdd_ctx, hdd_ctx->config->fIsImpsEnabled); ucfg_mlme_is_imps_enabled(hdd_ctx->psoc, &is_imps_enabled);
hdd_set_idle_ps_config(hdd_ctx, is_imps_enabled);
hdd_exit(); hdd_exit();

View File

@@ -1460,6 +1460,7 @@ int wlan_hdd_set_powersave(struct hdd_adapter *adapter,
mac_handle_t mac_handle; mac_handle_t mac_handle;
struct hdd_context *hdd_ctx; struct hdd_context *hdd_ctx;
QDF_STATUS status = QDF_STATUS_SUCCESS; QDF_STATUS status = QDF_STATUS_SUCCESS;
bool is_bmps_enabled;
if (NULL == adapter) { if (NULL == adapter) {
hdd_err("Adapter NULL"); hdd_err("Adapter NULL");
@@ -1497,7 +1498,8 @@ int wlan_hdd_set_powersave(struct hdd_adapter *adapter,
goto end; goto end;
} }
if (hdd_ctx->config && hdd_ctx->config->is_ps_enabled) { ucfg_mlme_is_bmps_enabled(hdd_ctx->psoc, &is_bmps_enabled);
if (is_bmps_enabled) {
hdd_debug("Wlan driver Entering Power save"); hdd_debug("Wlan driver Entering Power save");
/* /*
@@ -1533,7 +1535,8 @@ int wlan_hdd_set_powersave(struct hdd_adapter *adapter,
if (status != QDF_STATUS_SUCCESS) if (status != QDF_STATUS_SUCCESS)
goto end; goto end;
if (hdd_ctx->config && hdd_ctx->config->is_ps_enabled) ucfg_mlme_is_bmps_enabled(hdd_ctx->psoc, &is_bmps_enabled);
if (is_bmps_enabled)
status = sme_ps_enable_disable(mac_handle, status = sme_ps_enable_disable(mac_handle,
adapter->session_id, adapter->session_id,
SME_PS_DISABLE); SME_PS_DISABLE);

View File

@@ -1095,8 +1095,6 @@ typedef struct tagCsrConfigParam {
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE #ifdef FEATURE_AP_MCC_CH_AVOIDANCE
bool sap_channel_avoidance; bool sap_channel_avoidance;
#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
bool is_ps_enabled;
uint32_t auto_bmps_timer_val;
uint32_t dual_mac_feature_disable; uint32_t dual_mac_feature_disable;
uint32_t sta_sap_scc_on_dfs_chan; uint32_t sta_sap_scc_on_dfs_chan;
uint32_t roam_dense_rssi_thresh_offset; uint32_t roam_dense_rssi_thresh_offset;

View File

@@ -87,8 +87,6 @@ struct ps_params {
* @ps_params: maintain power save state and USAPD params * @ps_params: maintain power save state and USAPD params
*/ */
struct ps_global_info { struct ps_global_info {
bool ps_enabled;
uint32_t auto_bmps_timer_val;
struct ps_params ps_params[SIR_MAX_SUPPORTED_BSS]; struct ps_params ps_params[SIR_MAX_SUPPORTED_BSS];
/* Remain in Power active till DHCP completes */ /* Remain in Power active till DHCP completes */
bool remain_in_power_active_till_dhcp; bool remain_in_power_active_till_dhcp;

View File

@@ -334,14 +334,15 @@ QDF_STATUS sme_ps_process_command(struct mac_context *mac_ctx, uint32_t session_
*/ */
QDF_STATUS sme_enable_sta_ps_check(struct mac_context *mac_ctx, uint32_t session_id) QDF_STATUS sme_enable_sta_ps_check(struct mac_context *mac_ctx, uint32_t session_id)
{ {
struct ps_global_info *ps_global_info = &mac_ctx->sme.ps_global_info; struct wlan_mlme_powersave *powersave_params;
QDF_BUG(session_id < CSR_ROAM_SESSION_MAX); QDF_BUG(session_id < CSR_ROAM_SESSION_MAX);
if (session_id >= CSR_ROAM_SESSION_MAX) if (session_id >= CSR_ROAM_SESSION_MAX)
return QDF_STATUS_E_INVAL; return QDF_STATUS_E_INVAL;
/* Check if Sta Ps is enabled. */ /* Check if Sta Ps is enabled. */
if (!ps_global_info->ps_enabled) { powersave_params = &mac_ctx->mlme_cfg->ps_params;
if (!powersave_params->is_bmps_enabled) {
sme_debug("Cannot initiate PS. PS is disabled in ini"); sme_debug("Cannot initiate PS. PS is disabled in ini");
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
} }

View File

@@ -2673,10 +2673,6 @@ QDF_STATUS csr_change_default_config_param(struct mac_context *mac,
pParam->sap_channel_avoidance; pParam->sap_channel_avoidance;
#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
mac->sme.ps_global_info.ps_enabled =
pParam->is_ps_enabled;
mac->sme.ps_global_info.auto_bmps_timer_val =
pParam->auto_bmps_timer_val;
mac->dual_mac_feature_disable = mac->dual_mac_feature_disable =
pParam->dual_mac_feature_disable; pParam->dual_mac_feature_disable;
mac->sta_sap_scc_on_dfs_chan = mac->sta_sap_scc_on_dfs_chan =
@@ -2814,9 +2810,6 @@ QDF_STATUS csr_get_config_param(struct mac_context *mac, tCsrConfigParam *pParam
mac->dual_mac_feature_disable; mac->dual_mac_feature_disable;
pParam->sta_sap_scc_on_dfs_chan = pParam->sta_sap_scc_on_dfs_chan =
mac->sta_sap_scc_on_dfs_chan; mac->sta_sap_scc_on_dfs_chan;
pParam->is_ps_enabled = mac->sme.ps_global_info.ps_enabled;
pParam->auto_bmps_timer_val =
mac->sme.ps_global_info.auto_bmps_timer_val;
pParam->f_sta_miracast_mcc_rest_time_val = pParam->f_sta_miracast_mcc_rest_time_val =
mac->f_sta_miracast_mcc_rest_time_val; mac->f_sta_miracast_mcc_rest_time_val;
pParam->send_smps_action = mac->roam.configParam.send_smps_action; pParam->send_smps_action = mac->roam.configParam.send_smps_action;