1 /* 2 * Copyright (c) 2016,2018 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 /** 19 * DOC: Public APIs to perform operations on VDEV objects 20 */ 21 #ifndef _WLAN_OBJMGR_VDEV_OBJ_I_H_ 22 #define _WLAN_OBJMGR_VDEV_OBJ_I_H_ 23 24 /** 25 * wlan_objmgr_for_each_vdev_peer() - iterate over each peer for @vdev 26 * @vdev: the vdev whose peers should be iterated 27 * @peer: peer object cursor 28 * 29 * Note: The caller is responsible for grabbing @vdev's object lock before 30 * using this iterator 31 */ 32 #define wlan_objmgr_for_each_vdev_peer(vdev, peer) \ 33 qdf_list_for_each(&(vdev)->vdev_objmgr.wlan_peer_list, peer, vdev_peer) 34 35 /** 36 * wlan_objmgr_vdev_peer_attach() - attach peer to vdev peer list 37 * @vdev: VDEV object 38 * @peer: PEER object 39 * 40 * Attaches PEER to VDEV, stores it in VDEV's peer list 41 * 42 * Return: SUCCESS 43 * Failure (Max PEERs are exceeded) 44 */ 45 QDF_STATUS wlan_objmgr_vdev_peer_attach(struct wlan_objmgr_vdev *vdev, 46 struct wlan_objmgr_peer *peer); 47 48 /** 49 * wlan_objmgr_vdev_peer_detach() - detach peer from vdev peer list 50 * @vdev: VDEV object 51 * @peer: PEER object 52 * 53 * detaches PEER from VDEV's peer list 54 * 55 * Return: SUCCESS 56 * Failure (No PEERs are present) 57 */ 58 QDF_STATUS wlan_objmgr_vdev_peer_detach(struct wlan_objmgr_vdev *vdev, 59 struct wlan_objmgr_peer *peer); 60 61 #endif /* _WLAN_OBJMGR_VDEV_OBJ_I_H_*/ 62