i_cfg_objmgr.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright (c) 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: This file contains various object manager related wrappers and helpers
  20. */
  21. #ifndef __CFG_OBJMGR_H
  22. #define __CFG_OBJMGR_H
  23. #include "wlan_cmn.h"
  24. #include "wlan_objmgr_global_obj.h"
  25. #include "wlan_objmgr_psoc_obj.h"
  26. /* Private Data */
  27. #define cfg_psoc_get_priv(psoc) \
  28. wlan_objmgr_psoc_get_comp_private_obj((psoc), WLAN_UMAC_COMP_CONFIG)
  29. #define cfg_psoc_set_priv(psoc, priv) \
  30. wlan_objmgr_psoc_component_obj_attach((psoc), WLAN_UMAC_COMP_CONFIG, \
  31. (priv), QDF_STATUS_SUCCESS)
  32. #define cfg_psoc_unset_priv(psoc, priv) \
  33. wlan_objmgr_psoc_component_obj_detach((psoc), WLAN_UMAC_COMP_CONFIG, \
  34. (priv))
  35. /* event registration */
  36. #define cfg_psoc_register_create(callback) \
  37. wlan_objmgr_register_psoc_create_handler(WLAN_UMAC_COMP_CONFIG, \
  38. (callback), NULL)
  39. #define cfg_psoc_register_destroy(callback) \
  40. wlan_objmgr_register_psoc_destroy_handler(WLAN_UMAC_COMP_CONFIG, \
  41. (callback), NULL)
  42. /* event de-registration */
  43. #define cfg_psoc_unregister_create(callback) \
  44. wlan_objmgr_unregister_psoc_create_handler(WLAN_UMAC_COMP_CONFIG, \
  45. (callback), NULL)
  46. #define cfg_psoc_unregister_destroy(callback) \
  47. wlan_objmgr_unregister_psoc_destroy_handler(WLAN_UMAC_COMP_CONFIG, \
  48. (callback), NULL)
  49. #endif /* __CFG_OBJMGR_H */