Browse Source

qcacmn: Clear bridge_sta_ctx in MLO WDS STA

Clear bridge_sta_ctx during disconnect/connect failure.

There were issues in MLO WDS bridge STA mode when there was
multiple disconnect/connect failure, as the previous context
was not cleared and code logic was going into the earlier
state leading to issues.

Make sure to clear the context during disconnect and connect
failure so the STA context will be initialized properly.

CRs-Fixed: 3603610
Change-Id: I586ee44e7f4569693aa6c3550d1c5d94a1a9d3a7
Uraj Sasan 1 năm trước cách đây
mục cha
commit
9487a4d77f
2 tập tin đã thay đổi với 29 bổ sung0 xóa
  1. 28 0
      umac/mlo_mgr/inc/wlan_mlo_mgr_sta.h
  2. 1 0
      umac/mlo_mgr/src/wlan_mlo_mgr_sta.c

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

@@ -284,6 +284,26 @@ struct qdf_mac_addr *mlo_get_sta_ctx_bss_mld_addr(struct wlan_objmgr_vdev *vdev)
 	return NULL;
 }
 
+/**
+ * mlo_clear_bridge_sta_ctx() - clear bridge_sta_ctx
+ * @vdev: vdev object
+ *
+ * Return: none
+ */
+static inline
+void mlo_clear_bridge_sta_ctx(struct wlan_objmgr_vdev *vdev)
+{
+	struct wlan_mlo_dev_context *ml_dev = NULL;
+
+	if (!vdev || !vdev->mlo_dev_ctx)
+		return;
+
+	ml_dev = vdev->mlo_dev_ctx;
+	if (ml_dev->bridge_sta_ctx)
+		qdf_mem_zero(ml_dev->bridge_sta_ctx,
+			     sizeof(ml_dev->bridge_sta_ctx));
+}
+
 #else
 static inline
 void mlo_set_sta_ctx_bss_mld_addr(struct wlan_objmgr_vdev *vdev,
@@ -313,6 +333,10 @@ bool mlo_is_force_central_primary(struct wlan_objmgr_vdev *vdev)
 {
 	return false;
 }
+
+static inline
+void mlo_clear_bridge_sta_ctx(struct wlan_objmgr_vdev *vdev)
+{ }
 #endif
 /**
  * wlan_mlo_get_tdls_link_vdev() - API to get tdls link vdev
@@ -871,6 +895,10 @@ mlo_get_link_state_context(struct wlan_objmgr_psoc *psoc,
 			   get_ml_link_state_cb *resp_cb,
 			   void **context, uint8_t vdev_id);
 #else
+static inline
+void mlo_clear_bridge_sta_ctx(struct wlan_objmgr_vdev *vdev)
+{ }
+
 static inline
 void mlo_set_sta_ctx_bss_mld_addr(struct wlan_objmgr_vdev *vdev,
 				  struct qdf_mac_addr *bss_mld_addr)

+ 1 - 0
umac/mlo_mgr/src/wlan_mlo_mgr_sta.c

@@ -390,6 +390,7 @@ void mlo_mld_clear_mlo_cap(struct wlan_objmgr_vdev *vdev)
 		wlan_vdev_mlme_clear_mlo_vdev(mlo_dev_ctx->wlan_vdev_list[i]);
 		wlan_vdev_mlme_clear_mlo_link_vdev(mlo_dev_ctx->wlan_vdev_list[i]);
 	}
+	mlo_clear_bridge_sta_ctx(vdev);
 }
 
 void ucfg_mlo_mld_clear_mlo_cap(struct wlan_objmgr_vdev *vdev)