Browse Source

qcacmn: Initialize the MLO T2LM context with the default values

Initialize the MLO T2LM context with the default values.
- Set the direction to WLAN_T2LM_BIDI_DIRECTION
- Set default_link_mapping to 1
- Set the number of T2LM IE as 1

Change-Id: Icb5a576f14db616bf67a302f3e4666a0303a4c5b
CRs-Fixed: 3345808
Shashikala Prabhu 2 years ago
parent
commit
fcc7724ea7
1 changed files with 22 additions and 0 deletions
  1. 22 0
      umac/mlo_mgr/src/wlan_mlo_mgr_main.c

+ 22 - 0
umac/mlo_mgr/src/wlan_mlo_mgr_main.c

@@ -378,6 +378,26 @@ QDF_STATUS wlan_mlo_check_valid_config(struct wlan_mlo_dev_context *ml_dev,
 	return QDF_STATUS_SUCCESS;
 }
 
+/**
+ * mlo_t2lm_ctx_init() - API to initialize the t2lm context with the default
+ * values.
+ * @ml_dev: Pointer to ML Dev context
+ *
+ * Return: None
+ */
+static inline void mlo_t2lm_ctx_init(struct wlan_mlo_dev_context *ml_dev)
+{
+	struct wlan_t2lm_info *t2lm;
+
+	t2lm = &ml_dev->t2lm_ctx.t2lm_ie[0].t2lm;
+
+	qdf_mem_zero(&ml_dev->t2lm_ctx, sizeof(struct wlan_t2lm_context));
+
+	ml_dev->t2lm_ctx.num_of_t2lm_ie = 1;
+	t2lm->direction = WLAN_T2LM_BIDI_DIRECTION;
+	t2lm->default_link_mapping = 1;
+}
+
 static QDF_STATUS mlo_dev_ctx_init(struct wlan_objmgr_vdev *vdev)
 {
 	struct wlan_mlo_dev_context *ml_dev;
@@ -453,6 +473,8 @@ static QDF_STATUS mlo_dev_ctx_init(struct wlan_objmgr_vdev *vdev)
 		qdf_list_insert_back(&g_mlo_ctx->ml_dev_list, &ml_dev->node);
 	ml_link_lock_release(g_mlo_ctx);
 
+	mlo_t2lm_ctx_init(ml_dev);
+
 	return status;
 }