qcacld-3.0: Do HW mode change based on all the candidate APs for STA

The driver currently changes the hw_mode based upon
the first candidate found in the scan list, and tries
to connect to it. It may happen that the connection
fails, and the STA then tries to connect to the AP
on same channel as the concurrent adapter.
It would result in hw_mode = DBS, as it is not
updated after  connection success/failure.
Also if the first AP channel is in same band as that
of concurrent adapter, and the connection fails,
and the STA tries to connect to an AP in a different
band, this too is not allowed as hw_mode is not DBS

Fix is to change the hw_mode based upon the scan list.
If the driver finds any scan result which may lead to
DBS connection, the hw_mode should be set to DBS.
Once the connection is done or failed, the driver
can check and update the hw_mode again.

Change-Id: I42ffe0c63371e048771e2b9b00b887e9c6c65d6c
CRs-Fixed: 2288572
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index ab026f3..08c6a25 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -3254,9 +3254,12 @@
 		hdd_debug("check for SAP restart");
 		policy_mgr_check_concurrent_intf_and_restart_sap(
 			hdd_ctx->hdd_psoc);
+		policy_mgr_checkn_update_hw_mode_single_mac_mode
+			(hdd_ctx->hdd_psoc, roam_info->pBssDesc->channelId);
 	} else {
 		bool connect_timeout = false;
-
+		/* do we need to change the HW mode */
+		policy_mgr_check_n_start_opportunistic_timer(hdd_ctx->hdd_psoc);
 		if (roam_info && roam_info->is_fils_connection &&
 		    eCSR_ROAM_RESULT_SCAN_FOR_SSID_FAILURE == roamResult)
 			qdf_copy_macaddr(&roam_info->bssid,