wlan: disable tx before sending DEL_STA/BSS request to the firmware

When the user tries to disconnect from the AP driver will issue
a DEL BSS request to the firmware. The firmware in turn will
delete all the BSS information. If there is uplink traffic between
DUT and the AP all the frames coming to the firmware after it has
deleted the BSS context will have to be processed by the firmware
as error frames and this processing can hog the firmware cycles
delaying the response to the host resulting in a WDI timemout.

To overcome this scenario, stop the tx queues in HDD so that the
firmware does not get flooded with data when it is processing
DEL BSS request.

Change-Id: Ifdfe1877bdc25e292727cdcada419bd72d59ed1e
CRs-Fixed: 700796
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 36bffd2..81e101d 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -10659,8 +10659,16 @@
 
     INIT_COMPLETION(pAdapter->disconnect_comp_var);
 
-    /*issue disconnect*/
+    /*
+     * stop tx queues before deleting STA/BSS context from the firmware.
+     * tx has to be disabled because the firmware can get busy dropping
+     * the tx frames after BSS/STA has been deleted and will not send
+     * back a response resulting in WDI timeout
+     */
+    netif_tx_disable(pAdapter->dev);
+    netif_carrier_off(pAdapter->dev);
 
+    /*issue disconnect*/
     status = sme_RoamDisconnect( WLAN_HDD_GET_HAL_CTX(pAdapter),
                                  pAdapter->sessionId, reason);
      if(eHAL_STATUS_CMD_NOT_QUEUED == status)
@@ -10696,9 +10704,6 @@
               FL("Set HDD connState to eConnectionState_NotConnected"));
     pHddStaCtx->conn_info.connState = eConnectionState_NotConnected;
 
-    /*stop tx queues*/
-    netif_tx_disable(pAdapter->dev);
-    netif_carrier_off(pAdapter->dev);
     return 0;
 }