cfg_nan_api.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*
  2. * Copyright (c) 2018-2020 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. #if !defined(__NAN_CFG_API_H__)
  19. #define __NAN_CFG_API_H__
  20. /**
  21. *
  22. * DOC: nan_cfg_api.h
  23. *
  24. * NAN feature INI configuration parameters get/set APIs
  25. */
  26. #include "qdf_types.h"
  27. struct wlan_objmgr_psoc;
  28. #ifdef WLAN_FEATURE_NAN
  29. /**
  30. * cfg_nan_get_enable() - get NAN support enable status
  31. * @psoc: pointer to psoc object
  32. *
  33. * This function returns NAN enable status
  34. */
  35. bool cfg_nan_get_enable(struct wlan_objmgr_psoc *psoc);
  36. /**
  37. * cfg_nan_get_datapath_enable() - get NAN Datapath support enable status
  38. * @psoc: pointer to psoc object
  39. *
  40. * This function returns NAN Datapath enable status
  41. */
  42. bool cfg_nan_get_datapath_enable(struct wlan_objmgr_psoc *psoc);
  43. /**
  44. * cfg_nan_get_ndi_mac_randomize() - get NDI MAC randomize enable status
  45. * @psoc: pointer to psoc object
  46. *
  47. * This function returns NAN Datapath Interface MAC randomization status
  48. */
  49. bool cfg_nan_get_ndi_mac_randomize(struct wlan_objmgr_psoc *psoc);
  50. /**
  51. * cfg_nan_get_ndp_inactivity_timeout() - get NDP inactivity timeout value
  52. * @psoc: pointer to psoc object
  53. * @val: pointer to the value where inactivity timeout has to be copied to
  54. *
  55. * Return: QDF_STATUS
  56. */
  57. QDF_STATUS cfg_nan_get_ndp_inactivity_timeout(struct wlan_objmgr_psoc *psoc,
  58. uint16_t *val);
  59. /**
  60. * cfg_nan_get_ndp_keepalive_period() - get NDP keepalive period
  61. * @psoc: pointer to psoc object
  62. * @val: pointer to the value where keepalive period has to be copied to
  63. *
  64. * Return: QDF_STATUS
  65. */
  66. QDF_STATUS cfg_nan_get_ndp_keepalive_period(struct wlan_objmgr_psoc *psoc,
  67. uint16_t *val);
  68. /**
  69. * cfg_nan_get_support_mp0_discovery() - get value of config support mp0
  70. * discovery
  71. * @psoc: pointer to psoc object
  72. *
  73. * Return: Value of config join clustur with mp
  74. */
  75. bool cfg_nan_get_support_mp0_discovery(struct wlan_objmgr_psoc *psoc);
  76. #else
  77. static inline bool cfg_nan_get_enable(struct wlan_objmgr_psoc *psoc)
  78. {
  79. return false;
  80. }
  81. static inline bool cfg_nan_get_datapath_enable(struct wlan_objmgr_psoc *psoc)
  82. {
  83. return false;
  84. }
  85. static inline bool cfg_nan_get_ndi_mac_randomize(struct wlan_objmgr_psoc *psoc)
  86. {
  87. return false;
  88. }
  89. static inline
  90. QDF_STATUS cfg_nan_get_ndp_inactivity_timeout(struct wlan_objmgr_psoc *psoc,
  91. uint16_t *val)
  92. {
  93. return QDF_STATUS_SUCCESS;
  94. }
  95. static inline
  96. QDF_STATUS cfg_nan_get_ndp_keepalive_period(struct wlan_objmgr_psoc *psoc,
  97. uint16_t *val)
  98. {
  99. return QDF_STATUS_SUCCESS;
  100. }
  101. static inline bool cfg_nan_get_support_mp0_discovery(
  102. struct wlan_objmgr_psoc *psoc)
  103. {
  104. return false;
  105. }
  106. #endif
  107. #endif