cfg_nan.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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. #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. * genable_nan_datapath - Enable NaN data path feature. NaN data path
  52. * enables NAN supported devices to exchange
  53. * data over TCP/UDP network stack.
  54. * @Min: 0
  55. * @Max: 1
  56. * @Default: 0
  57. *
  58. * When set to 1 NAN Datapath feature will be enabled.
  59. *
  60. * Related: gEnableNanSupport
  61. *
  62. * Supported Feature: NAN
  63. *
  64. * Usage: External
  65. *
  66. * </ini>
  67. */
  68. #define CFG_NAN_DATAPATH_ENABLE CFG_INI_BOOL("genable_nan_datapath", \
  69. 0, \
  70. "Enable NAN Datapath support")
  71. /*
  72. * <ini>
  73. * gnan_datapath_ndi_channel - Default channel for NAN Datapath
  74. * @Min: 6
  75. * @Max: 149
  76. * @Default: 6
  77. *
  78. * Host suggests this channel for NAN datapath. But FW is free to
  79. * choose other channels based on system constraints.
  80. *
  81. * Related: genable_nan_datapath
  82. *
  83. * Supported Feature: NAN
  84. *
  85. * Usage: External
  86. *
  87. * </ini>
  88. */
  89. /*
  90. * NAN channel on which NAN data interface to start
  91. */
  92. #define CFG_NAN_NDI_CHANNEL CFG_INI_UINT("gnan_datapath_ndi_channel", \
  93. 6, 149, 6, \
  94. CFG_VALUE_OR_DEFAULT, \
  95. "NAN Datapath Channel")
  96. /*
  97. * <ini>
  98. * gEnableNDIMacRandomization - When enabled this will randomize NDI Mac
  99. * @Min: 0
  100. * @Max: 1
  101. * @Default: 1
  102. *
  103. * When enabled this will randomize NDI Mac
  104. *
  105. * Related: gEnableNanSupport
  106. *
  107. * Supported Feature: NAN
  108. *
  109. * Usage: External
  110. *
  111. * </ini>
  112. */
  113. #define CFG_NAN_RANDOMIZE_NDI_MAC CFG_INI_BOOL("gEnableNDIMacRandomization", \
  114. 1, \
  115. "Enable NAN MAC Randomization")
  116. #ifdef WLAN_FEATURE_NAN
  117. #define CFG_NAN_DISC CFG(CFG_NAN_ENABLE)
  118. #else
  119. #define CFG_NAN_DISC
  120. #endif
  121. #ifdef WLAN_FEATURE_NAN_DATAPATH
  122. #define CFG_NAN_DP CFG(CFG_NAN_DATAPATH_ENABLE) \
  123. CFG(CFG_NAN_NDI_CHANNEL) \
  124. CFG(CFG_NAN_RANDOMIZE_NDI_MAC)
  125. #else
  126. #define CFG_NAN_DP
  127. #endif
  128. #define CFG_NAN_ALL CFG_NAN_DISC \
  129. CFG_NAN_DP
  130. #endif