summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2016-03-16 07:46:16 -0700
committerKalle Valo <kvalo@codeaurora.org>2016-04-06 21:27:50 +0300
commit0026b32d723e958bac8f335ba3f47825b11b7287 (patch)
treefa61dad5af21a64a826a4185e6f5dca5bfc93476 /drivers
parent977bc523000d51693c4b083463dc93bbb692a662 (diff)
downloadlinux-0026b32d723e958bac8f335ba3f47825b11b7287.tar.bz2
mwifiex: fix Tx timeout issue during suspend test
Call netif_carrier_off/on while stoping/starting netdev queues. This fixes netdev watchdog warning and ->ndo_tx_timeout() invocation during suspend resume stress test. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Fixes: 54f008497b9f09f ('mwifiex: Empty Tx queue during suspend') Tested-by: Wei-Ning Huang <wnhuang@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/cfg80211.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index bb7235e1b9d1..b0663bdea5b5 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -3272,8 +3272,11 @@ static int mwifiex_cfg80211_suspend(struct wiphy *wiphy,
for (i = 0; i < adapter->priv_num; i++) {
priv = adapter->priv[i];
- if (priv && priv->netdev)
+ if (priv && priv->netdev) {
mwifiex_stop_net_dev_queue(priv->netdev, adapter);
+ if (netif_carrier_ok(priv->netdev))
+ netif_carrier_off(priv->netdev);
+ }
}
for (i = 0; i < retry_num; i++) {
@@ -3344,8 +3347,11 @@ static int mwifiex_cfg80211_resume(struct wiphy *wiphy)
for (i = 0; i < adapter->priv_num; i++) {
priv = adapter->priv[i];
- if (priv && priv->netdev)
+ if (priv && priv->netdev) {
+ if (!netif_carrier_ok(priv->netdev))
+ netif_carrier_on(priv->netdev);
mwifiex_wake_up_net_dev_queue(priv->netdev, adapter);
+ }
}
priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA);