summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnson <jjohnson@codeaurora.org>2016-09-23 18:12:34 -0700
committerqcabuildsw <qcabuildsw@localhost>2016-10-03 16:48:58 -0700
commitc875e24d7edb3f1663d70f6be5644427ac81814f (patch)
tree080a35c118790ca97cfbb7bbca6ee96a8ded4d0f
parentb8bf907c73ed0e0990079874c39e206b57b1408b (diff)
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
-rw-r--r--core/hdd/src/wlan_hdd_lpass.c16
-rw-r--r--core/hdd/src/wlan_hdd_lpass.h18
-rw-r--r--core/hdd/src/wlan_hdd_main.c8
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
@@ -262,6 +262,22 @@ static void wlan_hdd_send_all_scan_intf_info(struct hdd_context_s *hdd_ctx)
}
/**
+ * 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
* @hdd_ctx: HDD global context which contains lpass information
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,11 +29,25 @@
#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
* @hdd_ctx: HDD global context which contains lpass information
@@ -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 <cds_api.h>
#include <cds_sched.h>
#include <linux/cpu.h>
-#ifdef WLAN_FEATURE_LPSS
-#include <cds_utils.h>
-#endif
#include <linux/etherdevice.h>
#include <linux/firmware.h>
#include <wlan_hdd_tx_rx.h>
@@ -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;