wlan: Abort existing scan before starting DHCP phase.

In case of BT coex, WLAN connection taking longer time, because of
ongoing scan happening during DHCP phase.
Aborting ongoing scan before sending DHCP START event to firmware.

Change-Id: I02b163d937ac52984bde571787c079778103160f
CRs-Fixed: 720672
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 2c2ba94..28e009a 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -3672,6 +3672,8 @@
        else if (strncmp(command, "BTCOEXMODE", 10) == 0 )
        {
            char *dhcpPhase;
+           int ret;
+
            dhcpPhase = command + 11;
            if ('1' == *dhcpPhase)
            {
@@ -3680,6 +3682,13 @@
 
                pHddCtx->btCoexModeSet = TRUE;
 
+               ret = wlan_hdd_scan_abort(pAdapter);
+               if (ret < 0)
+               {
+                   VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+                      FL("failed to abort existing scan %d"), ret);
+               }
+
                sme_DHCPStartInd(pHddCtx->hHal, pAdapter->device_mode,
                                 pAdapter->sessionId);
            }