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

Commit e70b2055 authored by Yue Ma's avatar Yue Ma Committed by Gerrit - the friendly Code Review server
Browse files

cnss2: Check link status before setting wlaon_pwr_ctrl registers



If PCIe link is down, skip setting wlaon_pwr_ctrl registers to avoid
unclocked access.

Change-Id: I156f936ad87089754d6644d2eb3199105065ee32
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent 6a4a4954
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1534,6 +1534,10 @@ static void cnss_pci_set_wlaon_pwr_ctrl(struct cnss_pci_data *pci_priv,
	if (!plat_priv->set_wlaon_pwr_ctrl)
		return;

	if (pci_priv->pci_link_state == PCI_LINK_DOWN ||
	    pci_priv->pci_link_down_ind)
		return;

	if (do_force_wake)
		if (cnss_pci_force_wake_get(pci_priv))
			return;