]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mwifiex: cancel pending scan during disconnect
authorXinming Hu <huxm@marvell.com>
Thu, 16 Jun 2016 13:22:23 +0000 (18:52 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 29 Jun 2016 15:54:00 +0000 (18:54 +0300)
It is obeserved that sometimes scan operation will block the disconnect
during system suspend. It's ok to cancel ongoing scan in this case. It
reduces unnecessary system suspend delay.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/cfg80211.c

index ff948a9222225dee00b4b46ee0dec095e71726c0..a05ae009784340aecf63ce2034f66f2844171592 100644 (file)
@@ -1672,6 +1672,9 @@ static int mwifiex_cfg80211_change_beacon(struct wiphy *wiphy,
                                          struct cfg80211_beacon_data *data)
 {
        struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
+       struct mwifiex_adapter *adapter = priv->adapter;
+
+       mwifiex_cancel_scan(adapter);
 
        if (GET_BSS_ROLE(priv) != MWIFIEX_BSS_ROLE_UAP) {
                mwifiex_dbg(priv->adapter, ERROR,