]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
UBUNTU: SAUCE: Redpine: resolve race while resuming from S4
authorPrameela Rani Garnepudi <prameela.garnepudi@redpinesignals.com>
Mon, 5 Mar 2018 12:40:00 +0000 (13:40 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 13 Mar 2018 10:48:04 +0000 (11:48 +0100)
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1753438
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1753439
At SDIO restore ieee80211_restart_hw() is getting called to
restart all MAC operations. This step is not required.
eturning 1 from mac80211_resume() will serve this purpose.
Above method adding up some races in calling functions because
of timing issues.

Signed-off-by: Prameela Rani Garnepudi <prameela.garnepudi@redpinesignals.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Shrirang Bagul <shrirang.bagul@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
ubuntu/rsi/rsi_91x_mac80211.c
ubuntu/rsi/rsi_91x_sdio.c

index 2b1825929b9e39e726e6625f173fee967f0a6594..2983c733ea2f09392cff3b952f0a23df6998e86c 100644 (file)
@@ -2463,7 +2463,10 @@ static int rsi_mac80211_resume(struct ieee80211_hw *hw)
        if (common->hibernate_resume) {
                if (common->reinit_hw)
                        wait_for_completion(&common->wlan_init_completion);
-               return 0;
+               /* Device need a complete restart of all MAC operations.
+                * returning 1 will serve this purpose.
+                */
+               return 1;
        }
 
 #ifdef CONFIG_VEN_RSI_WOW
index a2e25d0f6de4b3f5cb3886b8b34879ae7569b7ca..49d46af48ff2b03c880882c0234f86cbe59bdb96 100644 (file)
@@ -1506,10 +1506,8 @@ int rsi_restore(struct device *dev)
        adapter->priv->iface_down = true;
 
        adapter->sc_nvifs = 0;
-       rsi_mac80211_hw_scan_cancel(adapter->hw, adapter->priv->scan_vif);
        flush_workqueue(adapter->priv->scan_workqueue);
        ieee80211_stop_queues(adapter->hw);
-       ieee80211_restart_hw(adapter->hw);
 
        /* Initialize device again */
        adapter->priv->reinit_hw = true;