Kaynağa Gözat

qcacld-3.0: Use qdf macro for epping mode

Use QDF macro to check if we are in epping mode.
Remove bit masks of epping configuration.

Change-Id: I454ef259dfcc4b7c7860a5adfda605837f4a89cc
CRs-Fixed: 1003792
Houston Hoffman 9 yıl önce
ebeveyn
işleme
371d4a9340

+ 3 - 5
core/bmi/src/ol_fw.c

@@ -173,7 +173,7 @@ __ol_transfer_bin_file(struct ol_context *ol_ctx, ATH_BIN_FILE file,
 #endif
 		break;
 	case ATH_FIRMWARE_FILE:
-		if (WLAN_IS_EPPING_ENABLED(cds_get_conparam())) {
+		if (QDF_IS_EPPING_ENABLED(cds_get_conparam())) {
 #if defined(CONFIG_CNSS)
 			filename = bmi_ctx->fw_files.epping_file;
 #else
@@ -237,7 +237,7 @@ __ol_transfer_bin_file(struct ol_context *ol_ctx, ATH_BIN_FILE file,
 		break;
 	case ATH_SETUP_FILE:
 		if (cds_get_conparam() != QDF_GLOBAL_FTM_MODE &&
-		    !WLAN_IS_EPPING_ENABLED(cds_get_conparam())) {
+		    !QDF_IS_EPPING_ENABLED(cds_get_conparam())) {
 #ifdef CONFIG_CNSS
 			BMI_INFO("%s: no Setup file defined", __func__);
 			return -1;
@@ -1332,9 +1332,7 @@ QDF_STATUS ol_download_firmware(struct ol_context *ol_ctx)
 			(uint8_t *) &address, 4, ol_ctx);
 	}
 
-	if (ini_cfg->enable_uart_print ||
-	    (WLAN_IS_EPPING_ENABLED(cds_get_conparam()) &&
-	     WLAN_IS_EPPING_FW_UART(cds_get_conparam()))) {
+	if (ini_cfg->enable_uart_print) {
 		switch (target_version) {
 		case AR6004_VERSION_REV1_3:
 			param = 11;

+ 2 - 2
core/dp/txrx/ol_txrx.c

@@ -470,7 +470,7 @@ void htt_pkt_log_init(struct ol_txrx_pdev_t *handle, void *scn)
 		return;
 
 	if (cds_get_conparam() != QDF_GLOBAL_FTM_MODE &&
-			!WLAN_IS_EPPING_ENABLED(cds_get_conparam())) {
+			!QDF_IS_EPPING_ENABLED(cds_get_conparam())) {
 		ol_pl_sethandle(&handle->pl_dev, scn);
 		if (pktlogmod_init(scn))
 			qdf_print("%s: pktlogmod_init failed", __func__);
@@ -489,7 +489,7 @@ void htt_pkt_log_init(struct ol_txrx_pdev_t *handle, void *scn)
 void htt_pktlogmod_exit(struct ol_txrx_pdev_t *handle, void *scn)
 {
 	if (scn && cds_get_conparam() != QDF_GLOBAL_FTM_MODE &&
-		!WLAN_IS_EPPING_ENABLED(cds_get_conparam()) &&
+		!QDF_IS_EPPING_ENABLED(cds_get_conparam()) &&
 			handle->pkt_log_init) {
 		pktlogmod_exit(scn);
 		handle->pkt_log_init = false;

+ 5 - 5
core/hdd/src/wlan_hdd_driver_ops.c

@@ -353,7 +353,7 @@ static int wlan_hdd_probe(struct device *dev, void *bdev, const hif_bus_id *bid,
 		cds_set_load_in_progress(true);
 	}
 
-	if (WLAN_IS_EPPING_ENABLED(mode)) {
+	if (QDF_IS_EPPING_ENABLED(mode)) {
 		status = epping_open();
 		if (status != QDF_STATUS_SUCCESS)
 			goto err_hdd_deinit;
@@ -403,7 +403,7 @@ err_bmi_close:
 err_hif_close:
 	hdd_hif_close(hif_ctx);
 err_epping_close:
-	if (WLAN_IS_EPPING_ENABLED(mode))
+	if (QDF_IS_EPPING_ENABLED(mode))
 		epping_close();
 err_hdd_deinit:
 	cds_set_load_in_progress(false);
@@ -457,7 +457,7 @@ static void wlan_hdd_remove(void)
 
 	hif_disable_power_management(hif_ctx);
 
-	if (WLAN_IS_EPPING_ENABLED(cds_get_conparam())) {
+	if (QDF_IS_EPPING_ENABLED(cds_get_conparam())) {
 		epping_disable();
 		epping_close();
 	} else {
@@ -493,7 +493,7 @@ static void wlan_hdd_shutdown(void)
 	if (!cds_wait_for_external_threads_completion(__func__))
 		hdd_err("Host is not ready for SSR, attempting anyway");
 
-	if (!WLAN_IS_EPPING_ENABLED(cds_get_conparam())) {
+	if (!QDF_IS_EPPING_ENABLED(cds_get_conparam())) {
 		hif_disable_isr(hif_ctx);
 		hdd_wlan_shutdown();
 	}
@@ -527,7 +527,7 @@ void wlan_hdd_crash_shutdown(void)
  */
 void wlan_hdd_notify_handler(int state)
 {
-	if (!WLAN_IS_EPPING_ENABLED(cds_get_conparam())) {
+	if (!QDF_IS_EPPING_ENABLED(cds_get_conparam())) {
 		int ret = 0;
 		ret = hdd_wlan_notify_modem_power_state(state);
 		if (ret < 0)

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

@@ -5723,7 +5723,7 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc)
 
 	ENTER();
 
-	if (WLAN_IS_EPPING_ENABLED(con_mode)) {
+	if (QDF_IS_EPPING_ENABLED(con_mode)) {
 		ret = epping_enable(dev);
 		EXIT();
 		return ret;

+ 0 - 4
core/utils/epping/inc/epping_main.h

@@ -41,10 +41,6 @@
 #include <qdf_lock.h>
 #include <qdf_types.h>
 
-#define WLAN_IS_EPPING_ENABLED(x)       (x == QDF_GLOBAL_EPPING_MODE)
-#define WLAN_IS_EPPING_IRQ(x)           1
-#define WLAN_IS_EPPING_FW_UART(x)       0
-
 /* epping_main signatures */
 int epping_open(void);
 void epping_close(void);

+ 22 - 0
core/utils/epping/src/epping_main.c

@@ -164,6 +164,27 @@ static void epping_target_suspend_acknowledge(void *context)
 	g_epping_ctx->wow_nack = wow_nack;
 }
 
+/**
+ * epping_update_ol_config - API to update ol configuration parameters
+ *
+ * Return: void
+ */
+static void epping_update_ol_config(void)
+{
+	struct ol_config_info cfg;
+	struct ol_context *ol_ctx = cds_get_context(QDF_MODULE_ID_BMI);
+
+	if (!ol_ctx)
+		return;
+
+	cfg.enable_self_recovery = 0;
+	cfg.enable_uart_print = 0;
+	cfg.enable_fw_log = 0;
+	cfg.enable_ramdump_collection = 0;
+	cfg.enable_lpass_support = 0;
+
+	ol_init_ini_config(ol_ctx, &cfg);
+}
 /**
  * epping_enable(): End point ping driver enable Function
  *
@@ -221,6 +242,7 @@ int epping_enable(struct device *parent_dev)
 	pEpping_ctx->target_type = tgt_info->target_type;
 
 	ol_ctx = cds_get_context(QDF_MODULE_ID_BMI);
+	epping_update_ol_config();
 #ifndef FEATURE_BMI_2
 	/* Initialize BMI and Download firmware */
 	if (bmi_download_firmware(ol_ctx)) {