From 8aa751af593345d4316552feb6d28b771497e04e Mon Sep 17 00:00:00 2001 From: Subrat Mishra Date: Thu, 2 Mar 2017 12:24:49 +0530 Subject: [PATCH] qcacmn: API to expose vdev max_peer_count Adding a new API to expose vdev_objmgr.max_peer_count Change-Id: I674f4fe84abf49629199e6fe2c14c62893504cfa --- .../obj_mgr/inc/wlan_objmgr_vdev_obj.h | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_vdev_obj.h b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_vdev_obj.h index 80d902a3a73f..b2655ad2cc34 100644 --- a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_vdev_obj.h +++ b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_vdev_obj.h @@ -1461,4 +1461,38 @@ QDF_STATUS wlan_objmgr_vdev_try_get_ref(struct wlan_objmgr_vdev *vdev, void wlan_objmgr_vdev_release_ref(struct wlan_objmgr_vdev *vdev, wlan_objmgr_ref_dbgid id); +/** + * wlan_vdev_set_max_peer_count() - set max peer count + * @vdev: VDEV object + * @count: Max peer count + * + * API to set max peer count of VDEV + * + * Caller need to acquire lock with wlan_vdev_obj_lock() + * + * Return: void + */ +static inline void wlan_vdev_set_max_peer_count(struct wlan_objmgr_vdev *vdev, + uint16_t count) +{ + /* This API is invoked with lock acquired, do not add log prints */ + vdev->vdev_objmgr.max_peer_count = count; +} + +/** + * wlan_vdev_get_max_peer_count() - get max peer count + * @vdev: VDEV object + * + * API to get max peer count of VDEV + * + * Caller need to acquire lock with wlan_vdev_obj_lock() + * + * Return: max peer count + */ +static inline uint16_t wlan_vdev_get_max_peer_count( + struct wlan_objmgr_vdev *vdev) +{ + /* This API is invoked with lock acquired, do not add log prints */ + return vdev->vdev_objmgr.max_peer_count; +} #endif /* _WLAN_OBJMGR_VDEV_OBJ_H_*/