diff options
| author | Kai Liu <kaliu@codeaurora.org> | 2018-07-25 11:26:43 +0800 |
|---|---|---|
| committer | Kai Liu <kaliu@codeaurora.org> | 2018-07-25 11:59:08 +0800 |
| commit | 03dc844d919bc30cf2a3d05fbeef3b8d57172e29 (patch) | |
| tree | 7f6bf9bf14d946d9d0b93eb833fd31fbc58d1e3f /drivers/net | |
| parent | a71e8433d742f9665039a19993f321ff0c57fce6 (diff) | |
cnss2: Skip PCIe link suspend if link has already been suspended
If wlan is loaded but without any activity for a period, wlan will
enter into shutdown status, which will suspend PCIe link.
Then if wlan unloading is issued, unloading process should skip
link suspend.
Change-Id: Id366401c656102cac5c5432a5b9a9a77e429cbbc
Signed-off-by: Kai Liu <kaliu@codeaurora.org>
Diffstat (limited to 'drivers/net')
| -rw-r--r-- | drivers/net/wireless/cnss2/pci.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/cnss2/pci.c b/drivers/net/wireless/cnss2/pci.c index ff053b098c22..00663d97ea3e 100644 --- a/drivers/net/wireless/cnss2/pci.c +++ b/drivers/net/wireless/cnss2/pci.c @@ -131,6 +131,7 @@ int cnss_suspend_pci_link(struct cnss_pci_data *pci_priv) cnss_pr_dbg("Suspending PCI link\n"); if (!pci_priv->pci_link_state) { cnss_pr_info("PCI link is already suspended!\n"); + ret = -EINVAL; goto out; } @@ -393,8 +394,10 @@ static int cnss_qca6174_shutdown(struct cnss_pci_data *pci_priv) cnss_pci_set_auto_suspended(pci_priv, 0); ret = cnss_suspend_pci_link(pci_priv); - if (ret) + if (ret) { cnss_pr_err("Failed to suspend PCI link, err = %d\n", ret); + return -EINVAL; + } cnss_power_off_device(plat_priv); |
