cfg_mlme_fe_wlm.h 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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_FE_WLM_H
  22. #define __CFG_MLME_FE_WLM_H
  23. /*
  24. * <ini>
  25. * wlm_latency_enable - WLM latency Enable
  26. *
  27. * @min: 0
  28. * @max: 1
  29. * @default: 0
  30. *
  31. * 0 - disable
  32. * 1 - enable
  33. *
  34. * </ini>
  35. */
  36. #define CFG_LATENCY_ENABLE CFG_INI_BOOL("wlm_latency_enable", \
  37. 1, \
  38. "WLM latency Enable")
  39. /*
  40. * <ini>
  41. * wlm_latency_level - WLM latency level
  42. * Define 4 latency level to gain latency
  43. *
  44. * @min: 0
  45. * @max: 3
  46. * @defalut: 0
  47. *
  48. * 0 - normal
  49. * 1 - moderate
  50. * 2 - low
  51. * 3 - ultralow
  52. *
  53. * </ini>
  54. */
  55. #define CFG_LATENCY_LEVEL CFG_INI_UINT("wlm_latency_level", \
  56. 0, \
  57. 3, \
  58. 0, \
  59. CFG_VALUE_OR_DEFAULT, \
  60. "WLM latency level")
  61. /*
  62. * <ini>
  63. * wlm_latency_flags_normal - WLM flags setting for normal level
  64. *
  65. * @min: 0x0
  66. * @max: 0xffffffff
  67. * @defalut: 0x0
  68. *
  69. * |31 12| 11 | 10 |9 8|7 6|5 4|3 2| 1 | 0 |
  70. * +------+------+------+------+------+------+------+-----+-----+
  71. * | RSVD | SSLP | CSLP | RSVD | Roam | RSVD | DWLT | DFS | SUP |
  72. * +------+-------------+-------------+-------------------------+
  73. * | WAL | PS | Roam | Scan |
  74. *
  75. * bit 0: Avoid scan request from HLOS if setting
  76. * bit 1: Skip DFS channel SCAN if setting
  77. * bit 2-3: Define policy of dwell time/duration for each foreign channel
  78. * (b2 b3)
  79. * (0 0 ): Default scan dwell time
  80. * (0 1 ): Reserve
  81. * (1 0 ): Shrink off channel dwell time
  82. * (1 1 ): Reserve
  83. * bit 4-5: Reserve for scan
  84. * bit 6-7: Define roaming policy
  85. * (b6 b7)
  86. * (0 0 ): Default roaming behavior, allow roaming in all scenarios
  87. * (0 1 ): Disallow all roaming
  88. * (1 0 ): Allow roaming when final bmissed
  89. * (1 1 ): Reserve
  90. * bit 8-9: Reserve for roaming
  91. * bit 10: Disable css power collapse if setting
  92. * bit 11: Disable sys sleep if setting
  93. * bit 12-31: Reserve for future useage
  94. *
  95. * </ini>
  96. */
  97. #define CFG_LATENCY_FLAGS_NORMAL CFG_INI_UINT("wlm_latency_flags_normal", \
  98. 0, \
  99. 0xffffffff, \
  100. 0, \
  101. CFG_VALUE_OR_DEFAULT, \
  102. "WLM flag setting for normal lvl")
  103. /*
  104. * <ini>
  105. * wlm_latency_flags_moderate - WLM flags setting for moderate level
  106. *
  107. * @min: 0x0
  108. * @max: 0xffffffff
  109. * @defalut: 0x8
  110. *
  111. * |31 12| 11 | 10 |9 8|7 6|5 4|3 2| 1 | 0 |
  112. * +------+------+------+------+------+------+------+-----+-----+
  113. * | RSVD | SSLP | CSLP | RSVD | Roam | RSVD | DWLT | DFS | SUP |
  114. * +------+-------------+-------------+-------------------------+
  115. * | WAL | PS | Roam | Scan |
  116. *
  117. * bit 0: Avoid scan request from HLOS if setting
  118. * bit 1: Skip DFS channel SCAN if setting
  119. * bit 2-3: Define policy of dwell time/duration for each foreign channel
  120. * (b2 b3)
  121. * (0 0 ): Default scan dwell time
  122. * (0 1 ): Reserve
  123. * (1 0 ): Shrink off channel dwell time
  124. * (1 1 ): Reserve
  125. * bit 4-5: Reserve for scan
  126. * bit 6-7: Define roaming policy
  127. * (b6 b7)
  128. * (0 0 ): Default roaming behavior, allow roaming in all scenarios
  129. * (0 1 ): Disallow all roaming
  130. * (1 0 ): Allow roaming when final bmissed
  131. * (1 1 ): Reserve
  132. * bit 8-9: Reserve for roaming
  133. * bit 10: Disable css power collapse if setting
  134. * bit 11: Disable sys sleep if setting
  135. * bit 12-31: Reserve for future useage
  136. *
  137. * </ini>
  138. */
  139. #define CFG_LATENCY_FLAGS_MOD CFG_INI_UINT("wlm_latency_flags_moderate", \
  140. 0, \
  141. 0xffffffff, \
  142. 0x8, \
  143. CFG_VALUE_OR_DEFAULT, \
  144. "WLM flag setting for moderate lvl")
  145. /*
  146. * <ini>
  147. * wlm_latency_flags_low - WLM flags setting for low level
  148. *
  149. * @min: 0x0
  150. * @max: 0xffffffff
  151. * @defalut: 0xa
  152. *
  153. * |31 12| 11 | 10 |9 8|7 6|5 4|3 2| 1 | 0 |
  154. * +------+------+------+------+------+------+------+-----+-----+
  155. * | RSVD | SSLP | CSLP | RSVD | Roam | RSVD | DWLT | DFS | SUP |
  156. * +------+-------------+-------------+-------------------------+
  157. * | WAL | PS | Roam | Scan |
  158. *
  159. * bit 0: Avoid scan request from HLOS if setting
  160. * bit 1: Skip DFS channel SCAN if setting
  161. * bit 2-3: Define policy of dwell time/duration for each foreign channel
  162. * (b2 b3)
  163. * (0 0 ): Default scan dwell time
  164. * (0 1 ): Reserve
  165. * (1 0 ): Shrink off channel dwell time
  166. * (1 1 ): Reserve
  167. * bit 4-5: Reserve for scan
  168. * bit 6-7: Define roaming policy
  169. * (b6 b7)
  170. * (0 0 ): Default roaming behavior, allow roaming in all scenarios
  171. * (0 1 ): Disallow all roaming
  172. * (1 0 ): Allow roaming when final bmissed
  173. * (1 1 ): Reserve
  174. * bit 8-9: Reserve for roaming
  175. * bit 10: Disable css power collapse if setting
  176. * bit 11: Disable sys sleep if setting
  177. * bit 12-31: Reserve for future useage
  178. *
  179. * </ini>
  180. */
  181. #define CFG_LATENCY_FLAGS_LOW CFG_INI_UINT("wlm_latency_flags_low", \
  182. 0, \
  183. 0xffffffff, \
  184. 0xa, \
  185. CFG_VALUE_OR_DEFAULT, \
  186. "WLM flags setting for low level")
  187. /*
  188. * <ini>
  189. * wlm_latency_flags_ultralow - WLM flags setting for ultralow level
  190. *
  191. * @min: 0x0
  192. * @max: 0xffffffff
  193. * @defalut: 0xc8a
  194. *
  195. * |31 12| 11 | 10 |9 8|7 6|5 4|3 2| 1 | 0 |
  196. * +------+------+------+------+------+------+------+-----+-----+
  197. * | RSVD | SSLP | CSLP | RSVD | Roam | RSVD | DWLT | DFS | SUP |
  198. * +------+-------------+-------------+-------------------------+
  199. * | WAL | PS | Roam | Scan |
  200. *
  201. * bit 0: Avoid scan request from HLOS if setting
  202. * bit 1: Skip DFS channel SCAN if setting
  203. * bit 2-3: Define policy of dwell time/duration for each foreign channel
  204. * (b2 b3)
  205. * (0 0 ): Default scan dwell time
  206. * (0 1 ): Reserve
  207. * (1 0 ): Shrink off channel dwell time
  208. * (1 1 ): Reserve
  209. * bit 4-5: Reserve for scan
  210. * bit 6-7: Define roaming policy
  211. * (b6 b7)
  212. * (0 0 ): Default roaming behavior, allow roaming in all scenarios
  213. * (0 1 ): Disallow all roaming
  214. * (1 0 ): Allow roaming when final bmissed
  215. * (1 1 ): Reserve
  216. * bit 8-9: Reserve for roaming
  217. * bit 10: Disable css power collapse if setting
  218. * bit 11: Disable sys sleep if setting
  219. * bit 12-31: Reserve for future useage
  220. *
  221. * </ini>
  222. */
  223. #define CFG_LATENCY_FLAGS_ULTLOW CFG_INI_UINT("wlm_latency_flags_ultralow",\
  224. 0, \
  225. 0xffffffff, \
  226. 0xc8a, \
  227. CFG_VALUE_OR_DEFAULT, \
  228. "WLM flags for ultralow level")
  229. #define CFG_FE_WLM_ALL \
  230. CFG(CFG_LATENCY_ENABLE) \
  231. CFG(CFG_LATENCY_LEVEL) \
  232. CFG(CFG_LATENCY_FLAGS_NORMAL) \
  233. CFG(CFG_LATENCY_FLAGS_MOD) \
  234. CFG(CFG_LATENCY_FLAGS_LOW) \
  235. CFG(CFG_LATENCY_FLAGS_ULTLOW)
  236. #endif /* __CFG_MLME_FE_WLM_H */