Explorar el Código

qcacld-3.0: Invoke CM mlme FILS update API when update FILS

After CM roam converged, if FILS update parameters when first connect
to AP, AP profile is not fils enabled, so FILS parameters need update
to mlme, otherwise updated FILS parameters will not configure to target.

Call mlme cm fils update API when update FILS parameters.
Fix potential memory allocation of size 0.

CRs-Fixed: 2803589
Change-Id: I9147a8506071b416a24f78df199a054d184f74f8
Will Huang hace 4 años
padre
commit
c7218cbc85
Se han modificado 1 ficheros con 25 adiciones y 10 borrados
  1. 25 10
      core/sme/src/csr/csr_api_roam.c

+ 25 - 10
core/sme/src/csr/csr_api_roam.c

@@ -7866,22 +7866,37 @@ static void update_profile_fils_info(struct mac_context *mac,
 	if (!src_profile->fils_con_info->is_fils_connection)
 		return;
 
+	if (des_profile->fils_con_info)
+		qdf_mem_free(des_profile->fils_con_info);
+
 	des_profile->fils_con_info =
 		qdf_mem_malloc(sizeof(struct wlan_fils_connection_info));
 	if (!des_profile->fils_con_info)
 		return;
 
 	qdf_mem_copy(des_profile->fils_con_info,
-			src_profile->fils_con_info,
-			sizeof(struct wlan_fils_connection_info));
-	des_profile->hlp_ie =
-		qdf_mem_malloc(src_profile->hlp_ie_len);
-	if (!des_profile->hlp_ie)
-		return;
-
-	qdf_mem_copy(des_profile->hlp_ie, src_profile->hlp_ie,
-		     src_profile->hlp_ie_len);
-	des_profile->hlp_ie_len = src_profile->hlp_ie_len;
+		     src_profile->fils_con_info,
+		     sizeof(struct wlan_fils_connection_info));
+
+	wlan_cm_update_mlme_fils_connection_info(mac->psoc,
+						 des_profile->fils_con_info,
+						 vdev_id);
+
+	if (src_profile->hlp_ie_len) {
+		if (des_profile->hlp_ie)
+			qdf_mem_free(des_profile->hlp_ie);
+
+		des_profile->hlp_ie =
+			qdf_mem_malloc(src_profile->hlp_ie_len);
+		if (!des_profile->hlp_ie) {
+			qdf_mem_free(des_profile->fils_con_info);
+			des_profile->fils_con_info = NULL;
+			return;
+		}
+		qdf_mem_copy(des_profile->hlp_ie, src_profile->hlp_ie,
+			     src_profile->hlp_ie_len);
+		des_profile->hlp_ie_len = src_profile->hlp_ie_len;
+	}
 }
 #else
 static inline