Browse Source

qcacmn: Don't return failure in MLO disconnect path for NULL assoc case

With MLO AP removal procedure, AP MLD can remove a link that happens to be
the assoc link for a given Non-AP MLD and the Non-AP MLD can continue to
function after that. In the existing implementation, Non-AP MLD is
returning failure in the MLO disconnect path if the assoc link is NULL, fix
the same.

Change-Id: Ib14c87da083a99f5350c9b73df2b31d08749ff0a
CRs-Fixed: 3604869
Shiva Krishna Pittala 1 year ago
parent
commit
91485c3e97
2 changed files with 14 additions and 1 deletions
  1. 13 0
      umac/mlo_mgr/inc/wlan_mlo_mgr_link_switch.h
  2. 1 1
      umac/mlo_mgr/src/wlan_mlo_mgr_sta.c

+ 13 - 0
umac/mlo_mgr/inc/wlan_mlo_mgr_link_switch.h

@@ -535,7 +535,20 @@ QDF_STATUS mlo_mgr_link_switch_init(struct wlan_mlo_dev_context *ml_dev);
  * Return: QDF_STATUS
  */
 QDF_STATUS mlo_mgr_link_switch_deinit(struct wlan_mlo_dev_context *ml_dev);
+
+static inline bool
+mlo_mgr_is_link_switch_supported(struct wlan_objmgr_vdev *vdev)
+{
+	return true;
+}
+
 #else
+static inline bool
+mlo_mgr_is_link_switch_supported(struct wlan_objmgr_vdev *vdev)
+{
+	return false;
+}
+
 static inline void
 mlo_mgr_osif_update_connect_info(struct wlan_objmgr_vdev *vdev, int32_t link_id)
 {

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

@@ -268,7 +268,7 @@ mlo_send_link_disconnect(struct wlan_objmgr_vdev *vdev,
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	if (!assoc_vdev) {
+	if (!assoc_vdev && mlo_mgr_is_link_switch_supported(vdev)) {
 		if (!wlan_mlo_mgr_is_link_switch_on_assoc_vdev(vdev))
 			return QDF_STATUS_E_FAILURE;