cfg_nan.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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_H__)
  19. #define __NAN_CFG_H__
  20. /**
  21. *
  22. * DOC: nan_cfg.h
  23. *
  24. * NAN feature INI configuration parameter definitions
  25. */
  26. #include "cfg_define.h"
  27. #include "cfg_converged.h"
  28. #include "qdf_types.h"
  29. /*
  30. * <ini>
  31. * gEnableNanSupport - NAN feature support configuration
  32. * @Min: 0
  33. * @Max: 1
  34. * @Default: 0
  35. *
  36. * When set to 1 NAN feature will be enabled.
  37. *
  38. * Related: None
  39. *
  40. * Supported Feature: NAN
  41. *
  42. * Usage: External
  43. *
  44. * </ini>
  45. */
  46. #define CFG_NAN_ENABLE CFG_INI_BOOL("gEnableNanSupport", \
  47. 0, \
  48. "Enable NAN Support")
  49. /*
  50. * <ini>
  51. * nan_separate_iface_support: Separate iface creation for NAN
  52. * @Min: 0
  53. * @Max: 1
  54. * @Default: 1
  55. *
  56. * Value is 1 when Host HDD supports separate iface creation
  57. * for NAN.
  58. *
  59. * Related: None
  60. *
  61. * Supported Feature: NAN
  62. *
  63. * Usage: External
  64. *
  65. * </ini>
  66. */
  67. #define CFG_NAN_SEPARATE_IFACE_SUPP CFG_INI_BOOL("nan_separate_iface_support", \
  68. 0, \
  69. "Seperate iface for NAN")
  70. /*
  71. * <ini>
  72. * genable_nan_datapath - Enable NaN data path feature. NaN data path
  73. * enables NAN supported devices to exchange
  74. * data over TCP/UDP network stack.
  75. * @Min: 0
  76. * @Max: 1
  77. * @Default: 0
  78. *
  79. * When set to 1 NAN Datapath feature will be enabled.
  80. *
  81. * Related: gEnableNanSupport
  82. *
  83. * Supported Feature: NAN
  84. *
  85. * Usage: External
  86. *
  87. * </ini>
  88. */
  89. #define CFG_NAN_DATAPATH_ENABLE CFG_INI_BOOL("genable_nan_datapath", \
  90. 0, \
  91. "Enable NAN Datapath support")
  92. /*
  93. * <ini>
  94. * gEnableNDIMacRandomization - When enabled this will randomize NDI Mac
  95. * @Min: 0
  96. * @Max: 1
  97. * @Default: 1
  98. *
  99. * When enabled this will randomize NDI Mac
  100. *
  101. * Related: gEnableNanSupport
  102. *
  103. * Supported Feature: NAN
  104. *
  105. * Usage: External
  106. *
  107. * </ini>
  108. */
  109. #define CFG_NAN_RANDOMIZE_NDI_MAC CFG_INI_BOOL("gEnableNDIMacRandomization", \
  110. 1, \
  111. "Enable NAN MAC Randomization")
  112. /*
  113. * <ini>
  114. * ndp_inactivity_timeout - To configure duration of how many seconds
  115. * without TX/RX data traffic, NDI vdev can kickout the connected
  116. * peer(i.e. NDP Termination).
  117. *
  118. * @Min: 0
  119. * @Max: 1800
  120. * @Default: 60
  121. *
  122. * Related: None
  123. *
  124. * Supported Feature: NAN
  125. *
  126. * Usage: External
  127. *
  128. * </ini>
  129. */
  130. #define CFG_NAN_NDP_INACTIVITY_TIMEOUT CFG_INI_UINT("ndp_inactivity_timeout", \
  131. 0, \
  132. 1800, \
  133. 60, \
  134. CFG_VALUE_OR_DEFAULT, \
  135. "NDP Auto Terminate time")
  136. #ifdef WLAN_FEATURE_NAN
  137. #define CFG_NAN_DISC CFG(CFG_NAN_ENABLE)
  138. #define CFG_NAN_DP CFG(CFG_NAN_DATAPATH_ENABLE) \
  139. CFG(CFG_NAN_RANDOMIZE_NDI_MAC) \
  140. CFG(CFG_NAN_NDP_INACTIVITY_TIMEOUT) \
  141. CFG(CFG_NAN_SEPARATE_IFACE_SUPP)
  142. #else
  143. #define CFG_NAN_DISC
  144. #define CFG_NAN_DP
  145. #endif
  146. #define CFG_NAN_ALL CFG_NAN_DISC \
  147. CFG_NAN_DP
  148. #endif