cfg_mlme_reg.h 8.2 KB

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