瀏覽代碼

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 4 年之前
父節點
當前提交
c7218cbc85
共有 1 個文件被更改,包括 25 次插入10 次删除
  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