qcacld-3.0: Do netif_tx_stop_all_queues() instead of netif_tx_disable()
Race condition is happening when tx traffic is running and simulataneously
suspend is going on. hdd_hard_start_xmit() is called under txq->__xmit_lock
and in case of low descriptor scenario, it goes to pause the netif queues
and trying to take adapter->pause_map_lock for doing so which is already
acquired by another thread. In another thread, suspend indication is being
preocessed and as a result is trying to pause netif queues with
netif_action WLAN_NETIF_TX_DISABLE which takes adapter->pause_map_lock and
then calls netif_tx_disable() which is trying to take txq->__xmit_lock
already taken by the thread executing hdd_hard_start_xmit(). This leads to
a deadlock situation.
Replace netif_tx_disable() with netif_tx_stop_all_queues() as
netif_tx_stop_all_queues() is doing the same thing as netif_tx_disable()
only without taking the txq->__xmit_lock which prevents this deadlock.
Change-Id: I5afafe6435707bd8f0e87972a740f908d06ce847
CRs-Fixed: 2030933
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index ed4776b..034338f 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -14274,7 +14274,7 @@
/* stop tx queues */
hdd_debug("Disabling queues");
wlan_hdd_netif_queue_control(pAdapter,
- WLAN_NETIF_TX_DISABLE_N_CARRIER, WLAN_CONTROL_PATH);
+ WLAN_STOP_ALL_NETIF_QUEUE_N_CARRIER, WLAN_CONTROL_PATH);
hdd_debug("Set HDD connState to eConnectionState_Disconnecting");
pHddStaCtx->conn_info.connState = eConnectionState_Disconnecting;
INIT_COMPLETION(pAdapter->disconnect_comp_var);