Explorar o código

cnss2: Remove wlan-connection-roaming INI download

Remove QMI message to download wlan-connection-roaming.ini
file to FW. This way, for all the OEMs, we would not download
any of this file. Separate change will be raised to download this
files with invalid character check in CNSS2 platform driver and
maintained as hot fix.

Change-Id: Id9f990751d30f28d2d1aac180c24cb6d673e1205
CRs-Fixed: 3640676
Naman Padhiar hai 1 ano
pai
achega
d897e63881
Modificáronse 3 ficheiros con 0 adicións e 156 borrados
  1. 0 2
      cnss2/main.c
  2. 0 146
      cnss2/qmi.c
  3. 0 8
      cnss2/qmi.h

+ 0 - 2
cnss2/main.c

@@ -903,8 +903,6 @@ static int cnss_fw_mem_ready_hdlr(struct cnss_plat_data *plat_priv)
 	if (plat_priv->device_id == QCN7605_DEVICE_ID)
 		plat_priv->ctrl_params.bdf_type = CNSS_BDF_BIN;
 
-	cnss_wlfw_ini_file_send_sync(plat_priv, WLFW_CONN_ROAM_INI_V01);
-
 	ret = cnss_wlfw_bdf_dnld_send_sync(plat_priv,
 					   plat_priv->ctrl_params.bdf_type);
 	if (ret)

+ 0 - 146
cnss2/qmi.c

@@ -28,10 +28,6 @@
 #define HDS_FILE_NAME			"hds.bin"
 #define CHIP_ID_GF_MASK			0x10
 
-#define CONN_ROAM_FILE_NAME		"wlan-connection-roaming"
-#define INI_EXT			".ini"
-#define INI_FILE_NAME_LEN		100
-
 #define QDSS_TRACE_CONFIG_FILE		"qdss_trace_config"
 /*
  * Download QDSS config file based on build type. Add build type string to
@@ -765,148 +761,6 @@ static int cnss_get_bdf_file_name(struct cnss_plat_data *plat_priv,
 	return ret;
 }
 
-int cnss_wlfw_ini_file_send_sync(struct cnss_plat_data *plat_priv,
-				 enum wlfw_ini_file_type_v01 file_type)
-{
-	struct wlfw_ini_file_download_req_msg_v01 *req;
-	struct wlfw_ini_file_download_resp_msg_v01 *resp;
-	struct qmi_txn txn;
-	int ret = 0;
-	const struct firmware *fw;
-	char filename[INI_FILE_NAME_LEN] = {0};
-	char tmp_filename[INI_FILE_NAME_LEN] = {0};
-	const u8 *temp;
-	unsigned int remaining;
-	bool backup_supported = false;
-
-	cnss_pr_dbg("Sending QMI_WLFW_INI_FILE_DOWNLOAD_REQ_V01 message for ini_type: %d, state: 0x%lx\n",
-		    file_type, plat_priv->driver_state);
-
-	req = kzalloc(sizeof(*req), GFP_KERNEL);
-	if (!req)
-		return -ENOMEM;
-
-	resp = kzalloc(sizeof(*resp), GFP_KERNEL);
-	if (!resp) {
-		kfree(req);
-		return -ENOMEM;
-	}
-
-	switch (file_type) {
-	case WLFW_CONN_ROAM_INI_V01:
-		snprintf(tmp_filename, sizeof(tmp_filename),
-			 CONN_ROAM_FILE_NAME);
-		backup_supported = true;
-		break;
-	default:
-		cnss_pr_err("Invalid file type: %u\n", file_type);
-		ret = -EINVAL;
-		goto err_req_fw;
-	}
-
-	snprintf(filename, sizeof(filename), "%s%s", tmp_filename, INI_EXT);
-
-	cnss_pr_dbg("Invoke firmware_request_nowarn for %s\n", filename);
-	/* Fetch the file */
-	ret = firmware_request_nowarn(&fw, filename, &plat_priv->plat_dev->dev);
-	if (ret) {
-		cnss_pr_dbg("Failed to read %s, ret: %d\n", filename, ret);
-		if (!backup_supported)
-			goto err_req_fw;
-
-		snprintf(filename, sizeof(filename),
-			 "%s-%s%s", tmp_filename, "backup", INI_EXT);
-
-		cnss_pr_dbg("Invoke firmware_request_nowarn for %s\n",
-			    filename);
-		ret = firmware_request_nowarn(&fw, filename,
-					      &plat_priv->plat_dev->dev);
-		if (ret) {
-			cnss_pr_dbg("Failed to read %s, ret: %d\n", filename,
-				    ret);
-			goto err_req_fw;
-		}
-	}
-
-	temp = fw->data;
-	remaining = fw->size;
-
-	cnss_pr_dbg("Downloading INI file: %s, size: %u\n", filename,
-		    remaining);
-
-	while (remaining) {
-		req->file_type_valid = 1;
-		req->file_type = file_type;
-		req->total_size_valid = 1;
-		req->total_size = remaining;
-		req->seg_id_valid = 1;
-		req->data_valid = 1;
-		req->end_valid = 1;
-
-		if (remaining > QMI_WLFW_MAX_DATA_SIZE_V01) {
-			req->data_len = QMI_WLFW_MAX_DATA_SIZE_V01;
-		} else {
-			req->data_len = remaining;
-			req->end = 1;
-		}
-
-		memcpy(req->data, temp, req->data_len);
-
-		ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn,
-				   wlfw_ini_file_download_resp_msg_v01_ei,
-				   resp);
-		if (ret < 0) {
-			cnss_pr_err("Failed to initialize txn for INI file download request, err: %d\n",
-				    ret);
-			goto err;
-		}
-
-		ret = qmi_send_request
-			(&plat_priv->qmi_wlfw, NULL, &txn,
-			 QMI_WLFW_INI_FILE_DOWNLOAD_REQ_V01,
-			 WLFW_INI_FILE_DOWNLOAD_REQ_MSG_V01_MAX_MSG_LEN,
-			 wlfw_ini_file_download_req_msg_v01_ei, req);
-		if (ret < 0) {
-			qmi_txn_cancel(&txn);
-			cnss_pr_err("Failed to send INI File download request, err: %d\n",
-				    ret);
-			goto err;
-		}
-
-		ret = qmi_txn_wait(&txn, QMI_WLFW_TIMEOUT_JF);
-		if (ret < 0) {
-			cnss_pr_err("Failed to wait for response of INI File download request, err: %d\n",
-				    ret);
-			goto err;
-		}
-
-		if (resp->resp.result != QMI_RESULT_SUCCESS_V01) {
-			cnss_pr_err("INI file download request failed, result: %d, err: %d\n",
-				    resp->resp.result, resp->resp.error);
-			ret = -resp->resp.result;
-			goto err;
-		}
-
-		remaining -= req->data_len;
-		temp += req->data_len;
-		req->seg_id++;
-	}
-
-	release_firmware(fw);
-
-	kfree(req);
-	kfree(resp);
-	return 0;
-
-err:
-	release_firmware(fw);
-err_req_fw:
-	kfree(req);
-	kfree(resp);
-
-	return ret;
-}
-
 int cnss_wlfw_bdf_dnld_send_sync(struct cnss_plat_data *plat_priv,
 				 u32 bdf_type)
 {

+ 0 - 8
cnss2/qmi.h

@@ -92,8 +92,6 @@ int wlfw_qdss_trace_stop(struct cnss_plat_data *plat_priv, unsigned long long op
 int cnss_wlfw_cal_report_req_send_sync(struct cnss_plat_data *plat_priv,
 				       u32 cal_file_download_size);
 int cnss_send_subsys_restart_level_msg(struct cnss_plat_data *plat_priv);
-int cnss_wlfw_ini_file_send_sync(struct cnss_plat_data *plat_priv,
-				 enum wlfw_ini_file_type_v01 file_type);
 int cnss_wlfw_send_host_wfc_call_status(struct cnss_plat_data *plat_priv,
 					struct cnss_wfc_cfg cfg);
 void cnss_cancel_dms_work(void);
@@ -324,12 +322,6 @@ int cnss_send_subsys_restart_level_msg(struct cnss_plat_data *plat_priv)
 	return 0;
 }
 
-int cnss_wlfw_ini_file_send_sync(struct cnss_plat_data *plat_priv,
-				 enum wlfw_ini_file_type_v01 file_type)
-{
-	return 0;
-}
-
 static void cnss_cancel_dms_work(void)
 {
 }