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

Commit 7de72839 authored by Yue Ma's avatar Yue Ma
Browse files

cnss2: Move updating WLAN host driver status to one place



There will be multiple places that platform driver notifies host
driver firmare in bad state. Since it will eventually do recovery
in all cases, move updating WLAN driver status to the same place
where to schedule recovery.

Change-Id: I889b01b2f8e824390e6194232c1c25e75c5df71d
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent 09636b44
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -994,6 +994,8 @@ void cnss_schedule_recovery(struct device *dev,
	struct cnss_recovery_data *data;
	int gfp = GFP_KERNEL;

	cnss_bus_update_status(plat_priv, CNSS_FW_DOWN);

	if (in_interrupt() || irqs_disabled())
		gfp = GFP_ATOMIC;

+0 −4
Original line number Diff line number Diff line
@@ -223,7 +223,6 @@ int cnss_pci_link_down(struct device *dev)

	cnss_pr_err("PCI link down is detected by host driver, schedule recovery!\n");

	cnss_pci_update_status(pci_priv, CNSS_FW_DOWN);
	cnss_schedule_recovery(dev, CNSS_REASON_LINK_DOWN);

	return 0;
@@ -910,8 +909,6 @@ static void cnss_pci_event_cb(struct msm_pcie_notify *notify)
		cnss_pr_err("PCI link down, schedule recovery!\n");
		if (pci_dev->device == QCA6174_DEVICE_ID)
			disable_irq(pci_dev->irq);

		cnss_pci_update_status(pci_priv, CNSS_FW_DOWN);
		cnss_schedule_recovery(&pci_dev->dev, CNSS_REASON_LINK_DOWN);
		break;
	case MSM_PCIE_EVENT_WAKEUP:
@@ -2049,7 +2046,6 @@ static void cnss_mhi_notify_status(struct mhi_controller *mhi_ctrl, void *priv,
	set_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state);
	del_timer(&plat_priv->fw_boot_timer);

	cnss_pci_update_status(pci_priv, CNSS_FW_DOWN);
	cnss_schedule_recovery(&pci_priv->pci_dev->dev, cnss_reason);
}