cfg_mlme_power.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. /*
  2. * Copyright (c) 2012-2019 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. * DOC: This file contains centralized definitions of converged configuration.
  20. */
  21. #ifndef __CFG_MLME_POWER_H
  22. #define __CFG_MLME_POWER_H
  23. /*
  24. * <cfg>
  25. * max_tx_power_24 - max tx power allowed for 2.4 ghz
  26. * @Min: 0 minimum length of tx power
  27. * @Max: default data length of tx power in string format
  28. * @Default: 1, 14, 20
  29. */
  30. #define CFG_MAX_TX_POWER_2_4_DATA "1, 14, 20"
  31. #define CFG_MAX_TX_POWER_2_4 CFG_STRING( \
  32. "max_tx_power_24", \
  33. 0, \
  34. sizeof(CFG_MAX_TX_POWER_2_4_DATA) - 1, \
  35. CFG_MAX_TX_POWER_2_4_DATA, \
  36. "max tx power 24")
  37. /*
  38. * <cfg>
  39. * max_tx_power_5 - max tx power allowed for 5 ghz
  40. * @Min: 0 minimum length of tx power
  41. * @Max: default data length of tx power in string format
  42. * @Default: 36, 126, 20
  43. */
  44. #define CFG_MAX_TX_POWER_5_DATA "36, 126, 20"
  45. #define CFG_MAX_TX_POWER_5 CFG_STRING( \
  46. "max_tx_power_5", \
  47. 0, \
  48. sizeof(CFG_MAX_TX_POWER_5_DATA) - 1, \
  49. CFG_MAX_TX_POWER_5_DATA, \
  50. "max tx power 5")
  51. /*
  52. * <ini>
  53. * gPowerUsage - power usage name
  54. * @Min: "Min" - minimum power usage
  55. * @Max: "Max" - maximum power usage
  56. * @Default: "Mod"
  57. *
  58. * Usage: Internal/External
  59. *
  60. * </ini>
  61. */
  62. #define CFG_POWER_USAGE CFG_INI_STRING( \
  63. "gPowerUsage", \
  64. 0, \
  65. 3, \
  66. "Mod", \
  67. "power usage")
  68. /*
  69. * <ini>
  70. * TxPower2g - Limit power in case of 2.4ghz
  71. * @Min: 0
  72. * @Max: 30
  73. * @Default: 30
  74. *
  75. * Usage: Internal/External
  76. *
  77. * </ini>
  78. */
  79. #define CFG_SET_TXPOWER_LIMIT2G CFG_INI_UINT( \
  80. "TxPower2g", \
  81. 0, \
  82. 30, \
  83. 30, \
  84. CFG_VALUE_OR_DEFAULT, \
  85. "power limit 2g")
  86. /*
  87. * <ini>
  88. * TxPower5g - Limit power in case of 5ghz
  89. * @Min: 0
  90. * @Max: 30
  91. * @Default: 30
  92. *
  93. * Usage: Internal/External
  94. *
  95. * </ini>
  96. */
  97. #define CFG_SET_TXPOWER_LIMIT5G CFG_INI_UINT( \
  98. "TxPower5g", \
  99. 0, \
  100. 30, \
  101. 30, \
  102. CFG_VALUE_OR_DEFAULT, \
  103. "power limit 5g")
  104. /*
  105. * <ini>
  106. * gTxPowerCap - WLAN max tx power
  107. * @Min: 0
  108. * @Max: 128
  109. * @Default: 128
  110. *
  111. * This ini is used to configure the device max tx power.
  112. *
  113. * Related: None.
  114. *
  115. * Supported Feature: Concurrency
  116. *
  117. * Usage: Internal/External
  118. *
  119. * </ini>
  120. */
  121. #define CFG_MAX_TX_POWER CFG_INI_UINT( \
  122. "gTxPowerCap", \
  123. 0, \
  124. 128, \
  125. 128, \
  126. CFG_VALUE_OR_DEFAULT, \
  127. "WLAN max tx power")
  128. /*
  129. * <cfg>
  130. * current_tx_power_level - current tx power level
  131. * @Min: 0
  132. * @Max: 128
  133. * @Default: 27
  134. */
  135. #define CFG_CURRENT_TX_POWER_LEVEL CFG_UINT( \
  136. "current_tx_power_level", \
  137. 0, \
  138. 128, \
  139. 27, \
  140. CFG_VALUE_OR_DEFAULT, \
  141. "current tx power level")
  142. /*
  143. * <cfg>
  144. * local_power_constraint - local power constraint
  145. * @Min: 0
  146. * @Max: 255
  147. * @Default: 0
  148. */
  149. #define CFG_LOCAL_POWER_CONSTRAINT CFG_UINT( \
  150. "local_power_constraint", \
  151. 0, \
  152. 255, \
  153. 0, \
  154. CFG_VALUE_OR_DEFAULT, \
  155. "local power constraint")
  156. #define CFG_MLME_POWER_ALL \
  157. CFG(CFG_MAX_TX_POWER_2_4) \
  158. CFG(CFG_MAX_TX_POWER_5) \
  159. CFG(CFG_POWER_USAGE) \
  160. CFG(CFG_SET_TXPOWER_LIMIT2G) \
  161. CFG(CFG_SET_TXPOWER_LIMIT5G) \
  162. CFG(CFG_MAX_TX_POWER) \
  163. CFG(CFG_CURRENT_TX_POWER_LEVEL) \
  164. CFG(CFG_LOCAL_POWER_CONSTRAINT)
  165. #endif /* __CFG_MLME_POWER_H */