ソースを参照

Merge "icnss2: Enable wpss loading for adrastea targets using rproc" into wlan-platform.lnx.1.0

CNSS_WLAN Service 2 年 前
コミット
0cba3b1723
2 ファイル変更10 行追加2 行削除
  1. 9 2
      icnss2/main.c
  2. 1 0
      icnss2/main.h

+ 9 - 2
icnss2/main.c

@@ -3631,7 +3631,7 @@ static ssize_t wpss_boot_store(struct device *dev,
 	struct icnss_priv *priv = dev_get_drvdata(dev);
 	struct icnss_priv *priv = dev_get_drvdata(dev);
 	int wpss_rproc = 0;
 	int wpss_rproc = 0;
 
 
-	if (priv->device_id != WCN6750_DEVICE_ID)
+	if (!priv->wpss_supported)
 		return count;
 		return count;
 
 
 	if (sscanf(buf, "%du", &wpss_rproc) != 1) {
 	if (sscanf(buf, "%du", &wpss_rproc) != 1) {
@@ -4081,6 +4081,11 @@ static void icnss_init_control_params(struct icnss_priv *priv)
 	priv->ctrl_params.quirks = ICNSS_QUIRKS_DEFAULT;
 	priv->ctrl_params.quirks = ICNSS_QUIRKS_DEFAULT;
 	priv->ctrl_params.bdf_type = ICNSS_BDF_TYPE_DEFAULT;
 	priv->ctrl_params.bdf_type = ICNSS_BDF_TYPE_DEFAULT;
 
 
+	if (priv->device_id == WCN6750_DEVICE_ID ||
+	    of_property_read_bool(priv->pdev->dev.of_node,
+				  "wpss-support-enable"))
+		priv->wpss_supported = true;
+
 	if (of_property_read_bool(priv->pdev->dev.of_node,
 	if (of_property_read_bool(priv->pdev->dev.of_node,
 				  "bdf-download-support"))
 				  "bdf-download-support"))
 		priv->bdf_download_support = true;
 		priv->bdf_download_support = true;
@@ -4258,10 +4263,12 @@ static int icnss_probe(struct platform_device *pdev)
 		priv->use_nv_mac = icnss_use_nv_mac(priv);
 		priv->use_nv_mac = icnss_use_nv_mac(priv);
 		icnss_pr_dbg("NV MAC feature is %s\n",
 		icnss_pr_dbg("NV MAC feature is %s\n",
 			     priv->use_nv_mac ? "Mandatory":"Not Mandatory");
 			     priv->use_nv_mac ? "Mandatory":"Not Mandatory");
-		INIT_WORK(&wpss_loader, icnss_wpss_load);
 		register_trace_android_vh_rproc_recovery_set(rproc_restart_level_notifier, NULL);
 		register_trace_android_vh_rproc_recovery_set(rproc_restart_level_notifier, NULL);
 	}
 	}
 
 
+	if (priv->wpss_supported)
+		INIT_WORK(&wpss_loader, icnss_wpss_load);
+
 	INIT_LIST_HEAD(&priv->icnss_tcdev_list);
 	INIT_LIST_HEAD(&priv->icnss_tcdev_list);
 
 
 	icnss_pr_info("Platform driver probed successfully\n");
 	icnss_pr_info("Platform driver probed successfully\n");

+ 1 - 0
icnss2/main.h

@@ -473,6 +473,7 @@ struct icnss_priv {
 	char foundry_name;
 	char foundry_name;
 	bool bdf_download_support;
 	bool bdf_download_support;
 	unsigned long device_config;
 	unsigned long device_config;
+	bool wpss_supported;
 };
 };
 
 
 struct icnss_reg_info {
 struct icnss_reg_info {