cfg_mlme_reg.h 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. /*
  2. * Copyright (c) 2012-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. /**
  19. * DOC: This file contains configuration definitions for MLME REG.
  20. */
  21. #ifndef CFG_MLME_REG_H__
  22. #define CFG_MLME_REG_H__
  23. /*
  24. * <ini>
  25. * gSelfGenFrmPwr - self-generated frame power in tx chain mask
  26. * for CCK rates
  27. * @Min: 0
  28. * @Max: 0xffff
  29. * @Default: 0
  30. *
  31. * gSelfGenFrmPwr is to set self-generated frame power in tx chain mask
  32. * for CCK rates
  33. *
  34. * Related: None
  35. *
  36. * Supported Feature: STA
  37. *
  38. * Usage: Internal/External
  39. *
  40. * </ini>
  41. */
  42. #define CFG_SELF_GEN_FRM_PWR CFG_INI_UINT( \
  43. "gSelfGenFrmPwr", \
  44. 0, \
  45. 0xffff, \
  46. 0, \
  47. CFG_VALUE_OR_DEFAULT, \
  48. "set the self gen power value")
  49. /*
  50. * <ini>
  51. * enable_11d_in_world_mode - enable 11d in world mode
  52. * @Min: 0
  53. * @Max: 1
  54. * @Default: 0
  55. *
  56. * This ini enables 11d in world mode, irrespective of value of
  57. * g11dSupportEnabled
  58. *
  59. * Usage: External
  60. *
  61. * </ini>
  62. */
  63. #define CFG_ENABLE_11D_IN_WORLD_MODE CFG_INI_BOOL( \
  64. "enable_11d_in_world_mode", \
  65. 0, \
  66. "enable 11d in world mode")
  67. /*
  68. * <ini>
  69. * etsi_srd_chan_in_master_mode - Enable/disable ETSI SRD channels in
  70. * master mode PCL and ACS functionality
  71. * @Min: 0
  72. * @Max: 0xFF
  73. * @Default: 6
  74. *
  75. * etsi_srd_chan_in_master_mode is to enable/disable ETSI SRD channels in
  76. * master mode PCL and ACS functionality
  77. * Bit map for enabling the SRD mode in various modes are as follows:-
  78. * BIT 0:- Enable/Disable SRD channels for SAP.
  79. * BIT 1:- Enable/Disable SRD channels for P2P-GO.
  80. * BIT 2:- Enable/Disable SRD channels for NAN.
  81. * Rest of the bits are currently reserved for future SRD channel support for
  82. * other vdevs.
  83. *
  84. * Related: None
  85. *
  86. * Supported Feature: SAP/P2P-GO
  87. *
  88. * Usage: Internal/External
  89. *
  90. * </ini>
  91. */
  92. #define CFG_ETSI_SRD_CHAN_IN_MASTER_MODE CFG_INI_UINT( \
  93. "etsi13_srd_chan_in_master_mode", \
  94. 0, \
  95. 0xff, \
  96. 6, \
  97. CFG_VALUE_OR_DEFAULT, \
  98. "enable/disable ETSI SRD channels in master mode")
  99. /*
  100. * <ini>
  101. * fcc_5dot9_ghz_chan_in_master_mode - Enable/disable 5.9 GHz channels in
  102. * master mode for US
  103. * @Min: 0
  104. * @Max: 1
  105. * @Default: 0
  106. *
  107. * fcc_5dot9_ghz_chan_in_master_mode is to enable/disable 5.9 GHz channels
  108. * in master mode for FCC reg domain
  109. *
  110. * Related: None
  111. *
  112. * Supported Feature: SAP/P2P-GO
  113. *
  114. * Usage: Internal/External
  115. *
  116. * </ini>
  117. */
  118. #define CFG_FCC_5DOT9_GHZ_CHAN_IN_MASTER_MODE CFG_INI_BOOL( \
  119. "fcc_5dot9_ghz_chan_in_master_mode", \
  120. 0, \
  121. "enable/disable FCC 5.9 GHz channels in master mode")
  122. #ifdef SAP_AVOID_ACS_FREQ_LIST
  123. #define SAP_AVOID_ACS_FREQ_LIST_DEFAULT ""
  124. /*
  125. * <ini>
  126. * sap_avoid_acs_freq_list - Avoid configured frequencies from acs
  127. * @Default: No frequencies are configured, it means consider all
  128. * the frequencies for acs
  129. *
  130. * This ini is to configure the frequencies which needs to be
  131. * avoided during acs and sap will not come up on these channels
  132. * Ex: sap_avoid_acs_freq_list=2412,2417,2422,2427,2467,2472
  133. *
  134. * Related: Feature flag SAP_AVOID_ACS_FREQ_LIST
  135. *
  136. * Supported Feature: SAP
  137. *
  138. * Usage: External
  139. *
  140. * </ini>
  141. */
  142. #define CFG_SAP_AVOID_ACS_FREQ_LIST CFG_INI_STRING( \
  143. "sap_avoid_acs_freq_list", \
  144. 0, \
  145. CFG_VALID_CHANNEL_LIST_STRING_LEN, \
  146. SAP_AVOID_ACS_FREQ_LIST_DEFAULT, \
  147. "Avoid configured frequencies during acs")
  148. #define CFG_SAP_AVOID_ACS_FREQ_LIST_ALL CFG(CFG_SAP_AVOID_ACS_FREQ_LIST)
  149. #else
  150. #define CFG_SAP_AVOID_ACS_FREQ_LIST_ALL
  151. #endif
  152. /*
  153. * <ini>
  154. * restart_beaconing_on_chan_avoid_event - control the beaconing entity to move
  155. * away from active LTE channels
  156. * @Min: 0
  157. * @Max: 2
  158. * @Default: 1
  159. *
  160. * This ini is used to control the beaconing entity (SAP/GO) to move away from
  161. * active LTE channels when channel avoidance event is received
  162. * restart_beaconing_on_chan_avoid_event=0: Don't allow beaconing entity move
  163. * from active LTE channels
  164. * restart_beaconing_on_chan_avoid_event=1: Allow beaconing entity move from
  165. * active LTE channels
  166. * restart_beaconing_on_chan_avoid_event=2: Allow beaconing entity move from
  167. * 2.4G active LTE channels only
  168. *
  169. * Related: None
  170. *
  171. * Supported Feature: channel avoidance
  172. *
  173. * Usage: Internal/External
  174. *
  175. * </ini>
  176. */
  177. #define CFG_RESTART_BEACONING_ON_CH_AVOID CFG_INI_UINT( \
  178. "restart_beaconing_on_chan_avoid_event", \
  179. 0, \
  180. 2, \
  181. 1, \
  182. CFG_VALUE_OR_DEFAULT, \
  183. "control the beaconing entity to move away from active LTE channels")
  184. /*
  185. * <ini>
  186. * gindoor_channel_support - support to start sap in indoor channel
  187. * @Min: 0
  188. * @Max: 1
  189. * @Default: 0
  190. *
  191. * This ini is to support to start sap in indoor channel.
  192. * Customer can config this item to enable/disable sap in indoor channel
  193. *
  194. * Related: None
  195. *
  196. * Supported Feature: SAP
  197. *
  198. * Usage: External
  199. *
  200. * </ini>
  201. */
  202. #define CFG_INDOOR_CHANNEL_SUPPORT CFG_INI_BOOL( \
  203. "gindoor_channel_support", \
  204. 0, \
  205. "enable/disable sap in indoor channel")
  206. /*
  207. * <ini>
  208. * scan_11d_interval - 11d scan interval in ms
  209. * @Min: 1 sec
  210. * @Max: 10 hr
  211. * @Default: 1 hr
  212. *
  213. * This ini sets the 11d scan interval in FW
  214. *
  215. * Related: None
  216. *
  217. * Supported Feature: STA
  218. *
  219. * Usage: External
  220. *
  221. * </ini>
  222. */
  223. #define CFG_SCAN_11D_INTERVAL CFG_INI_UINT( \
  224. "scan_11d_interval", \
  225. 1000, \
  226. 36000000, \
  227. 3600000, \
  228. CFG_VALUE_OR_DEFAULT, \
  229. "set the 11d scan interval in FW")
  230. /*
  231. * <ini>
  232. * ignore_fw_reg_offload_ind - If set, Ignore the FW offload indication
  233. * @Min: 0
  234. * @Max: 1
  235. * @Default: 0
  236. *
  237. * This ini is used to ignore regdb offload indication from FW and
  238. * regulatory will be treated as non offload.
  239. *
  240. * Related: None
  241. *
  242. * Supported Feature: STA/AP
  243. *
  244. * Usage: External
  245. *
  246. * </ini>
  247. */
  248. #define CFG_IGNORE_FW_REG_OFFLOAD_IND CFG_INI_BOOL( \
  249. "ignore_fw_reg_offload_ind", \
  250. 0, \
  251. "Ignore Regulatory offloads Indication from FW")
  252. /*
  253. * <ini>
  254. * enable_pending_list_req - Sets Pending channel List Req.
  255. * @Min: 0
  256. * @Max: 1
  257. * @Default: 0
  258. *
  259. * This option enables/disables SCAN_CHAN_LIST_CMDID channel list command to FW
  260. * till the current scan is complete.
  261. *
  262. * Related: None
  263. *
  264. * Supported Feature: STA
  265. *
  266. * Usage: External
  267. *
  268. * </ini>
  269. */
  270. #define CFG_ENABLE_PENDING_CHAN_LIST_REQ CFG_INI_BOOL( \
  271. "enable_pending_list_req", \
  272. 0, \
  273. "Enable Pending list req")
  274. /*
  275. * <ini>
  276. * retain_nol_across_regdmn - Retain NOL across reg domain
  277. * @Min: 0
  278. * @Max: 1
  279. * @Default: 1
  280. *
  281. * This ini is used to set if NOL needs to be retained
  282. * on the reg domain change.
  283. *
  284. * Related: None
  285. *
  286. * Supported Feature: SAP
  287. *
  288. * Usage: External
  289. *
  290. * </ini>
  291. */
  292. #define CFG_RETAIN_NOL_ACROSS_REG_DOMAIN CFG_INI_BOOL( \
  293. "retain_nol_across_regdmn", \
  294. 1, \
  295. "Retain NOL even if the regdomain changes")
  296. #define CFG_REG_ALL \
  297. CFG(CFG_SELF_GEN_FRM_PWR) \
  298. CFG(CFG_ENABLE_PENDING_CHAN_LIST_REQ) \
  299. CFG(CFG_ENABLE_11D_IN_WORLD_MODE) \
  300. CFG(CFG_ETSI_SRD_CHAN_IN_MASTER_MODE) \
  301. CFG(CFG_FCC_5DOT9_GHZ_CHAN_IN_MASTER_MODE) \
  302. CFG(CFG_RESTART_BEACONING_ON_CH_AVOID) \
  303. CFG(CFG_INDOOR_CHANNEL_SUPPORT) \
  304. CFG(CFG_SCAN_11D_INTERVAL) \
  305. CFG(CFG_IGNORE_FW_REG_OFFLOAD_IND) \
  306. CFG(CFG_RETAIN_NOL_ACROSS_REG_DOMAIN) \
  307. CFG_SAP_AVOID_ACS_FREQ_LIST_ALL
  308. #endif /* CFG_MLME_REG_H__ */