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

Commit 081d3dfb authored by Yue Ma's avatar Yue Ma
Browse files

cnss2: Add a debug option to skip any kind of recovery



After firmware crashes, driver will try to recover the device by
resetting hardware and reloading firmware. Add a debug quirk option
to skip the recovery so that WLAN device can still remain the status
after crash for live debugging.

Change-Id: Ifff26df9ae5ab4c25573ca84e29eed73a79c6525
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent fca788d0
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ enum cnss_debug_quirks {
	LINK_DOWN_SELF_RECOVERY,
	SKIP_DEVICE_BOOT,
	USE_CORE_ONLY_FW,
	SKIP_RECOVERY,
};

unsigned long quirks;
@@ -1454,6 +1455,11 @@ static int cnss_do_recovery(struct cnss_plat_data *plat_priv,
		plat_priv->driver_ops->update_status(pci_priv->pci_dev,
						     CNSS_RECOVERY);

	if (test_bit(SKIP_RECOVERY, &quirks)) {
		cnss_pr_dbg("Skip device recovery\n");
		return 0;
	}

	switch (reason) {
	case CNSS_REASON_LINK_DOWN:
		if (test_bit(LINK_DOWN_SELF_RECOVERY, &quirks))