mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
cnss2: Check device power state for Suspend / Resume operations
If WLAN driver probe fails, its intenal state may not be proper. Thus check for device powered on state before calling WLAN driver operations for suspend / resume. Change-Id: I81da8969e9b0e0525256db8da2c0db25a996b241 Signed-off-by: Manikandan Mohan <manikand@codeaurora.org>
This commit is contained in:
parent
0e2097ce85
commit
85799b3a85
1 changed files with 6 additions and 0 deletions
|
|
@ -2659,6 +2659,9 @@ static int cnss_pci_suspend_noirq(struct device *dev)
|
|||
if (!pci_priv)
|
||||
goto out;
|
||||
|
||||
if (!cnss_is_device_powered_on(pci_priv->plat_priv))
|
||||
goto out;
|
||||
|
||||
driver_ops = pci_priv->driver_ops;
|
||||
if (driver_ops && driver_ops->suspend_noirq)
|
||||
ret = driver_ops->suspend_noirq(pci_dev);
|
||||
|
|
@ -2677,6 +2680,9 @@ static int cnss_pci_resume_noirq(struct device *dev)
|
|||
if (!pci_priv)
|
||||
goto out;
|
||||
|
||||
if (!cnss_is_device_powered_on(pci_priv->plat_priv))
|
||||
goto out;
|
||||
|
||||
driver_ops = pci_priv->driver_ops;
|
||||
if (driver_ops && driver_ops->resume_noirq &&
|
||||
!pci_priv->pci_link_down_ind)
|
||||
|
|
|
|||
Loading…
Reference in a new issue