1*5113495bSYour Name /* 2*5113495bSYour Name * Copyright (c) 2018 The Linux Foundation. All rights reserved. 3*5113495bSYour Name * 4*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for 5*5113495bSYour Name * any purpose with or without fee is hereby granted, provided that the 6*5113495bSYour Name * above copyright notice and this permission notice appear in all 7*5113495bSYour Name * copies. 8*5113495bSYour Name * 9*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10*5113495bSYour Name * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11*5113495bSYour Name * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12*5113495bSYour Name * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13*5113495bSYour Name * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14*5113495bSYour Name * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15*5113495bSYour Name * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16*5113495bSYour Name * PERFORMANCE OF THIS SOFTWARE. 17*5113495bSYour Name */ 18*5113495bSYour Name 19*5113495bSYour Name /** 20*5113495bSYour Name * DOC: This file contains various object manager related wrappers and helpers 21*5113495bSYour Name */ 22*5113495bSYour Name 23*5113495bSYour Name #ifndef __CFG_OBJMGR_H 24*5113495bSYour Name #define __CFG_OBJMGR_H 25*5113495bSYour Name 26*5113495bSYour Name #include "wlan_cmn.h" 27*5113495bSYour Name #include "wlan_objmgr_global_obj.h" 28*5113495bSYour Name #include "wlan_objmgr_psoc_obj.h" 29*5113495bSYour Name 30*5113495bSYour Name /* Private Data */ 31*5113495bSYour Name 32*5113495bSYour Name #define cfg_psoc_get_priv(psoc) \ 33*5113495bSYour Name wlan_objmgr_psoc_get_comp_private_obj((psoc), WLAN_UMAC_COMP_CONFIG) 34*5113495bSYour Name #define cfg_psoc_set_priv(psoc, priv) \ 35*5113495bSYour Name wlan_objmgr_psoc_component_obj_attach((psoc), WLAN_UMAC_COMP_CONFIG, \ 36*5113495bSYour Name (priv), QDF_STATUS_SUCCESS) 37*5113495bSYour Name #define cfg_psoc_unset_priv(psoc, priv) \ 38*5113495bSYour Name wlan_objmgr_psoc_component_obj_detach((psoc), WLAN_UMAC_COMP_CONFIG, \ 39*5113495bSYour Name (priv)) 40*5113495bSYour Name 41*5113495bSYour Name /* event registration */ 42*5113495bSYour Name 43*5113495bSYour Name #define cfg_psoc_register_create(callback) \ 44*5113495bSYour Name wlan_objmgr_register_psoc_create_handler(WLAN_UMAC_COMP_CONFIG, \ 45*5113495bSYour Name (callback), NULL) 46*5113495bSYour Name #define cfg_psoc_register_destroy(callback) \ 47*5113495bSYour Name wlan_objmgr_register_psoc_destroy_handler(WLAN_UMAC_COMP_CONFIG, \ 48*5113495bSYour Name (callback), NULL) 49*5113495bSYour Name 50*5113495bSYour Name /* event de-registration */ 51*5113495bSYour Name 52*5113495bSYour Name #define cfg_psoc_unregister_create(callback) \ 53*5113495bSYour Name wlan_objmgr_unregister_psoc_create_handler(WLAN_UMAC_COMP_CONFIG, \ 54*5113495bSYour Name (callback), NULL) 55*5113495bSYour Name #define cfg_psoc_unregister_destroy(callback) \ 56*5113495bSYour Name wlan_objmgr_unregister_psoc_destroy_handler(WLAN_UMAC_COMP_CONFIG, \ 57*5113495bSYour Name (callback), NULL) 58*5113495bSYour Name 59*5113495bSYour Name #endif /* __CFG_OBJMGR_H */ 60