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

Commit 3c545a25 authored by Rakesh Pillai's avatar Rakesh Pillai Committed by Kalle Valo
Browse files

ath10k: enable Factory Test Mode for WCN3990



The support to put WCN3990 firmware into Factory
test mode is not present currently. The WCN3990
firmware can operate in Factory test mode based
on the mode it receives in the wlan enable message
from the host driver.

When the host driver is started in testmode send
the operating mode as UTF mode, to the WCN3990
firmware, in the wlan enable message to start the
firmware in Factory test mode.

Tested on: WCN3990
Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1.

Signed-off-by: default avatarRakesh Pillai <pillair@codeaurora.org>
Reviewed-by: default avatarBrian Norris <briannorris@chromium.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 25733c4e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -661,7 +661,8 @@ static void ath10k_ahb_hif_stop(struct ath10k *ar)
	ath10k_pci_flush(ar);
}

static int ath10k_ahb_hif_power_up(struct ath10k *ar)
static int ath10k_ahb_hif_power_up(struct ath10k *ar,
				   enum ath10k_firmware_mode fw_mode)
{
	int ret;

+1 −1
Original line number Diff line number Diff line
@@ -2780,7 +2780,7 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
	struct bmi_target_info target_info;
	int ret = 0;

	ret = ath10k_hif_power_up(ar);
	ret = ath10k_hif_power_up(ar, ATH10K_FIRMWARE_MODE_NORMAL);
	if (ret) {
		ath10k_err(ar, "could not power on hif bus (%d)\n", ret);
		return ret;
+4 −3
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ struct ath10k_hif_ops {
	void (*write32)(struct ath10k *ar, u32 address, u32 value);

	/* Power up the device and enter BMI transfer mode for FW download */
	int (*power_up)(struct ath10k *ar);
	int (*power_up)(struct ath10k *ar, enum ath10k_firmware_mode fw_mode);

	/* Power down the device and free up resources. stop() must be called
	 * before this if start() was called earlier
@@ -174,9 +174,10 @@ static inline u16 ath10k_hif_get_free_queue_number(struct ath10k *ar,
	return ar->hif.ops->get_free_queue_number(ar, pipe_id);
}

static inline int ath10k_hif_power_up(struct ath10k *ar)
static inline int ath10k_hif_power_up(struct ath10k *ar,
				      enum ath10k_firmware_mode fw_mode)
{
	return ar->hif.ops->power_up(ar);
	return ar->hif.ops->power_up(ar, fw_mode);
}

static inline void ath10k_hif_power_down(struct ath10k *ar)
+1 −1
Original line number Diff line number Diff line
@@ -4705,7 +4705,7 @@ static int ath10k_start(struct ieee80211_hw *hw)
		goto err;
	}

	ret = ath10k_hif_power_up(ar);
	ret = ath10k_hif_power_up(ar, ATH10K_FIRMWARE_MODE_NORMAL);
	if (ret) {
		ath10k_err(ar, "Could not init hif: %d\n", ret);
		goto err_off;
+2 −1
Original line number Diff line number Diff line
@@ -2794,7 +2794,8 @@ static int ath10k_pci_chip_reset(struct ath10k *ar)
	return ar_pci->pci_hard_reset(ar);
}

static int ath10k_pci_hif_power_up(struct ath10k *ar)
static int ath10k_pci_hif_power_up(struct ath10k *ar,
				   enum ath10k_firmware_mode fw_mode)
{
	struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
	int ret;
Loading