Forráskód Böngészése

qcacmn: Remove unwanted ini config from hif

Move unwanted ini config params from hif to respective modules.

Change-Id: I19603bcf516cf2c67053c707456d83ee536f41ce
CRs-Fixed: 967765
Komal Seelam 9 éve
szülő
commit
a5911d3ca2
2 módosított fájl, 18 hozzáadás és 13 törlés
  1. 3 10
      hif/inc/hif.h
  2. 15 3
      hif/src/hif_main.c

+ 3 - 10
hif/inc/hif.h

@@ -146,21 +146,13 @@ struct qca_napi_data {
 };
 
 /**
- * struct hif_config_info - Place Holder for hif configuration
- * @enable_uart_print: UART Print
+ * struct hif_config_info - Place Holder for hif confiruation
  * @enable_self_recovery: Self Recovery
- * @enable_fw_log: To Enable FW LOG
- * @enable_lpass_support: LPASS support
- * @enable_ramdump_collection: Ramdump Collection
  *
- * Structure for holding ini parameters.
+ * Structure for holding hif ini parameters.
  */
 struct hif_config_info {
-	bool enable_uart_print;
 	bool enable_self_recovery;
-	bool enable_fw_log;
-	bool enable_lpass_support;
-	bool enable_ramdump_collection;
 };
 
 /**
@@ -555,6 +547,7 @@ struct hif_config_info *hif_get_ini_handle(struct ol_softc *scn);
 struct ramdump_info *hif_get_ramdump_ctx(struct ol_softc *hif_ctx);
 ol_target_status hif_get_target_status(struct ol_softc *hif_ctx);
 void hif_set_target_status(struct ol_softc *hif_ctx, ol_target_status);
+void hif_init_ini_config(struct ol_softc *hif_ctx, struct hif_config_info *cfg);
 #ifdef __cplusplus
 }
 #endif

+ 15 - 3
hif/src/hif_main.c

@@ -464,7 +464,6 @@ CDF_STATUS hif_open(cdf_device_t cdf_ctx, enum ath_hal_bus_type bus_type)
 	struct hif_softc *scn;
 	v_CONTEXT_t cds_context;
 	CDF_STATUS status = CDF_STATUS_SUCCESS;
-	struct hif_config_info *cfg;
 	int bus_context_size = hif_bus_get_context_size();
 
 	cds_context = cds_get_global_context();
@@ -478,7 +477,6 @@ CDF_STATUS hif_open(cdf_device_t cdf_ctx, enum ath_hal_bus_type bus_type)
 	cdf_mem_zero(scn, bus_context_size);
 	hif_hdl = GET_HIF_OPAQUE_HDL(scn);
 	scn->cdf_dev = cdf_ctx;
-	cfg = hif_get_ini_handle(hif_hdl);
 	cdf_atomic_init(&scn->active_tasklet_cnt);
 	cdf_atomic_init(&scn->link_suspended);
 	cdf_atomic_init(&scn->tasklet_from_intr);
@@ -871,7 +869,7 @@ ol_target_status hif_get_target_status(struct ol_softc *hif_ctx)
 }
 
 /**
- * hif_set_target_status - API to set target status
+ * hif_set_target_status() - API to set target status
  * @hif_ctx: HIF Context
  * @status: Target Status
  *
@@ -883,3 +881,17 @@ void hif_set_target_status(struct ol_softc *hif_ctx, ol_target_status status)
 
 	scn->target_status = status;
 }
+
+/**
+ * hif_init_ini_config() - API to initialize HIF configuration parameters
+ * @hif_ctx: HIF Context
+ * @cfg: HIF Configuration
+ *
+ * Return: void
+ */
+void hif_init_ini_config(struct ol_softc *hif_ctx, struct hif_config_info *cfg)
+{
+	struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
+
+	cdf_mem_copy(&scn->hif_config, cfg, sizeof(struct hif_config_info));
+}