From c875e24d7edb3f1663d70f6be5644427ac81814f Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Fri, 23 Sep 2016 18:12:34 -0700 Subject: qcacld-3.0: Refactor HDD LPASS "target config" logic Previously "qcacld-3.0: Refactor WLAN_FEATURE_LPSS" refactored some of the HDD LPASS logic. Continue that process by refactoring the "target config" logic such that the actual implementation is in the lpass feature file. Change-Id: I2fb40fc2d0276bfad9f79f340895b7d23c8a9d5d CRs-Fixed: 1070700 --- core/hdd/src/wlan_hdd_lpass.c | 16 ++++++++++++++++ core/hdd/src/wlan_hdd_lpass.h | 18 ++++++++++++++++++ core/hdd/src/wlan_hdd_main.c | 8 +------- 3 files changed, 35 insertions(+), 7 deletions(-) diff --git a/core/hdd/src/wlan_hdd_lpass.c b/core/hdd/src/wlan_hdd_lpass.c index 6f750629f6b4..d55b8e9e4e01 100644 --- a/core/hdd/src/wlan_hdd_lpass.c +++ b/core/hdd/src/wlan_hdd_lpass.c @@ -261,6 +261,22 @@ static void wlan_hdd_send_all_scan_intf_info(struct hdd_context_s *hdd_ctx) wlan_hdd_send_status_pkg(adapter, NULL, 1, 0); } +/** + * hdd_lpass_target_config() - Handle LPASS target configuration + * @hdd_ctx: HDD global context where lpass information is stored + * @target_config: Target configuration containing lpass info + * + * This function updates the HDD context with lpass-specific + * information provided by the target. + * + * Return: none + */ +void hdd_lpass_target_config(struct hdd_context_s *hdd_ctx, + struct wma_tgt_cfg *target_config) +{ + hdd_ctx->lpss_support = target_config->lpss_support; +} + /** * hdd_lpass_populate_cds_config() - Populate LPASS configuration * @cds_config: CDS configuration to populate with lpass info diff --git a/core/hdd/src/wlan_hdd_lpass.h b/core/hdd/src/wlan_hdd_lpass.h index fd88036faa01..8ecc3e782df2 100644 --- a/core/hdd/src/wlan_hdd_lpass.h +++ b/core/hdd/src/wlan_hdd_lpass.h @@ -29,10 +29,24 @@ #define WLAN_HDD_LPASS_H struct cds_config_info; +struct wma_tgt_cfg; struct hdd_context_s; struct hdd_adapter_s; #ifdef WLAN_FEATURE_LPSS +/** + * hdd_lpass_target_config() - Handle LPASS target configuration + * @hdd_ctx: HDD global context where lpass information is stored + * @target_config: Target configuration containing lpass info + * + * This function updates the HDD context with lpass-specific + * information provided by the target. + * + * Return: none + */ +void hdd_lpass_target_config(struct hdd_context_s *hdd_ctx, + struct wma_tgt_cfg *target_config); + /** * hdd_lpass_populate_cds_config() - Populate LPASS configuration * @cds_config: CDS configuration to populate with lpass info @@ -111,6 +125,10 @@ void hdd_lpass_notify_stop(struct hdd_context_s *hdd_ctx); bool hdd_lpass_is_supported(struct hdd_context_s *hdd_ctx); #else +static inline void hdd_lpass_target_config(struct hdd_context_s *hdd_ctx, + struct wma_tgt_cfg *target_config) +{ +} static inline void hdd_lpass_populate_cds_config(struct cds_config_info *cds_config, struct hdd_context_s *hdd_ctx) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 52caf0188b2a..4808bfd08e0d 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -40,9 +40,6 @@ #include #include #include -#ifdef WLAN_FEATURE_LPSS -#include -#endif #include #include #include @@ -1448,10 +1445,7 @@ void hdd_update_tgt_cfg(void *context, void *param) hdd_ctx->max_intf_count = cfg->max_intf_count; -#ifdef WLAN_FEATURE_LPSS - hdd_ctx->lpss_support = cfg->lpss_support; -#endif - + hdd_lpass_target_config(hdd_ctx, cfg); hdd_wlan_set_egap_support(hdd_ctx, cfg); hdd_ctx->ap_arpns_support = cfg->ap_arpns_support; -- cgit v1.2.3