浏览代码

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
Jeff Johnson 8 年之前
父节点
当前提交
c875e24d7e
共有 3 个文件被更改,包括 35 次插入7 次删除
  1. 16 0
      core/hdd/src/wlan_hdd_lpass.c
  2. 18 0
      core/hdd/src/wlan_hdd_lpass.h
  3. 1 7
      core/hdd/src/wlan_hdd_main.c

+ 16 - 0
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

+ 18 - 0
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)

+ 1 - 7
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;