qcacld-3.0: Override powersave configuration for monitor mode
Currently, powersave configuration is being overwritten before INIs are initialized by mlme component. As a result INI configuration is not being overwritten in case of monitor mode. To resolve this issue, overwrite PS configuration during start modules and restore it in stop modules. Change-Id: I2707b431b81881c943104b211d55c6f48f348ba9 CRs-Fixed: 2682164
This commit is contained in:
@@ -2240,7 +2240,6 @@ QDF_STATUS wlan_mlme_is_bmps_enabled(struct wlan_objmgr_psoc *psoc,
|
|||||||
/**
|
/**
|
||||||
* wlan_mlme_override_bmps_imps() - disable imps/bmps
|
* wlan_mlme_override_bmps_imps() - disable imps/bmps
|
||||||
* @psoc: pointer to psoc object
|
* @psoc: pointer to psoc object
|
||||||
* @value: value that is requested by the caller
|
|
||||||
*
|
*
|
||||||
* Return: QDF_STATUS_SUCCESS - in case of success
|
* Return: QDF_STATUS_SUCCESS - in case of success
|
||||||
*/
|
*/
|
||||||
|
@@ -341,6 +341,15 @@ QDF_STATUS hdd_get_nss(struct hdd_adapter *adapter, uint8_t *nss);
|
|||||||
*/
|
*/
|
||||||
bool hdd_dfs_indicate_radar(struct hdd_context *hdd_ctx);
|
bool hdd_dfs_indicate_radar(struct hdd_context *hdd_ctx);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hdd_restore_all_ps() - Restore all the powersave configuration overwritten
|
||||||
|
* by hdd_override_all_ps.
|
||||||
|
* @hdd_ctx: Pointer to HDD context.
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void hdd_restore_all_ps(struct hdd_context *hdd_ctx);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hdd_override_all_ps() - overrides to disables all the powersave features.
|
* hdd_override_all_ps() - overrides to disables all the powersave features.
|
||||||
* @hdd_ctx: Pointer to HDD context.
|
* @hdd_ctx: Pointer to HDD context.
|
||||||
|
@@ -339,40 +339,86 @@ config_exit:
|
|||||||
return qdf_status;
|
return qdf_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef FEATURE_RUNTIME_PM
|
||||||
/**
|
/**
|
||||||
* hdd_disable_runtime_pm() - Override to disable runtime_pm.
|
* hdd_disable_runtime_pm() - Override to disable runtime_pm.
|
||||||
* @cfg_ini: Handle to struct hdd_config
|
* @cfg_ini: Handle to struct hdd_config
|
||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
#ifdef FEATURE_RUNTIME_PM
|
|
||||||
static void hdd_disable_runtime_pm(struct hdd_config *cfg_ini)
|
static void hdd_disable_runtime_pm(struct hdd_config *cfg_ini)
|
||||||
{
|
{
|
||||||
cfg_ini->runtime_pm = 0;
|
cfg_ini->runtime_pm = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hdd_restore_runtime_pm() - Restore runtime_pm configuration.
|
||||||
|
* @cfg_ini: Handle to struct hdd_config
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
static void hdd_restore_runtime_pm(struct hdd_context *hdd_ctx)
|
||||||
|
{
|
||||||
|
struct hdd_config *cfg_ini = hdd_ctx->config;
|
||||||
|
|
||||||
|
cfg_ini->runtime_pm = cfg_get(hdd_ctx->psoc, CFG_ENABLE_RUNTIME_PM);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
static void hdd_disable_runtime_pm(struct hdd_config *cfg_ini)
|
static void hdd_disable_runtime_pm(struct hdd_config *cfg_ini)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void hdd_restore_runtime_pm(struct hdd_context *hdd_ctx)
|
||||||
|
{
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
|
||||||
/**
|
/**
|
||||||
* hdd_disable_auto_shutdown() - Override to disable auto_shutdown.
|
* hdd_disable_auto_shutdown() - Override to disable auto_shutdown.
|
||||||
* @cfg_ini: Handle to struct hdd_config
|
* @cfg_ini: Handle to struct hdd_config
|
||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
|
|
||||||
static void hdd_disable_auto_shutdown(struct hdd_config *cfg_ini)
|
static void hdd_disable_auto_shutdown(struct hdd_config *cfg_ini)
|
||||||
{
|
{
|
||||||
cfg_ini->wlan_auto_shutdown = 0;
|
cfg_ini->wlan_auto_shutdown = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hdd_restore_auto_shutdown() - Restore auto_shutdown configuration.
|
||||||
|
* @cfg_ini: Handle to struct hdd_config
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
static void hdd_restore_auto_shutdown(struct hdd_context *hdd_ctx)
|
||||||
|
{
|
||||||
|
struct hdd_config *cfg_ini = hdd_ctx->config;
|
||||||
|
|
||||||
|
cfg_ini->wlan_auto_shutdown = cfg_get(hdd_ctx->psoc,
|
||||||
|
CFG_WLAN_AUTO_SHUTDOWN);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
static void hdd_disable_auto_shutdown(struct hdd_config *cfg_ini)
|
static void hdd_disable_auto_shutdown(struct hdd_config *cfg_ini)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void hdd_restore_auto_shutdown(struct hdd_context *hdd_ctx)
|
||||||
|
{
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void hdd_restore_all_ps(struct hdd_context *hdd_ctx)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* imps/bmps configuration will be restored in driver mode change
|
||||||
|
* sequence as part of hdd_wlan_start_modules
|
||||||
|
*/
|
||||||
|
|
||||||
|
hdd_restore_runtime_pm(hdd_ctx);
|
||||||
|
hdd_restore_auto_shutdown(hdd_ctx);
|
||||||
|
}
|
||||||
|
|
||||||
void hdd_override_all_ps(struct hdd_context *hdd_ctx)
|
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;
|
||||||
|
@@ -3883,6 +3883,10 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, bool reinit)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Override PS params for monitor mode */
|
||||||
|
if (hdd_get_conparam() == QDF_GLOBAL_MONITOR_MODE)
|
||||||
|
hdd_override_all_ps(hdd_ctx);
|
||||||
|
|
||||||
ret = hdd_configure_cds(hdd_ctx);
|
ret = hdd_configure_cds(hdd_ctx);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
hdd_err("Failed to Enable cds modules; errno: %d", ret);
|
hdd_err("Failed to Enable cds modules; errno: %d", ret);
|
||||||
@@ -10735,9 +10739,6 @@ static void hdd_override_ini_config(struct hdd_context *hdd_ctx)
|
|||||||
hdd_ctx->config->action_oui_enable = 0;
|
hdd_ctx->config->action_oui_enable = 0;
|
||||||
hdd_err("Ignore action oui ini, since no action_oui component");
|
hdd_err("Ignore action oui ini, since no action_oui component");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (QDF_GLOBAL_MONITOR_MODE == cds_get_conparam())
|
|
||||||
hdd_override_all_ps(hdd_ctx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_MTRACE_LOG
|
#ifdef ENABLE_MTRACE_LOG
|
||||||
@@ -13201,6 +13202,10 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode)
|
|||||||
case DRIVER_MODULES_ENABLED:
|
case DRIVER_MODULES_ENABLED:
|
||||||
hdd_debug("Wlan transitioning (CLOSED <- ENABLED)");
|
hdd_debug("Wlan transitioning (CLOSED <- ENABLED)");
|
||||||
|
|
||||||
|
/* Restore PS params for monitor mode */
|
||||||
|
if (hdd_get_conparam() == QDF_GLOBAL_MONITOR_MODE)
|
||||||
|
hdd_restore_all_ps(hdd_ctx);
|
||||||
|
|
||||||
if (hdd_get_conparam() == QDF_GLOBAL_FTM_MODE) {
|
if (hdd_get_conparam() == QDF_GLOBAL_FTM_MODE) {
|
||||||
hdd_disable_power_management(hdd_ctx);
|
hdd_disable_power_management(hdd_ctx);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user