Browse Source

qcacld-3.0: Add support for connection failure cases with no roam_info

hdd_association_completion_handler function calls with
roam_info set to NULL are not handled. Due to this the conn_state
remains in eConnectionState_Connecting state. Hence add handling for
connection failure with no roam info.

Change-Id: Iaf12ce44fac62c021b9bc3dbc31624f3f98e1444
CRs-Fixed: 2876141
Jayachandran Sreekumaran 4 years ago
parent
commit
2b29dd5620
1 changed files with 11 additions and 7 deletions
  1. 11 7
      core/hdd/src/wlan_hdd_assoc.c

+ 11 - 7
core/hdd/src/wlan_hdd_assoc.c

@@ -2562,16 +2562,15 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
 		return QDF_STATUS_E_NULL_VALUE;
 	}
 
-	if (!roam_info) {
-		hdd_err("roam_info is NULL");
-		return QDF_STATUS_E_FAILURE;
+	if (roam_info) {
+		hdd_cm_save_connect_status(adapter, roam_info->reasonCode);
+		if (roam_info->u.pConnectedProfile)
+			uapsd_mask = roam_info->u.pConnectedProfile->
+				     modifyProfileFields.uapsd_mask;
 	}
-	if (roam_info->u.pConnectedProfile)
-		uapsd_mask =
-		roam_info->u.pConnectedProfile->modifyProfileFields.uapsd_mask;
+
 	hdd_cm_update_rssi_snr_by_bssid(adapter);
 
-	hdd_cm_save_connect_status(adapter, roam_info->reasonCode);
 	/*
 	 * reset scan reject params if connection is success or we received
 	 * final failure from CSR after trying with all APs.
@@ -2594,6 +2593,11 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
 	mac_handle = hdd_ctx->mac_handle;
 
 	if (eCSR_ROAM_RESULT_ASSOCIATED == roam_result) {
+		if (!roam_info) {
+			hdd_err("roam_info is NULL");
+			return QDF_STATUS_E_FAILURE;
+		}
+
 		if (!hddDisconInProgress) {
 			hdd_conn_set_connection_state(adapter,
 						   eConnectionState_Associated);