Browse Source

qcacmn: update the vdev crypto params form the connect req during roam

With existing STA code changes, The vdev crypto params are filled
in cm_connect_active() but when STA tries to roam from WPA2 AP to
WPA3 AP or vice versa, the new keymgmt of AP2(AP2 keymgmt is FT-SAE
if STA roams from WPA2 to WPA3 and AP2 keymgmt is FT-PSK if STA
roams from WPA3 to WPA2 AP's) is not updating in the vdev crypto
params instead it holds the AP1 keymgmt.

So, Adding changes to update the vdev crypto params from the connect
request structure during roam.

Change-Id: Ia0ddd6192a45f5d9e37b44665aded5a1fc573243
Shiva Sankar Gajula 3 năm trước cách đây
mục cha
commit
c2d0e0aca1

+ 2 - 2
umac/mlme/connection_mgr/core/src/wlan_cm_connect.c

@@ -1697,8 +1697,8 @@ bool cm_connect_resp_cmid_match_list_head(struct cnx_mgr *cm_ctx,
 	return cm_check_cmid_match_list_head(cm_ctx, &resp->cm_id);
 }
 
-static void cm_fill_vdev_crypto_params(struct cnx_mgr *cm_ctx,
-				       struct wlan_cm_connect_req *req)
+void cm_fill_vdev_crypto_params(struct cnx_mgr *cm_ctx,
+				struct wlan_cm_connect_req *req)
 {
 	/* fill vdev crypto from the connect req */
 	wlan_crypto_set_vdev_param(cm_ctx->vdev, WLAN_CRYPTO_PARAM_AUTH_MODE,

+ 15 - 0
umac/mlme/connection_mgr/core/src/wlan_cm_roam_util.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -31,6 +32,19 @@ void cm_free_roam_req_mem(struct cm_roam_req *roam_req)
 		wlan_scan_purge_results(roam_req->candidate_list);
 }
 
+#ifndef CONN_MGR_ADV_FEATURE
+static void cm_fill_roam_vdev_crypto_params(struct cnx_mgr *cm_ctx,
+					    struct wlan_cm_connect_req *req)
+{
+	cm_fill_vdev_crypto_params(cm_ctx, req);
+}
+#else
+static void cm_fill_roam_vdev_crypto_params(struct cnx_mgr *cm_ctx,
+					    struct wlan_cm_connect_req *req)
+{
+}
+#endif /* CONN_MGR_ADV_FEATURE */
+
 QDF_STATUS cm_check_and_prepare_roam_req(struct cnx_mgr *cm_ctx,
 					 struct cm_connect_req *connect_req,
 					 struct cm_req **roam_req)
@@ -96,6 +110,7 @@ QDF_STATUS cm_check_and_prepare_roam_req(struct cnx_mgr *cm_ctx,
 				 &req->bssid_hint);
 
 	qdf_copy_macaddr(&req_ptr->roam_req.req.prev_bssid, &req->prev_bssid);
+	cm_fill_roam_vdev_crypto_params(cm_ctx, &connect_req->req);
 	req_ptr->roam_req.req.chan_freq = freq;
 	req_ptr->roam_req.req.source = CM_ROAMING_HOST;
 

+ 12 - 0
umac/mlme/connection_mgr/core/src/wlan_cm_sm.h

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2012-2015,2020-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -344,4 +345,15 @@ QDF_STATUS cm_sm_deliver_event_sync(struct cnx_mgr *cm_ctx,
 QDF_STATUS  cm_sm_deliver_event(struct wlan_objmgr_vdev *vdev,
 				enum wlan_cm_sm_evt event,
 				uint16_t data_len, void *data);
+
+/**
+ * cm_fill_vdev_crypto_params() - Update the vdev crypto params
+ * from the connect req structure
+ * @cm_ctx: connection manager SM ctx
+ * @req: connect request structure
+ *
+ * Return: void
+ */
+void cm_fill_vdev_crypto_params(struct cnx_mgr *cm_ctx,
+				struct wlan_cm_connect_req *req);
 #endif /* __WLAN_CM_SM_H__ */