Prechádzať zdrojové kódy

Icnss2: Remove deprecated ICNSS_BDF_DUMMY type

ICNSS_BDF_DUMMY type board data file is no longer used. Hence remove
it. A BDF file with regular name and dummy content should be sent as
dummy BDF instead of just sending a dummy string.

Change-Id: I9bbdf8a59bb178afe8c27e709b3a360c5de4fa68
Naman Padhiar 3 rokov pred
rodič
commit
04d2478bcc
2 zmenil súbory, kde vykonal 4 pridanie a 21 odobranie
  1. 0 1
      icnss2/main.h
  2. 4 20
      icnss2/qmi.c

+ 0 - 1
icnss2/main.h

@@ -33,7 +33,6 @@ enum icnss_bdf_type {
 	ICNSS_BDF_BIN,
 	ICNSS_BDF_ELF,
 	ICNSS_BDF_REGDB = 4,
-	ICNSS_BDF_DUMMY = 255,
 };
 
 struct icnss_control_params {

+ 4 - 20
icnss2/qmi.c

@@ -43,7 +43,6 @@
 #define BIN_BDF_FILE_NAME		"bdwlan.bin"
 #define BIN_BDF_FILE_NAME_PREFIX	"bdwlan."
 #define REGDB_FILE_NAME			"regdb.bin"
-#define DUMMY_BDF_FILE_NAME		"bdwlan.dmy"
 
 #define QDSS_TRACE_CONFIG_FILE "qdss_trace_config.cfg"
 
@@ -1049,11 +1048,6 @@ static int icnss_get_bdf_file_name(struct icnss_priv *priv,
 	case ICNSS_BDF_REGDB:
 		snprintf(filename_tmp, filename_len, REGDB_FILE_NAME);
 		break;
-	case ICNSS_BDF_DUMMY:
-		icnss_pr_dbg("CNSS_BDF_DUMMY is set, sending dummy BDF\n");
-		snprintf(filename_tmp, filename_len, DUMMY_BDF_FILE_NAME);
-		ret = ICNSS_MAX_FILE_NAME;
-		break;
 	default:
 		icnss_pr_err("Invalid BDF type: %d\n",
 			     priv->ctrl_params.bdf_type);
@@ -1061,7 +1055,7 @@ static int icnss_get_bdf_file_name(struct icnss_priv *priv,
 		break;
 	}
 
-	if (ret >= 0)
+	if (!ret)
 		icnss_add_fw_prefix_name(priv, filename, filename_tmp);
 
 	return ret;
@@ -1076,8 +1070,6 @@ static char *icnss_bdf_type_to_str(enum icnss_bdf_type bdf_type)
 		return "BDF";
 	case ICNSS_BDF_REGDB:
 		return "REGDB";
-	case ICNSS_BDF_DUMMY:
-		return "BDF";
 	default:
 		return "UNKNOWN";
 	}
@@ -1109,13 +1101,8 @@ int icnss_wlfw_bdf_dnld_send_sync(struct icnss_priv *priv, u32 bdf_type)
 
 	ret = icnss_get_bdf_file_name(priv, bdf_type,
 				      filename, sizeof(filename));
-	if (ret > 0) {
-		temp = DUMMY_BDF_FILE_NAME;
-		remaining = ICNSS_MAX_FILE_NAME;
-		goto bypass_bdf;
-	} else if (ret < 0) {
+	if (ret)
 		goto err_req_fw;
-	}
 
 	ret = request_firmware(&fw_entry, filename, &priv->pdev->dev);
 	if (ret) {
@@ -1127,7 +1114,6 @@ int icnss_wlfw_bdf_dnld_send_sync(struct icnss_priv *priv, u32 bdf_type)
 	temp = fw_entry->data;
 	remaining = fw_entry->size;
 
-bypass_bdf:
 	icnss_pr_dbg("Downloading %s: %s, size: %u\n",
 		     icnss_bdf_type_to_str(bdf_type), filename, remaining);
 
@@ -1192,16 +1178,14 @@ bypass_bdf:
 		req->seg_id++;
 	}
 
-	if (bdf_type != ICNSS_BDF_DUMMY)
-		release_firmware(fw_entry);
+	release_firmware(fw_entry);
 
 	kfree(req);
 	kfree(resp);
 	return 0;
 
 err_send:
-	if (bdf_type != ICNSS_BDF_DUMMY)
-		release_firmware(fw_entry);
+	release_firmware(fw_entry);
 err_req_fw:
 	if (bdf_type != ICNSS_BDF_REGDB)
 		ICNSS_QMI_ASSERT();