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

Commit c34774ea authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by Greg Kroah-Hartman
Browse files

mwifiex: report error to PCIe for suspend failure



commit 5190f2e405919cd30ba2f12c58129fb2d71cd6b6 upstream.

When host_sleep_config command fails, we should return an error to
PCIe, instead of continuing (and possibly panicking, when we try to keep
processing a timed-out ioctl after we return "successfully" from
suspend).

Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Reviewed-by: default avatarBrian Norris <briannorris@chromium.org>
Tested-by: default avatarBrian Norris <briannorris@chromium.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Signed-off-by: default avatarAmit Pundir <amit.pundir@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b4f8e4c8
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -101,7 +101,6 @@ static int mwifiex_pcie_suspend(struct device *dev)
{
	struct mwifiex_adapter *adapter;
	struct pcie_service_card *card;
	int hs_actived;
	struct pci_dev *pdev = to_pci_dev(dev);

	if (pdev) {
@@ -117,7 +116,14 @@ static int mwifiex_pcie_suspend(struct device *dev)

	adapter = card->adapter;

	hs_actived = mwifiex_enable_hs(adapter);
	/* Enable the Host Sleep */
	if (!mwifiex_enable_hs(adapter)) {
		mwifiex_dbg(adapter, ERROR,
			    "cmd: failed to suspend\n");
		adapter->hs_enabling = false;
		return -EFAULT;
	}

	flush_workqueue(adapter->workqueue);

	/* Indicate device suspended */