Browse Source

qcacmn: Add handling 1x roaming case

- Add osif callback api to get scan ie params
- Made few mlo manager api's public

CRs-Fixed: 3288038
Change-Id: I15a764682b8164eb1b66adeff44d7e344f2563c3
Amruta Kulkarni 2 years ago
parent
commit
2cd3406a9a

+ 16 - 2
os_if/linux/mlme/inc/osif_cm_util.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2015, 2020-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 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
@@ -214,6 +214,19 @@ typedef QDF_STATUS
 				      enum osif_cb_type type);
 
 #ifdef CONN_MGR_ADV_FEATURE
+/**
+ * typedef osif_cm_get_scan_ie_params_cb  - get scan ie params cb
+ * @vdev: vdev pointer
+ * @scan_ie: pointer to scan ie element struct
+ * @dot11mode_filter: Pointer to dot11mode_filter enum
+ *
+ * Return: QDF_STATUS
+ */
+typedef QDF_STATUS
+(*osif_cm_get_scan_ie_params_cb)(struct wlan_objmgr_vdev *vdev,
+				 struct element_info *scan_ie,
+				 enum dot11_mode_filter *dot11mode_filter);
+
 /**
  * typedef osif_cm_netif_queue_ctrl_cb: Callback to update netif queue
  * @vdev: vdev pointer
@@ -332,6 +345,7 @@ typedef QDF_STATUS
  * actions on napi serialization
  * @save_gtk_cb : callback to legacy module to save gtk
  * @send_vdev_keys_cb: callback to send vdev keys
+ * @osif_cm_get_scan_ie_params_cb: callback to get scan ie params
  * @set_hlp_data_cb: callback to legacy module to save hlp data
  * @ft_preauth_complete_cb: callback to legacy module to send fast
  * transition event
@@ -348,6 +362,7 @@ struct osif_cm_ops {
 	os_if_cm_napi_serialize_ctrl_cb napi_serialize_control_cb;
 	osif_cm_save_gtk_cb save_gtk_cb;
 	osif_cm_send_vdev_keys_cb send_vdev_keys_cb;
+	osif_cm_get_scan_ie_params_cb get_scan_ie_params_cb;
 #endif
 #ifdef WLAN_FEATURE_FILS_SK
 	osif_cm_set_hlp_data_cb set_hlp_data_cb;
@@ -519,5 +534,4 @@ void osif_cm_set_legacy_cb(struct osif_cm_ops *osif_legacy_ops);
  * Return: void
  */
 void osif_cm_reset_legacy_cb(void);
-
 #endif /* __OSIF_CM_UTIL_H */

+ 3 - 2
os_if/linux/mlme/src/osif_cm_disconnect_rsp.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2015, 2020-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 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
@@ -50,7 +50,8 @@ osif_validate_disconnect_and_reset_src_id(struct vdev_osif_priv *osif_priv,
 
 	/* Always drop internal disconnect */
 	qdf_spinlock_acquire(&osif_priv->cm_info.cmd_id_lock);
-	if (rsp->req.req.source == CM_INTERNAL_DISCONNECT) {
+	if (rsp->req.req.source == CM_INTERNAL_DISCONNECT ||
+	    rsp->req.req.source == CM_MLO_ROAM_INTERNAL_DISCONNECT) {
 		osif_debug("ignore internal disconnect");
 		status = QDF_STATUS_E_INVAL;
 		goto rel_lock;

+ 46 - 1
os_if/linux/mlme/src/osif_cm_util.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2015, 2020-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 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
@@ -419,6 +419,50 @@ osif_cm_roam_cmpl_cb(struct wlan_objmgr_vdev *vdev)
 {
 	return osif_cm_napi_serialize(false);
 }
+
+/**
+ * osif_cm_get_scan_ie_params() - Function to get scan ie params
+ * @vdev: vdev pointer
+ * @scan_ie: Pointer to scan_ie
+ * @dot11mode_filter: Pointer to dot11mode_filter
+ *
+ * Get scan IE params from adapter corresponds to given vdev
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS
+osif_cm_get_scan_ie_params(struct wlan_objmgr_vdev *vdev,
+			   struct element_info *scan_ie,
+			   enum dot11_mode_filter *dot11mode_filter)
+{
+	osif_cm_get_scan_ie_params_cb cb = NULL;
+
+	if (osif_cm_legacy_ops)
+		cb = osif_cm_legacy_ops->get_scan_ie_params_cb;
+	if (cb)
+		return cb(vdev, scan_ie, dot11mode_filter);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+/**
+ * osif_cm_get_scan_ie_info_cb() - Roam get scan ie params callback
+ * @vdev: vdev pointer
+ * @scan_ie: pointer to scan ie
+ * @dot11mode_filter: pointer to dot11 mode filter
+ *
+ * This callback gets scan ie params from os_if
+ *
+ * Return: QDF_STATUS
+ */
+
+static QDF_STATUS
+osif_cm_get_scan_ie_info_cb(struct wlan_objmgr_vdev *vdev,
+			    struct element_info *scan_ie,
+			    enum dot11_mode_filter *dot11mode_filter)
+{
+	return osif_cm_get_scan_ie_params(vdev, scan_ie, dot11mode_filter);
+}
 #endif
 
 #ifdef WLAN_FEATURE_PREAUTH_ENABLE
@@ -493,6 +537,7 @@ static struct mlme_cm_ops cm_ops = {
 	.mlme_cm_roam_start_cb = osif_cm_roam_start_cb,
 	.mlme_cm_roam_abort_cb = osif_cm_roam_abort_cb,
 	.mlme_cm_roam_cmpl_cb = osif_cm_roam_cmpl_cb,
+	.mlme_cm_roam_get_scan_ie_cb = osif_cm_get_scan_ie_info_cb,
 #endif
 #ifdef WLAN_FEATURE_PREAUTH_ENABLE
 	.mlme_cm_ft_preauth_cmpl_cb = osif_cm_ft_preauth_cmpl_cb,

+ 6 - 3
umac/mlme/connection_mgr/core/src/wlan_cm_connect.c

@@ -1891,8 +1891,12 @@ QDF_STATUS cm_connect_active(struct cnx_mgr *cm_ctx, wlan_cm_id *cm_id)
 				qdf_mc_timer_get_system_time();
 	req = &cm_req->connect_req.req;
 	wlan_vdev_mlme_set_ssid(cm_ctx->vdev, req->ssid.ssid, req->ssid.length);
-	/* free vdev keys before setting crypto params */
-	if (!wlan_vdev_mlme_is_mlo_link_vdev(cm_ctx->vdev))
+	/*
+	 * free vdev keys before setting crypto params for 1x/ owe roaming,
+	 * link vdev keys would be cleaned in osif
+	 */
+	if (!wlan_vdev_mlme_is_mlo_link_vdev(cm_ctx->vdev) &&
+	    !wlan_cm_check_mlo_roam_auth_status(cm_ctx->vdev))
 		wlan_crypto_free_vdev_key(cm_ctx->vdev);
 	cm_fill_vdev_crypto_params(cm_ctx, req);
 	cm_store_wep_key(cm_ctx, &req->crypto, *cm_id);
@@ -2462,7 +2466,6 @@ QDF_STATUS cm_notify_connect_complete(struct cnx_mgr *cm_ctx,
 	cm_if_mgr_inform_connect_complete(cm_ctx->vdev,
 					  resp->connect_status);
 	cm_inform_dlm_connect_complete(cm_ctx->vdev, resp);
-
 	if (QDF_IS_STATUS_ERROR(resp->connect_status) &&
 	    sm_state == WLAN_CM_S_INIT)
 		cm_clear_vdev_mlo_cap(cm_ctx->vdev);

+ 8 - 3
umac/mlme/connection_mgr/core/src/wlan_cm_disconnect.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2015,2020-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 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
@@ -590,8 +590,13 @@ QDF_STATUS cm_disconnect_complete(struct cnx_mgr *cm_ctx,
 
 	/* Set the disconnect wait event once all disconnect are completed */
 	if (!cm_ctx->disconnect_count) {
-		/* Clear MLO cap only when it is the last disconnect req */
-		cm_clear_vdev_mlo_cap(cm_ctx->vdev, resp);
+		/*
+		 * Clear MLO cap only when it is the last disconnect req
+		 * For 1x/owe roaming, link vdev mlo flags are not cleared
+		 * as connect req is queued on link vdev after this.
+		 */
+		if (!wlan_cm_check_mlo_roam_auth_status(cm_ctx->vdev))
+			cm_clear_vdev_mlo_cap(cm_ctx->vdev, resp);
 		qdf_event_set(&cm_ctx->disconnect_complete);
 	}
 

+ 1 - 0
umac/mlme/connection_mgr/core/src/wlan_cm_util.c

@@ -34,6 +34,7 @@ static uint32_t cm_get_prefix_for_cm_id(enum wlan_cm_source source) {
 	switch (source) {
 	case CM_OSIF_CONNECT:
 	case CM_OSIF_CFG_CONNECT:
+	case CM_MLO_LINK_VDEV_CONNECT:
 		return CONNECT_REQ_PREFIX;
 	case CM_ROAMING_HOST:
 	case CM_ROAMING_FW:

+ 21 - 1
umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_api.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 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
@@ -519,4 +519,24 @@ QDF_STATUS wlan_cm_sta_update_bw_puncture(struct wlan_objmgr_vdev *vdev,
 					  uint8_t ccfs0, uint8_t ccfs1,
 					  enum phy_ch_width new_bw);
 #endif /* WLAN_FEATURE_11BE */
+
+#if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_FEATURE_11BE_MLO_ADV_FEATURE)
+
+/**
+ * wlan_cm_check_mlo_roam_auth_status - api to check roam auth status on link
+ * @vdev: vdev corresponds to given link
+ *
+ * This api will be called to check if roam auth status is connected
+ *
+ * Return: boolean true or false
+ */
+bool
+wlan_cm_check_mlo_roam_auth_status(struct wlan_objmgr_vdev *vdev);
+#else
+static inline bool
+wlan_cm_check_mlo_roam_auth_status(struct wlan_objmgr_vdev *vdev)
+{
+	return false;
+}
+#endif
 #endif /* __WLAN_CM_UCFG_API_H */

+ 4 - 0
umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_public_struct.h

@@ -147,6 +147,8 @@ struct wlan_fils_con_info {
  * @CM_OSIF_CFG_CONNECT: Connect request initiated due to config change
  * @CM_OSIF_CFG_DISCONNECT: Disconnect request initiated due to config change
  * @CM_MLO_LINK_VDEV_DISCONNECT: Disconnect req for ML link
+ * @CM_MLO_LINK_VDEV_CONNECT: Connect req for ML link
+ * @CM_MLO_ROAM_INTERNAL_DISCONNECT: Disconnect req triggered for mlo roaming
  * @CM_SOURCE_MAX: max value of connection manager source
  * @CM_SOURCE_INVALID: Invalid connection manager req source
  */
@@ -164,6 +166,8 @@ enum wlan_cm_source {
 	CM_OSIF_CFG_CONNECT,
 	CM_OSIF_CFG_DISCONNECT,
 	CM_MLO_LINK_VDEV_DISCONNECT,
+	CM_MLO_LINK_VDEV_CONNECT,
+	CM_MLO_ROAM_INTERNAL_DISCONNECT,
 	CM_SOURCE_MAX,
 	CM_SOURCE_INVALID = CM_SOURCE_MAX,
 };

+ 17 - 1
umac/mlme/connection_mgr/dispatcher/src/wlan_cm_api.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2015, 2020-2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 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
@@ -25,6 +25,11 @@
 #include "connection_mgr/core/src/wlan_cm_main_api.h"
 #include "connection_mgr/core/src/wlan_cm_roam.h"
 #include <wlan_vdev_mgr_utils_api.h>
+#ifdef WLAN_FEATURE_11BE_MLO
+#ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
+#include "wlan_mlo_mgr_roam.h"
+#endif
+#endif
 
 QDF_STATUS wlan_cm_start_connect(struct wlan_objmgr_vdev *vdev,
 				 struct wlan_cm_connect_req *req)
@@ -509,3 +514,14 @@ QDF_STATUS wlan_cm_sta_update_bw_puncture(struct wlan_objmgr_vdev *vdev,
 						  bw_puncture);
 }
 #endif /* WLAN_FEATURE_11BE */
+
+#ifdef WLAN_FEATURE_11BE_MLO
+#ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
+bool
+wlan_cm_check_mlo_roam_auth_status(struct wlan_objmgr_vdev *vdev)
+{
+	return mlo_roam_is_auth_status_connected(wlan_vdev_get_psoc(vdev),
+					  wlan_vdev_get_id(vdev));
+}
+#endif
+#endif

+ 19 - 1
umac/mlme/include/wlan_mlme_cmn.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 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
@@ -111,6 +111,9 @@ struct mlme_cm_ops {
 	QDF_STATUS (*mlme_cm_roam_start_cb)(struct wlan_objmgr_vdev *vdev);
 	QDF_STATUS (*mlme_cm_roam_abort_cb)(struct wlan_objmgr_vdev *vdev);
 	QDF_STATUS (*mlme_cm_roam_cmpl_cb)(struct wlan_objmgr_vdev *vdev);
+	QDF_STATUS (*mlme_cm_roam_get_scan_ie_cb)(struct wlan_objmgr_vdev *vdev,
+				struct element_info *scan_ie,
+				enum dot11_mode_filter *dot11mode_filter);
 #endif
 #ifdef WLAN_FEATURE_PREAUTH_ENABLE
 	QDF_STATUS (*mlme_cm_ft_preauth_cmpl_cb)(
@@ -901,6 +904,21 @@ QDF_STATUS mlme_cm_osif_roam_abort_ind(struct wlan_objmgr_vdev *vdev);
  * Return: QDF_STATUS
  */
 QDF_STATUS mlme_cm_osif_roam_complete(struct wlan_objmgr_vdev *vdev);
+
+/**
+ * mlme_cm_osif_roam_get_scan_params() - osif Roam get scan params callback
+ * @vdev: vdev pointer
+ * @scan_ie: Pointer to scan_ie
+ * @dot11mode_filter: Pointer to dot11mode_filter
+ *
+ * Get scan IE params from adapter corresponds to given vdev
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+mlme_cm_osif_roam_get_scan_params(struct wlan_objmgr_vdev *vdev,
+				  struct element_info *scan_ie,
+				  enum dot11_mode_filter *dot11mode_filter);
 #endif
 
 #ifdef WLAN_FEATURE_PREAUTH_ENABLE

+ 17 - 1
umac/mlme/mlme_objmgr/dispatcher/src/wlan_cmn_mlme_main.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 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
@@ -601,6 +601,22 @@ mlme_cm_osif_roam_complete(struct wlan_objmgr_vdev *vdev)
 
 	return ret;
 }
+
+QDF_STATUS
+mlme_cm_osif_roam_get_scan_params(struct wlan_objmgr_vdev *vdev,
+				  struct element_info *scan_ie,
+				  enum dot11_mode_filter *dot11mode_filter)
+{
+	QDF_STATUS ret = QDF_STATUS_SUCCESS;
+
+	if (glbl_cm_ops &&
+	    glbl_cm_ops->mlme_cm_roam_get_scan_ie_cb)
+		ret = glbl_cm_ops->mlme_cm_roam_get_scan_ie_cb(vdev,
+						scan_ie, dot11mode_filter);
+
+	return ret;
+}
+
 #endif
 
 #ifdef WLAN_FEATURE_PREAUTH_ENABLE

+ 29 - 23
umac/mlo_mgr/inc/wlan_mlo_mgr_public_structs.h

@@ -15,7 +15,7 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/*
+/**
  * DOC: contains mlo manager structure definitions
  */
 #ifndef __MLO_MGR_PUBLIC_STRUCTS_H
@@ -159,7 +159,7 @@ struct mlo_state_params {
 
 #endif
 
-/*
+/**
  * struct mlo_mgr_context - MLO manager context
  * @ml_dev_list_lock: ML DEV list lock
  * @aid_lock: AID global lock
@@ -197,7 +197,7 @@ struct mlo_mgr_context {
 	uint8_t mlo_forced_primary_umac_id;
 };
 
-/*
+/**
  * struct wlan_ml_vdev_aid_mgr – ML AID manager
  * @aid_bitmap: AID bitmap array
  * @start_aid: start of AID index
@@ -211,7 +211,7 @@ struct wlan_ml_vdev_aid_mgr {
 	struct wlan_vdev_aid_mgr *aid_mgr[WLAN_UMAC_MLO_MAX_VDEVS];
 };
 
-/*
+/**
  * struct wlan_mlo_key_mgmt - MLO key management
  * @link_mac_address: list of vdevs selected for connection with the MLAP
  * @vdev_id: vdev id value
@@ -245,7 +245,7 @@ struct mlo_sta_csa_params {
 	bool valid_csa_param;
 };
 
-/*
+/**
  * struct mlo_sta_quiet_status - MLO sta quiet status
  * @link_id: link id
  * @quiet_status: true if corresponding ap in quiet status
@@ -257,7 +257,7 @@ struct mlo_sta_quiet_status {
 	bool valid_status;
 };
 
-/*
+/**
  * struct wlan_mlo_sta - MLO sta additional info
  * @wlan_connect_req_links: list of vdevs selected for connection with the MLAP
  * @wlan_connected_links: list of vdevs associated with this MLO connection
@@ -267,6 +267,9 @@ struct mlo_sta_quiet_status {
  * @assoc_rsp: Raw assoc response frame
  * @mlo_csa_param: CSA request parameters for mlo sta
  * @disconn_req: disconnect req params
+ * @copied_reassoc_rsp: Reassoc response copied from assoc link roam handling
+ *                      to re-use while link connect in case of deferred/need
+ *                      basis link connect (e.g. MLO OWE roaming).
  */
 struct wlan_mlo_sta {
 	qdf_bitmap(wlan_connect_req_links, WLAN_UMAC_MLO_MAX_VDEVS);
@@ -283,9 +286,12 @@ struct wlan_mlo_sta {
 	struct mlo_sta_quiet_status mlo_quiet_status[WLAN_UMAC_MLO_MAX_VDEVS];
 	struct mlo_sta_csa_params mlo_csa_param[WLAN_UMAC_MLO_MAX_VDEVS];
 	struct wlan_cm_disconnect_req *disconn_req;
+#ifdef WLAN_FEATURE_ROAM_OFFLOAD
+	struct wlan_cm_connect_resp *copied_reassoc_rsp;
+#endif
 };
 
-/*
+/**
  * struct wlan_mlo_ap - MLO AP related info
  * @num_ml_vdevs: number of vdevs to form MLD
  * @ml_aid_mgr: ML AID mgr
@@ -303,7 +309,7 @@ struct wlan_mlo_ap {
 	qdf_bitmap(mlo_vdev_quiet_bmap, WLAN_UMAC_MLO_MAX_VDEVS);
 };
 
-/*
+/**
  * struct wlan_mlo_peer_list - MLO peer list entry
  * @peer_hash: MLO peer hash code
  * @peer_list_lock: lock to access members of structure
@@ -317,7 +323,7 @@ struct wlan_mlo_peer_list {
 #endif
 };
 
-/*
+/**
  * struct wlan_mlo_dev_context - MLO device context
  * @node: QDF list node member
  * @mld_id: MLD id
@@ -356,7 +362,7 @@ struct wlan_mlo_dev_context {
 	struct wlan_t2lm_context t2lm_ctx;
 };
 
-/*
+/**
  * struct wlan_mlo_link_peer_entry – Link peer entry
  * @link_peer: Object manager peer
  * @link_addr: MAC address of link peer
@@ -374,7 +380,7 @@ struct wlan_mlo_link_peer_entry {
 	qdf_nbuf_t assoc_rsp_buf;
 };
 
-/*
+/**
  * enum mlo_peer_state – MLO peer state
  * @ML_PEER_CREATED:     Initial state
  * @ML_PEER_ASSOC_DONE:  ASSOC sent on assoc link
@@ -387,7 +393,7 @@ enum mlo_peer_state {
 };
 
 #if defined(UMAC_SUPPORT_MLNAWDS) || defined(MESH_MODE_SUPPORT)
-/*
+/**
  * struct mlnawds_config - MLO NAWDS configuration
  * @caps: Bandwidth & NSS capabilities to be configured on NAWDS peer
  * @puncture_bitmap: puncture bitmap to be configured on NAWDS peer
@@ -401,7 +407,7 @@ struct mlnawds_config {
 };
 #endif
 
-/*
+/**
  * struct mlpeer_auth_params - Deferred Auth params
  * @vdev_id:  VDEV ID
  * @psoc_id:  PSOC ID
@@ -480,7 +486,7 @@ struct wlan_mlo_mld_cap {
 		 reserved:3;
 };
 
-/*
+/**
  * struct wlan_mlo_peer_context - MLO peer context
  *
  * @peer_node:     peer list node for ml_dev qdf list
@@ -544,7 +550,7 @@ struct wlan_mlo_peer_context {
 #endif
 };
 
-/*
+/**
  * struct mlo_link_info – ML link info
  * @link_addr: link mac address
  * @link_id: link index
@@ -566,7 +572,7 @@ struct mlo_link_info {
 #endif
 };
 
-/*
+/**
  * struct mlo_partner_info – mlo partner link info
  * @num_partner_links: no. of partner links
  * @partner_link_info: per partner link info
@@ -580,7 +586,7 @@ struct mlo_partner_info {
 #endif
 };
 
-/*
+/**
  * struct mlo_probereq_info – mlo probe req link info
  * mlid: MLID requested in the probe req
  * @num_links: no. of link info in probe req
@@ -620,7 +626,7 @@ struct ml_rv_info {
 	struct ml_rv_partner_link_info link_info[WLAN_UMAC_MLO_MAX_VDEVS];
 };
 
-/*
+/**
  * struct mlo_tgt_link_info – ML target link info
  * @vdev_id: link peer vdev id
  * @hw_mld_link_id: HW link id
@@ -630,7 +636,7 @@ struct mlo_tgt_link_info {
 	uint8_t hw_mld_link_id;
 };
 
-/*
+/**
  * struct mlo_tgt_partner_info – mlo target partner link info
  * @num_partner_links: no. of partner links
  * @link_info: per partner link info
@@ -640,7 +646,7 @@ struct mlo_tgt_partner_info {
 	struct mlo_tgt_link_info link_info[WLAN_UMAC_MLO_MAX_VDEVS];
 };
 
-/*
+/**
  * struct mlo_mlme_ext_ops - MLME callback functions
  * @mlo_mlme_ext_validate_conn_req: Callback to validate connect request
  * @mlo_mlme_ext_create_link_vdev: Callback to create link vdev for ML STA
@@ -780,7 +786,7 @@ struct mlo_link_set_active_param {
 	uint32_t vdev_bitmap[MLO_VDEV_BITMAP_SZ];
 };
 
-/*
+/**
  * struct mlo_link_set_active_ctx - Context for MLO link set active request
  * @vdev: pointer to vdev on which the request issued
  * @set_mlo_link_cb: callback function for MLO link set active request
@@ -797,7 +803,7 @@ struct mlo_link_set_active_ctx {
 	void *cb_arg;
 };
 
-/*
+/**
  * struct mlo_link_set_active_req - MLO link set active request
  * @ctx: context for MLO link set active request
  * @param: MLO link set active params
@@ -807,7 +813,7 @@ struct mlo_link_set_active_req {
 	struct mlo_link_set_active_param param;
 };
 
-/*
+/**
  * enum mlo_chip_recovery_type - MLO chip recovery types
  * @MLO_RECOVERY_MODE_0: CRASH_PARTNER_CHIPS & recover all chips
  * @MLO_RECOVERY_MODE_1: Crash & recover asserted chip alone

+ 38 - 0
umac/mlo_mgr/inc/wlan_mlo_mgr_sta.h

@@ -90,6 +90,25 @@ QDF_STATUS mlo_sync_disconnect(struct wlan_objmgr_vdev *vdev,
 void mlo_sta_link_disconn_notify(struct wlan_objmgr_vdev *vdev,
 				 struct wlan_cm_discon_rsp *resp);
 
+/**
+ * mlo_handle_sta_link_connect_failure - Notifies that STA link connect failure
+ * @vdev: pointer to vdev
+ * @rsp: connect resp
+ *
+ * Return: none
+ */
+void mlo_handle_sta_link_connect_failure(struct wlan_objmgr_vdev *vdev,
+					 struct wlan_cm_connect_resp *rsp);
+
+/**
+ * mlo_handle_pending_disconnect - Handle pending disconnect if received
+ * while link connect is ongoing.
+ * @vdev: pointer to vdev
+ *
+ * Return: none
+ */
+void mlo_handle_pending_disconnect(struct wlan_objmgr_vdev *vdev);
+
 /**
  * mlo_is_mld_sta - Check if MLD associated with the vdev is a station
  * @vdev: pointer to vdev
@@ -585,6 +604,25 @@ void mlo_process_ml_reconfig_ie(struct wlan_objmgr_vdev *vdev,
 				struct scan_cache_entry *scan_entry,
 				uint8_t *ml_ie, qdf_size_t ml_ie_len,
 				struct mlo_partner_info *partner_info);
+/**
+ * mlo_allocate_and_copy_ies() - allocate and copy ies
+ * @target: target connect req pointer
+ * @source: source connect req pointer
+ *
+ * Return: None
+ */
+void
+mlo_allocate_and_copy_ies(struct wlan_cm_connect_req *target,
+			  struct wlan_cm_connect_req *source);
+
+/**
+ * mlo_free_connect_ies() - free connect ies
+ * @connect_req: connect req pointer
+ *
+ * Return: None
+ */
+void
+mlo_free_connect_ies(struct wlan_cm_connect_req *connect_req);
 #else
 static inline
 QDF_STATUS mlo_connect(struct wlan_objmgr_vdev *vdev,

+ 6 - 8
umac/mlo_mgr/src/wlan_mlo_mgr_sta.c

@@ -36,13 +36,13 @@
 #include <wlan_scan_api.h>
 
 #ifdef WLAN_FEATURE_11BE_MLO
-static QDF_STATUS mlo_disocnnect_req(struct wlan_objmgr_vdev *vdev,
+static QDF_STATUS mlo_disconnect_req(struct wlan_objmgr_vdev *vdev,
 				     enum wlan_cm_source source,
 				     enum wlan_reason_code reason_code,
 				     struct qdf_mac_addr *bssid,
 				     bool validate_req);
 
-static inline void
+void
 mlo_allocate_and_copy_ies(struct wlan_cm_connect_req *target,
 			  struct wlan_cm_connect_req *source)
 {
@@ -68,7 +68,7 @@ mlo_allocate_and_copy_ies(struct wlan_cm_connect_req *target,
 	}
 }
 
-static inline void
+void
 mlo_free_connect_ies(struct wlan_cm_connect_req *connect_req)
 {
 	if (connect_req->scan_ie.ptr) {
@@ -874,7 +874,7 @@ static QDF_STATUS ml_activate_pend_disconn_req_cb(struct scheduler_msg *msg)
 
 	mlo_dev_ctx = vdev->mlo_dev_ctx;
 	sta_ctx = mlo_dev_ctx->sta_ctx;
-	mlo_disocnnect_req(vdev, sta_ctx->disconn_req->source,
+	mlo_disconnect_req(vdev, sta_ctx->disconn_req->source,
 			   sta_ctx->disconn_req->reason_code,
 			   &sta_ctx->disconn_req->bssid, false);
 
@@ -921,7 +921,6 @@ QDF_STATUS mlo_post_disconnect_msg(struct scheduler_msg *msg)
 }
 #endif
 
-static inline
 void mlo_handle_sta_link_connect_failure(struct wlan_objmgr_vdev *vdev,
 					 struct wlan_cm_connect_resp *rsp)
 {
@@ -974,7 +973,6 @@ void mlo_handle_sta_link_connect_failure(struct wlan_objmgr_vdev *vdev,
 	}
 }
 
-static inline
 void mlo_handle_pending_disconnect(struct wlan_objmgr_vdev *vdev)
 {
 	struct scheduler_msg msg = {0};
@@ -1106,7 +1104,7 @@ mlo_send_link_disconnect_sync(struct wlan_mlo_dev_context *mlo_dev_ctx,
 	return QDF_STATUS_SUCCESS;
 }
 
-static QDF_STATUS mlo_disocnnect_req(struct wlan_objmgr_vdev *vdev,
+static QDF_STATUS mlo_disconnect_req(struct wlan_objmgr_vdev *vdev,
 				     enum wlan_cm_source source,
 				     enum wlan_reason_code reason_code,
 				     struct qdf_mac_addr *bssid,
@@ -1163,7 +1161,7 @@ QDF_STATUS mlo_disconnect(struct wlan_objmgr_vdev *vdev,
 			  enum wlan_reason_code reason_code,
 			  struct qdf_mac_addr *bssid)
 {
-	return mlo_disocnnect_req(vdev, source, reason_code, bssid, true);
+	return mlo_disconnect_req(vdev, source, reason_code, bssid, true);
 }
 
 QDF_STATUS mlo_sync_disconnect(struct wlan_objmgr_vdev *vdev,