wlan: Update TL with spoof MAC address during connect

After scan complete HDD requests for new spoof address. Currently
spoof address is updated to TL from HDD only at scan request from
supplicant. In corner case scenerio when connect is called it may
internally initiate scan for ssid and in this case TL is not updated
with the new spoof mac address. As a result for probe request we end
up using spoof MAC address as self MAC address.

As part of this fix, update TL with spoof MAC address during connect.

Change-Id: I297f940247b3028bb8f0a433350fc5c8833397b9
CRs-Fixed: 967185
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 4ca767e..48223a1 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -14520,6 +14520,21 @@
                 __func__);
         return status;
     }
+
+    if (pHddCtx->spoofMacAddr.isEnabled)
+    {
+        hddLog(VOS_TRACE_LEVEL_INFO,
+                        "%s: MAC Spoofing enabled ", __func__);
+        /* Updating SelfSta Mac Addr in TL which will be used to get staidx
+         * to fill TxBds for probe request during SSID scan which may happen
+         * as part of connect command
+         */
+        status = WLANTL_updateSpoofMacAddr(pHddCtx->pvosContext,
+            &pHddCtx->spoofMacAddr.randomMacAddr, &pAdapter->macAddressCurrent);
+        if (status != VOS_STATUS_SUCCESS)
+            return -ECONNREFUSED;
+    }
+
     if ( req->channel )
     {
         status = wlan_hdd_cfg80211_connect_start(pAdapter, req->ssid,