Quellcode durchsuchen

qcacld-3.0: Refactor HDD "is lpass supported?" logic

Previously "qcacld-3.0: Refactor WLAN_FEATURE_LPSS" refactored some of
the HDD LPASS logic.  Continue that process by refactoring the "is
lpass supported?" logic such that the actual implementation is in the
lpass feature file.

Change-Id: If54961eebc97951985770cdad813d6fbbc3953f9
CRs-Fixed: 1070700
Jeff Johnson vor 8 Jahren
Ursprung
Commit
b8bf907c73
3 geänderte Dateien mit 27 neuen und 13 gelöschten Zeilen
  1. 12 0
      core/hdd/src/wlan_hdd_lpass.c
  2. 14 0
      core/hdd/src/wlan_hdd_lpass.h
  3. 1 13
      core/hdd/src/wlan_hdd_main.c

+ 12 - 0
core/hdd/src/wlan_hdd_lpass.c

@@ -369,3 +369,15 @@ void hdd_lpass_notify_stop(struct hdd_context_s *hdd_ctx)
 {
 	wlan_hdd_send_status_pkg(NULL, NULL, 0, 0);
 }
+
+/**
+ * hdd_lpass_is_supported() - Is lpass feature supported?
+ * @hdd_ctx: The global HDD context
+ *
+ * Return: true if feature is enabled and supported by firmware, false
+ * if the feature is not enabled or not supported by firmware.
+ */
+bool hdd_lpass_is_supported(struct hdd_context_s *hdd_ctx)
+{
+	return hdd_ctx->config->enable_lpass_support;
+}

+ 14 - 0
core/hdd/src/wlan_hdd_lpass.h

@@ -100,6 +100,16 @@ void hdd_lpass_notify_start(struct hdd_context_s *hdd_ctx);
  * Return: none
  */
 void hdd_lpass_notify_stop(struct hdd_context_s *hdd_ctx);
+
+/**
+ * hdd_lpass_is_supported() - Is lpass feature supported?
+ * @hdd_ctx: The global HDD context
+ *
+ * Return: true if feature is enabled and supported by firmware, false
+ * if the feature is not enabled or not supported by firmware.
+ */
+bool hdd_lpass_is_supported(struct hdd_context_s *hdd_ctx);
+
 #else
 static inline
 void hdd_lpass_populate_cds_config(struct cds_config_info *cds_config,
@@ -117,6 +127,10 @@ static inline void hdd_lpass_notify_mode_change(struct hdd_adapter_s *adapter)
 }
 static inline void hdd_lpass_notify_start(struct hdd_context_s *hdd_ctx) { }
 static inline void hdd_lpass_notify_stop(struct hdd_context_s *hdd_ctx) { }
+static inline bool hdd_lpass_is_supported(struct hdd_context_s *hdd_ctx)
+{
+	return false;
+}
 #endif
 
 #endif /* WLAN_HDD_LPASS_H */

+ 1 - 13
core/hdd/src/wlan_hdd_main.c

@@ -9156,18 +9156,6 @@ void hdd_set_conparam(uint32_t con_param)
 	curr_con_mode = con_param;
 }
 
-#ifdef WLAN_FEATURE_LPSS
-static inline bool hdd_is_lpass_supported(hdd_context_t *hdd_ctx)
-{
-	return hdd_ctx->config->enable_lpass_support;
-}
-#else
-static inline bool hdd_is_lpass_supported(hdd_context_t *hdd_ctx)
-{
-	return false;
-}
-#endif
-
 /**
  * hdd_clean_up_pre_cac_interface() - Clean up the pre cac interface
  * @hdd_ctx: HDD context
@@ -9219,7 +9207,7 @@ static void hdd_update_ol_config(hdd_context_t *hdd_ctx)
 	cfg.enable_uart_print = hdd_ctx->config->enablefwprint;
 	cfg.enable_fw_log = hdd_ctx->config->enable_fw_log;
 	cfg.enable_ramdump_collection = hdd_ctx->config->is_ramdump_enabled;
-	cfg.enable_lpass_support = hdd_is_lpass_supported(hdd_ctx);
+	cfg.enable_lpass_support = hdd_lpass_is_supported(hdd_ctx);
 
 	ol_init_ini_config(ol_ctx, &cfg);
 }