Commit 0026b32d authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by Kalle Valo

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: default avatarAmitkumar Karwar <akarwar@marvell.com>
Fixes: 54f00849 ('mwifiex: Empty Tx queue during suspend')
Tested-by: default avatarWei-Ning Huang <wnhuang@chromium.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 977bc523
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment