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

Commit f53ff104 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cnss2: Add API to check if WLAN PCIe device is down"

parents dffb51fe ee4241b7
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -236,6 +236,27 @@ static int cnss_set_pci_link(struct cnss_pci_data *pci_priv, bool link_up)
}
#endif /* CONFIG_PCI_MSM */

int cnss_pci_is_device_down(struct device *dev)
{
	struct cnss_plat_data *plat_priv = cnss_bus_dev_to_plat_priv(dev);
	struct cnss_pci_data *pci_priv;

	if (!plat_priv) {
		cnss_pr_err("plat_priv is NULL\n");
		return -ENODEV;
	}

	pci_priv = plat_priv->bus_priv;
	if (!pci_priv) {
		cnss_pr_err("pci_priv is NULL\n");
		return -ENODEV;
	}

	return test_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state) |
		pci_priv->pci_link_down_ind;
}
EXPORT_SYMBOL(cnss_pci_is_device_down);

int cnss_pci_recovery_update_status(struct cnss_pci_data *pci_priv)
{
	struct cnss_plat_data *plat_priv;
+1 −0
Original line number Diff line number Diff line
@@ -167,6 +167,7 @@ static inline int cnss_wlan_pm_control(struct device *dev, bool vote)
	return 0;
}
#endif /* CONFIG_PCI_MSM */
extern int cnss_pci_is_device_down(struct device *dev);
extern void cnss_schedule_recovery(struct device *dev,
				   enum cnss_recovery_reason reason);
extern int cnss_self_recovery(struct device *dev,