Ver Fonte

qcacld-3.0: register mlme mlo ext call back

register mlme mlo ext call back.
unregister mlme mlo ext call back.

Change-Id: Ifbfd474fcd01d091c65d6dbde08c9877d05e3cd5
CRs-Fixed: 2976146
bings há 3 anos atrás
pai
commit
5b8e66816a

+ 19 - 0
components/mlme/core/inc/wlan_mlme_vdev_mgr_interface.h

@@ -35,6 +35,25 @@
  * Return: QDF_STATUS
  */
 QDF_STATUS mlme_register_mlme_ext_ops(void);
+
+/**
+ * mlme_register_mlo_ext_ops() - Register mlme mlo ext ops
+ *
+ * This function is called to register mlme mlo ext operations
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS mlme_register_mlo_ext_ops(void);
+
+/**
+ * mlme_unregister_mlo_ext_ops() - Unregister mlme mlo ext ops
+ *
+ * This function is called to unregister mlme mlo ext operations
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS mlme_unregister_mlo_ext_ops(void);
+
 /**
  * mlme_register_vdev_mgr_ops() - Register vdev mgr ops
  * @vdev_mlme: vdev mlme object

+ 49 - 0
components/mlme/core/src/wlan_mlme_vdev_mgr_interface.c

@@ -36,10 +36,19 @@
 #include <cm_utf.h>
 #include "target_if_cm_roam_event.h"
 
+#ifdef WLAN_FEATURE_11BE_MLO
+#include <wlan_mlo_mgr_public_structs.h>
+#include <wlan_mlo_mgr_cmn.h>
+#include <lim_mlo.h>
+#endif
+
 static struct vdev_mlme_ops sta_mlme_ops;
 static struct vdev_mlme_ops ap_mlme_ops;
 static struct vdev_mlme_ops mon_mlme_ops;
 static struct mlme_ext_ops ext_ops;
+#ifdef WLAN_FEATURE_11BE_MLO
+static struct mlo_mlme_ext_ops mlo_ext_ops;
+#endif
 
 bool mlme_is_vdev_in_beaconning_mode(enum QDF_OPMODE vdev_opmode)
 {
@@ -73,6 +82,37 @@ QDF_STATUS mlme_register_mlme_ext_ops(void)
 	return QDF_STATUS_SUCCESS;
 }
 
+#ifdef WLAN_FEATURE_11BE_MLO
+QDF_STATUS mlme_register_mlo_ext_ops(void)
+{
+	struct mlo_mgr_context *mlo_ctx = wlan_objmgr_get_mlo_ctx();
+
+	if (mlo_ctx)
+		mlo_reg_mlme_ext_cb(mlo_ctx, &mlo_ext_ops);
+
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS mlme_unregister_mlo_ext_ops(void)
+{
+	struct mlo_mgr_context *mlo_ctx = wlan_objmgr_get_mlo_ctx();
+
+	if (mlo_ctx)
+		mlo_unreg_mlme_ext_cb(mlo_ctx);
+
+	return QDF_STATUS_SUCCESS;
+}
+#else
+QDF_STATUS mlme_register_mlo_ext_ops(void)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS mlme_unregister_mlo_ext_ops(void)
+{
+	return QDF_STATUS_SUCCESS;
+}
+#endif
 /**
  * mlme_register_vdev_mgr_ops() - Register vdev mgr ops
  * @vdev_mlme: vdev mlme object
@@ -1822,3 +1862,12 @@ static struct mlme_ext_ops ext_ops = {
 	.mlme_cm_ext_reassoc_req_cb = cm_handle_reassoc_req,
 	.mlme_cm_ext_roam_start_ind_cb = cm_handle_roam_start,
 };
+
+#ifdef WLAN_FEATURE_11BE_MLO
+static struct mlo_mlme_ext_ops mlo_ext_ops = {
+	.mlo_mlme_ext_peer_create = lim_mlo_proc_assoc_req_frm,
+	.mlo_mlme_ext_peer_delete = lim_mlo_cleanup_partner_peer,
+	.mlo_mlme_ext_peer_assoc_fail = lim_mlo_ap_sta_assoc_fail,
+	.mlo_mlme_ext_assoc_resp = lim_mlo_ap_sta_assoc_suc,
+};
+#endif

+ 2 - 0
components/mlme/dispatcher/src/wlan_mlme_ucfg_api.c

@@ -63,6 +63,7 @@ QDF_STATUS ucfg_mlme_init(void)
 		return QDF_STATUS_E_FAILURE;
 	}
 
+	mlme_register_mlo_ext_ops();
 	return status;
 }
 
@@ -70,6 +71,7 @@ QDF_STATUS ucfg_mlme_deinit(void)
 {
 	QDF_STATUS status;
 
+	mlme_unregister_mlo_ext_ops();
 	status = wlan_objmgr_unregister_peer_destroy_handler(
 			WLAN_UMAC_COMP_MLME,
 			mlme_peer_object_destroyed_notification,