qcacld-3.0: Handle user-space roaming failure case

Supplicant uses connect command to send roam request and
also starts auth timer. On failing to receive assoc success
from driver, supplicant will send disconnect indication to
the driver after auth timeout which is 10 sec.

So, currently supplicant does not allow to stay with current AP
if roam invoke fails.

On roam invoke failure, indicate this failure to supplicant
and send death to current AP for driver and firmware cleanup,
So that we can avoid 10sec auth-timer delay.

Change-Id: Ie010a55b9b7a6563c817b17815d004f7b8bfa2fa
CRs-Fixed: 2044156
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 00172a3..ed4697c 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -14400,6 +14400,7 @@
 	bool reassoc = false;
 	const uint8_t *bssid = NULL;
 	uint16_t channel = 0;
+	hdd_wext_state_t *wext_state = WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
 
 	if (req->bssid)
 		bssid = req->bssid;
@@ -14415,6 +14416,15 @@
 		reassoc = true;
 		hdd_debug(FL("REASSOC Attempt on channel %d to "MAC_ADDRESS_STR),
 				channel, MAC_ADDR_ARRAY(bssid));
+		/*
+		 * Save BSSID in a separate variable as
+		 * pRoamProfile's BSSID is getting zeroed out in the
+		 * association process. In case of join failure
+		 * we should send valid BSSID to supplicant
+		 */
+		qdf_mem_copy(wext_state->req_bssId.bytes, bssid,
+			     QDF_MAC_ADDR_SIZE);
+
 		*status = hdd_reassoc(adapter, bssid, channel,
 				      CONNECT_CMD_USERSPACE);
 		hdd_debug("hdd_reassoc: status: %d", *status);