Browse Source

qcacmn: Introduce OSIF ops callback handler pointers

The ops are called on BSS info to be updated to OSIF and
to call for MAC address update on particular VDEV

Change-Id: Ib7b07e6ea2927c365298555ed6f24377127ddd4a
CRs-Fixed: 3556338
Vinod Kumar Pirla 2 years ago
parent
commit
1049b376f7

+ 35 - 0
umac/mlo_mgr/inc/wlan_mlo_mgr_cmn.h

@@ -144,6 +144,41 @@ QDF_STATUS mlo_reg_mlme_ext_cb(struct mlo_mgr_context *ctx,
  */
 QDF_STATUS mlo_unreg_mlme_ext_cb(struct mlo_mgr_context *ctx);
 
+#ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
+/**
+ * wlan_mlo_mgr_register_osif_ext_ops() - Function to register OSIF callbacks
+ * @mlo_ctx: Global MLO manager pointer
+ * @ops: Pointer to the struct containing OSIF callbacks.
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS wlan_mlo_mgr_register_osif_ext_ops(struct mlo_mgr_context *mlo_ctx,
+					      struct mlo_osif_ext_ops *ops);
+
+/**
+ * wlan_mlo_mgr_unregister_osif_ext_ops() - Function to unregister OSIF
+ * callbacks
+ * @mlo_ctx: Global MLO manager pointer
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+wlan_mlo_mgr_unregister_osif_ext_ops(struct mlo_mgr_context *mlo_ctx);
+#else
+static inline QDF_STATUS
+wlan_mlo_mgr_register_osif_ext_ops(struct mlo_mgr_context *mlo_ctx,
+				   struct mlo_osif_ext_ops *ops)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+static inline QDF_STATUS
+wlan_mlo_mgr_unregister_osif_ext_ops(struct mlo_mgr_context *mlo_ctx)
+{
+	return QDF_STATUS_SUCCESS;
+}
+#endif
+
 /**
  * mlo_mlme_clone_sta_security() - Clone Security params in partner vdevs
  * @vdev: Object manager vdev

+ 22 - 0
umac/mlo_mgr/inc/wlan_mlo_mgr_public_structs.h

@@ -59,6 +59,7 @@
 #define MAX_MLO_PEER 512
 
 struct mlo_mlme_ext_ops;
+struct mlo_osif_ext_ops;
 struct vdev_mlme_obj;
 struct wlan_t2lm_context;
 struct mlo_link_switch_context;
@@ -216,6 +217,7 @@ struct mlo_state_params {
  * @setup_info: Pointer to MLO setup_info of all groups
  * @total_grp: Total number of MLO groups
  * @mlme_ops: MLO MLME callback function pointers
+ * @osif_ops: MLO to OSIF callback function pointers
  * @msgq_ctx: Context switch mgr
  * @mlo_is_force_primary_umac: Force Primary UMAC enable
  * @mlo_forced_primary_umac_id: Force Primary UMAC ID
@@ -243,6 +245,9 @@ struct mlo_mgr_context {
 	uint8_t total_grp;
 #endif
 	struct mlo_mlme_ext_ops *mlme_ops;
+#ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
+	struct mlo_osif_ext_ops *osif_ops;
+#endif
 	struct ctxt_switch_mgr *msgq_ctx;
 	bool mlo_is_force_primary_umac;
 	uint8_t mlo_forced_primary_umac_id;
@@ -988,6 +993,23 @@ struct mlo_mlme_ext_ops {
 					qdf_nbuf_t frm_buf);
 };
 
+/*
+ * struct mlo_osif_ext_ops - MLO manager to OSIF callback functions
+ * @mlo_mgr_osif_update_bss_info: Callback to update each link connection info.
+ * @mlo_mgr_osif_update_mac_addr: Callback to notify MAC addr update complete
+ *                                from old link id to new link id for the vdev.
+ */
+struct mlo_osif_ext_ops {
+	QDF_STATUS
+	(*mlo_mgr_osif_update_bss_info)(struct qdf_mac_addr *self_mac,
+					struct qdf_mac_addr *bssid,
+					int32_t link_id);
+
+	QDF_STATUS (*mlo_mgr_osif_update_mac_addr)(int32_t ieee_old_link_id,
+						   int32_t ieee_new_link_id,
+						   uint8_t vdev_id);
+};
+
 /* maximum size of vdev bitmap array for MLO link set active command */
 #define MLO_VDEV_BITMAP_SZ 2
 

+ 21 - 0
umac/mlo_mgr/src/wlan_mlo_mgr_cmn.c

@@ -100,6 +100,27 @@ QDF_STATUS mlo_unreg_mlme_ext_cb(struct mlo_mgr_context *ctx)
 	return QDF_STATUS_SUCCESS;
 }
 
+#ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
+QDF_STATUS wlan_mlo_mgr_register_osif_ext_ops(struct mlo_mgr_context *mlo_ctx,
+					      struct mlo_osif_ext_ops *ops)
+{
+	if (!ops || !mlo_ctx)
+		return QDF_STATUS_E_FAILURE;
+
+	mlo_ctx->osif_ops = ops;
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS wlan_mlo_mgr_unregister_osif_ext_ops(struct mlo_mgr_context *mlo_ctx)
+{
+	if (!mlo_ctx)
+		return QDF_STATUS_E_FAILURE;
+
+	mlo_ctx->osif_ops = NULL;
+	return QDF_STATUS_SUCCESS;
+}
+#endif
+
 QDF_STATUS mlo_mlme_clone_sta_security(struct wlan_objmgr_vdev *vdev,
 				       struct wlan_cm_connect_req *req)
 {