Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e7365ef authored by Dedy Lansky's avatar Dedy Lansky Committed by Maya Erez
Browse files

wil6210: support new WMI-only FW capability



WMI_ONLY FW is used for testing in production. It cannot be used for
scan/connect, etc.
In case FW reports this capability, driver will not allow interface up.

Change-Id: Ifad411ba3fff136107ee73691008de3d013853b5
Signed-off-by: default avatarDedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: default avatarMaya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 0d2370e939acca97b5e1abc1aedd47c5c9a5f500
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git


Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
parent d03a26f9
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -29,8 +29,9 @@ static int wil_open(struct net_device *ndev)


	wil_dbg_misc(wil, "open\n");
	wil_dbg_misc(wil, "open\n");


	if (debug_fw) {
	if (debug_fw ||
		wil_err(wil, "while in debug_fw mode\n");
	    test_bit(WMI_FW_CAPABILITY_WMI_ONLY, wil->fw_capabilities)) {
		wil_err(wil, "while in debug_fw or wmi_only mode\n");
		return -EINVAL;
		return -EINVAL;
	}
	}


+7 −3
Original line number Original line Diff line number Diff line
@@ -99,8 +99,10 @@ static int wil_if_pcie_enable(struct wil6210_priv *wil)
	 */
	 */
	int msi_only = pdev->msi_enabled;
	int msi_only = pdev->msi_enabled;
	bool _use_msi = use_msi;
	bool _use_msi = use_msi;
	bool wmi_only = test_bit(WMI_FW_CAPABILITY_WMI_ONLY,
				 wil->fw_capabilities);


	wil_dbg_misc(wil, "if_pcie_enable\n");
	wil_dbg_misc(wil, "if_pcie_enable, wmi_only %d\n", wmi_only);


	pdev->msi_enabled = 0;
	pdev->msi_enabled = 0;


@@ -123,9 +125,11 @@ static int wil_if_pcie_enable(struct wil6210_priv *wil)
	if (rc)
	if (rc)
		goto stop_master;
		goto stop_master;


	/* need reset here to obtain MAC */
	/* need reset here to obtain MAC or in case of WMI-only FW, full reset
	 * and fw loading takes place
	 */
	mutex_lock(&wil->mutex);
	mutex_lock(&wil->mutex);
	rc = wil_reset(wil, false);
	rc = wil_reset(wil, wmi_only);
	mutex_unlock(&wil->mutex);
	mutex_unlock(&wil->mutex);
	if (rc)
	if (rc)
		goto release_irq;
		goto release_irq;
+1 −0
Original line number Original line Diff line number Diff line
@@ -57,6 +57,7 @@ enum wmi_fw_capability {
	WMI_FW_CAPABILITY_RF_SECTORS		= 2,
	WMI_FW_CAPABILITY_RF_SECTORS		= 2,
	WMI_FW_CAPABILITY_MGMT_RETRY_LIMIT	= 3,
	WMI_FW_CAPABILITY_MGMT_RETRY_LIMIT	= 3,
	WMI_FW_CAPABILITY_DISABLE_AP_SME	= 4,
	WMI_FW_CAPABILITY_DISABLE_AP_SME	= 4,
	WMI_FW_CAPABILITY_WMI_ONLY		= 5,
	WMI_FW_CAPABILITY_MAX,
	WMI_FW_CAPABILITY_MAX,
};
};