qdf_module.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Copyright (c) 2014-2017 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. * @file qdf_module.h
  20. * This file abstracts "kernel module" semantics.
  21. */
  22. #ifndef _QDF_MODULE_H
  23. #define _QDF_MODULE_H
  24. #include <i_qdf_module.h>
  25. typedef uint32_t (*module_init_func_t)(void);
  26. /**
  27. * qdf_virt_module_init - Specify the module's entry point.
  28. */
  29. #define qdf_virt_module_init(_mod_init_func) \
  30. __qdf_virt_module_init(_mod_init_func)
  31. /**
  32. * qdf_virt_module_exit - Specify the module's exit point.
  33. */
  34. #define qdf_virt_module_exit(_mod_exit_func) \
  35. __qdf_virt_module_exit(_mod_exit_func)
  36. /**
  37. * qdf_virt_module_name - Specify the module's name.
  38. */
  39. #define qdf_virt_module_name(_name) __qdf_virt_module_name(_name)
  40. /**
  41. * qdf_export_symbol - Export a symbol from a module.
  42. */
  43. #define qdf_export_symbol(_sym) __qdf_export_symbol(_sym)
  44. /**
  45. * qdf_declare_param - Declare a module parameter.
  46. */
  47. #define qdf_declare_param(name, _type) __qdf_declare_param(name, _type)
  48. /**
  49. * qdf_declare_param_array - Declare a module parameter.
  50. */
  51. #define qdf_declare_param_array(name, _type, _num) \
  52. __qdf_declare_param_array(name, _type, _num)
  53. #endif /*_QDF_MODULE_H*/