diff --git a/core/hdd/inc/wlan_hdd_nan.h b/core/hdd/inc/wlan_hdd_nan.h index 02947164e359..a246269257b1 100644 --- a/core/hdd/inc/wlan_hdd_nan.h +++ b/core/hdd/inc/wlan_hdd_nan.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -58,6 +58,20 @@ static inline void hdd_nan_populate_cds_config(struct cds_config_info *cds_cfg, { cds_cfg->is_nan_enabled = hdd_ctx->config->enable_nan_support; } + +/** + * hdd_nan_populate_pmo_config() - Populate NAN pmo configuration + * @pmo_cfg: PMO Configuration + * @hdd_ctx: Pointer to hdd context + * + * Return: none + */ +static inline void hdd_nan_populate_pmo_config(struct pmo_psoc_cfg *pmo_cfg, + hdd_context_t *hdd_ctx) +{ + pmo_cfg->nan_enable = hdd_ctx->config->enable_nan_support; +} + void wlan_hdd_cfg80211_nan_callback(void *ctx, tSirNanEvent *msg); #else static inline bool wlan_hdd_nan_is_supported(void) @@ -68,6 +82,12 @@ static inline void hdd_nan_populate_cds_config(struct cds_config_info *cds_cfg, hdd_context_t *hdd_ctx) { } + +static inline void hdd_nan_populate_pmo_config(struct pmo_psoc_cfg *pmo_cfg, + hdd_context_t *hdd_ctx) +{ +} + static inline void wlan_hdd_cfg80211_nan_callback(void *ctx, tSirNanEvent *msg) { diff --git a/core/hdd/src/wlan_hdd_lpass.c b/core/hdd/src/wlan_hdd_lpass.c index 2642c224d2c5..743af84d6da5 100644 --- a/core/hdd/src/wlan_hdd_lpass.c +++ b/core/hdd/src/wlan_hdd_lpass.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -280,6 +280,16 @@ void hdd_lpass_populate_cds_config(struct cds_config_info *cds_config, cds_config->is_lpass_enabled = hdd_ctx->config->enable_lpass_support; } +/* + * hdd_lpass_populate_pmo_config() - Populate LPASS configuration + * (public function documented in wlan_hdd_lpass.h) + */ +void hdd_lpass_populate_pmo_config(struct pmo_psoc_cfg *pmo_config, + struct hdd_context_s *hdd_ctx) +{ + pmo_config->lpass_enable = hdd_ctx->config->enable_lpass_support; +} + /* * hdd_lpass_notify_connect() - Notify LPASS of interface connect * (public function documented in wlan_hdd_lpass.h) diff --git a/core/hdd/src/wlan_hdd_lpass.h b/core/hdd/src/wlan_hdd_lpass.h index 8ecc3e782df2..0fee093b4a21 100644 --- a/core/hdd/src/wlan_hdd_lpass.h +++ b/core/hdd/src/wlan_hdd_lpass.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -60,6 +60,19 @@ void hdd_lpass_target_config(struct hdd_context_s *hdd_ctx, void hdd_lpass_populate_cds_config(struct cds_config_info *cds_config, struct hdd_context_s *hdd_ctx); +/** + * hdd_lpass_populate_pmo_config() - Populate LPASS configuration + * @pmo_config: PMO configuration to populate with lpass info + * @hdd_ctx: HDD global context which contains lpass information + * + * This function seeds the PMO configuration structure with + * lpass-specific information gleaned from the HDD context. + * + * Return: none + */ +void hdd_lpass_populate_pmo_config(struct pmo_psoc_cfg *pmo_config, + struct hdd_context_s *hdd_ctx); + /** * hdd_lpass_notify_connect() - Notify LPASS of interface connect * @adapter: The adapter that connected @@ -134,6 +147,13 @@ void hdd_lpass_populate_cds_config(struct cds_config_info *cds_config, struct hdd_context_s *hdd_ctx) { } + +static inline +void hdd_lpass_populate_pmo_config(struct pmo_psoc_cfg *pmo_config, + struct hdd_context_s *hdd_ctx) +{ +} + static inline void hdd_lpass_notify_connect(struct hdd_adapter_s *adapter) { } diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 855b85f13572..dab1caeb7d08 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -10601,8 +10601,15 @@ static int hdd_update_pmo_config(hdd_context_t *hdd_ctx) hdd_ctx->config->active_mode_offload; psoc_cfg.ap_arpns_support = hdd_ctx->ap_arpns_support; psoc_cfg.max_wow_filters = hdd_ctx->config->maxWoWFilters; + psoc_cfg.sta_dynamic_dtim = hdd_ctx->config->enableDynamicDTIM; + psoc_cfg.sta_mod_dtim = hdd_ctx->config->enableModulatedDTIM; + psoc_cfg.sta_max_li_mod_dtim = hdd_ctx->config->fMaxLIModulatedDTIM; + psoc_cfg.power_save_mode = + hdd_ctx->config->enablePowersaveOffload; hdd_ra_populate_pmo_config(&psoc_cfg, hdd_ctx); + hdd_nan_populate_pmo_config(&psoc_cfg, hdd_ctx); + hdd_lpass_populate_pmo_config(&psoc_cfg, hdd_ctx); status = pmo_ucfg_update_psoc_config(psoc, &psoc_cfg); if (status != QDF_STATUS_SUCCESS) { hdd_err("failed pmo psoc configuration");