qdf_module.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. /**
  20. * DOC: qdf_module.h
  21. * This file abstracts "kernel module" semantics.
  22. */
  23. #ifndef _QDF_MODULE_H
  24. #define _QDF_MODULE_H
  25. #include <i_qdf_module.h>
  26. typedef uint32_t (*module_init_func_t)(void);
  27. /**
  28. * qdf_virt_module_init - Specify the module's entry point.
  29. * @_mod_init_func: module entry function
  30. */
  31. #define qdf_virt_module_init(_mod_init_func) \
  32. __qdf_virt_module_init(_mod_init_func)
  33. /**
  34. * qdf_virt_module_exit() - Specify the module's exit point.
  35. * @_mod_exit_func: module exit function
  36. */
  37. #define qdf_virt_module_exit(_mod_exit_func) \
  38. __qdf_virt_module_exit(_mod_exit_func)
  39. /**
  40. * qdf_virt_module_name() - Specify the module's name.
  41. * @_name: module name
  42. */
  43. #define qdf_virt_module_name(_name) __qdf_virt_module_name(_name)
  44. /**
  45. * qdf_export_symbol() - Export a symbol from a module.
  46. * @_sym: symbol to export
  47. */
  48. #define qdf_export_symbol(_sym) __qdf_export_symbol(_sym)
  49. /**
  50. * qdf_declare_param() - Declare a module parameter.
  51. * @name: name of the parameter
  52. * @_type: type of the parameter
  53. */
  54. #define qdf_declare_param(name, _type) __qdf_declare_param(name, _type)
  55. /**
  56. * qdf_declare_param_array() - Declare a module parameter that is an array
  57. * @name: name of the array
  58. * @_type: type of the array element
  59. * @_num: number of entries written
  60. */
  61. #define qdf_declare_param_array(name, _type, _num) \
  62. __qdf_declare_param_array(name, _type, _num)
  63. #endif /*_QDF_MODULE_H*/