cfg_mlme_power.h 4.0 KB

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