Эх сурвалжийг харах

qcacmn: Add API to check if VDEV is in UP_ACTIVE state

With the addition of MLO_SYNC_WAIT substate, now the active status
of the VDEV will be indicated by ACTIVE substate under UP state.

Add API to check if a given vdev is in UP_ACTIVE state.

Change-Id: Ia858765b07582f89e0eaa041d56c7f2aae6f1528
CRs-Fixed: 2924322
Santosh Anbu 4 жил өмнө
parent
commit
8394348196

+ 12 - 1
umac/mlme/vdev_mgr/dispatcher/inc/wlan_vdev_mlme_api.h

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2018-2019, 2021 The Linux Foundation. All rights reserved.
  *
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * purpose with or without fee is hereby granted, provided that the above
@@ -220,4 +220,15 @@ QDF_STATUS wlan_vdev_mlme_is_scan_allowed(struct wlan_objmgr_vdev *vdev);
  *         FAILURE: otherwise failure
  *         FAILURE: otherwise failure
  */
  */
 QDF_STATUS wlan_vdev_mlme_is_init_state(struct wlan_objmgr_vdev *vdev);
 QDF_STATUS wlan_vdev_mlme_is_init_state(struct wlan_objmgr_vdev *vdev);
+
+/**
+ * wlan_vdev_is_up_active_state() - Checks whether vdev is in up active state
+ * @vdev: Object manager VDEV object
+ *
+ * API to checks the VDEV MLME SM state is in UP ACTIVE state
+ *
+ * Return: SUCCESS: if vdev is in UP ACTIVE state
+ *         FAILURE: otherwise failure
+ */
+QDF_STATUS wlan_vdev_is_up_active_state(struct wlan_objmgr_vdev *vdev);
 #endif
 #endif

+ 13 - 0
umac/mlme/vdev_mgr/dispatcher/src/wlan_vdev_mlme_api.c

@@ -297,3 +297,16 @@ QDF_STATUS wlan_vdev_mlme_is_init_state(struct wlan_objmgr_vdev *vdev)
 
 
 	return QDF_STATUS_E_FAILURE;
 	return QDF_STATUS_E_FAILURE;
 }
 }
+
+QDF_STATUS wlan_vdev_is_up_active_state(struct wlan_objmgr_vdev *vdev)
+{
+	enum wlan_vdev_state state;
+	enum wlan_vdev_state substate;
+
+	state = wlan_vdev_mlme_get_state(vdev);
+	substate = wlan_vdev_mlme_get_substate(vdev);
+	if (state == WLAN_VDEV_S_UP && substate == WLAN_VDEV_SS_UP_ACTIVE)
+		return QDF_STATUS_SUCCESS;
+
+	return QDF_STATUS_E_FAILURE;
+}