cfg_mlme_reg.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  1. /*
  2. * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. /**
  20. * DOC: This file contains configuration definitions for MLME REG.
  21. */
  22. #ifndef CFG_MLME_REG_H__
  23. #define CFG_MLME_REG_H__
  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. * enable_nan_indoor_channel - Enable Indoor channels for NAN
  103. * @Min: 0
  104. * @Max: 1
  105. * @Default: 0
  106. *
  107. * This ini is used to support to indoor channels for NAN interface
  108. * Customer can config this item to enable/disable NAN in indoor channel
  109. *
  110. * Related: None
  111. *
  112. * Supported Feature: NAN
  113. *
  114. * Usage: External
  115. *
  116. * </ini>
  117. */
  118. #define CFG_INDOOR_CHANNEL_SUPPORT_FOR_NAN CFG_INI_BOOL( \
  119. "enable_nan_indoor_channel", \
  120. 0, \
  121. "enable/disable indoor channels for NAN")
  122. /*
  123. * <ini>
  124. * fcc_5dot9_ghz_chan_in_master_mode - Enable/disable 5.9 GHz channels in
  125. * master mode for US
  126. * @Min: 0
  127. * @Max: 1
  128. * @Default: 0
  129. *
  130. * fcc_5dot9_ghz_chan_in_master_mode is to enable/disable 5.9 GHz channels
  131. * in master mode for FCC reg domain
  132. *
  133. * Related: None
  134. *
  135. * Supported Feature: SAP/P2P-GO
  136. *
  137. * Usage: Internal/External
  138. *
  139. * </ini>
  140. */
  141. #define CFG_FCC_5DOT9_GHZ_CHAN_IN_MASTER_MODE CFG_INI_BOOL( \
  142. "fcc_5dot9_ghz_chan_in_master_mode", \
  143. 0, \
  144. "enable/disable FCC 5.9 GHz channels in master mode")
  145. #ifdef SAP_AVOID_ACS_FREQ_LIST
  146. #define SAP_AVOID_ACS_FREQ_LIST_DEFAULT ""
  147. /*
  148. * <ini>
  149. * sap_avoid_acs_freq_list - Avoid configured frequencies from acs
  150. * @Default: No frequencies are configured, it means consider all
  151. * the frequencies for acs
  152. *
  153. * This ini is to configure the frequencies which needs to be
  154. * avoided during acs and sap will not come up on these channels
  155. * Ex: sap_avoid_acs_freq_list=2412,2417,2422,2427,2467,2472
  156. *
  157. * Related: Feature flag SAP_AVOID_ACS_FREQ_LIST
  158. *
  159. * Supported Feature: SAP
  160. *
  161. * Usage: External
  162. *
  163. * </ini>
  164. */
  165. #define CFG_SAP_AVOID_ACS_FREQ_LIST CFG_INI_STRING( \
  166. "sap_avoid_acs_freq_list", \
  167. 0, \
  168. CFG_VALID_CHANNEL_LIST_STRING_LEN, \
  169. SAP_AVOID_ACS_FREQ_LIST_DEFAULT, \
  170. "Avoid configured frequencies during acs")
  171. #define CFG_SAP_AVOID_ACS_FREQ_LIST_ALL CFG(CFG_SAP_AVOID_ACS_FREQ_LIST)
  172. #else
  173. #define CFG_SAP_AVOID_ACS_FREQ_LIST_ALL
  174. #endif
  175. /*
  176. * <ini>
  177. * restart_beaconing_on_chan_avoid_event - control the beaconing entity to move
  178. * away from active LTE channels
  179. * @Min: 0
  180. * @Max: 2
  181. * @Default: 1
  182. *
  183. * This ini is used to control the beaconing entity (SAP/GO) to move away from
  184. * active LTE channels when channel avoidance event is received
  185. * restart_beaconing_on_chan_avoid_event=0: Don't allow beaconing entity move
  186. * from active LTE channels
  187. * restart_beaconing_on_chan_avoid_event=1: Allow beaconing entity move from
  188. * active LTE channels
  189. * restart_beaconing_on_chan_avoid_event=2: Allow beaconing entity move from
  190. * 2.4G active LTE channels only
  191. *
  192. * Related: None
  193. *
  194. * Supported Feature: channel avoidance
  195. *
  196. * Usage: Internal/External
  197. *
  198. * </ini>
  199. */
  200. #define CFG_RESTART_BEACONING_ON_CH_AVOID CFG_INI_UINT( \
  201. "restart_beaconing_on_chan_avoid_event", \
  202. 0, \
  203. 2, \
  204. 1, \
  205. CFG_VALUE_OR_DEFAULT, \
  206. "control the beaconing entity to move away from active LTE channels")
  207. /*
  208. * <ini>
  209. * gindoor_channel_support - support to start sap in indoor channel
  210. * @Min: 0
  211. * @Max: 1
  212. * @Default: 0
  213. *
  214. * This ini is to support to start sap in indoor channel.
  215. * Customer can config this item to enable/disable sap in indoor channel
  216. *
  217. * Related: None
  218. *
  219. * Supported Feature: SAP
  220. *
  221. * Usage: External
  222. *
  223. * </ini>
  224. */
  225. #define CFG_INDOOR_CHANNEL_SUPPORT CFG_INI_BOOL( \
  226. "gindoor_channel_support", \
  227. 0, \
  228. "enable/disable sap in indoor channel")
  229. /*
  230. * <ini>
  231. * scan_11d_interval - 11d scan interval in ms
  232. * @Min: 1 sec
  233. * @Max: 10 hr
  234. * @Default: 1 hr
  235. *
  236. * This ini sets the 11d scan interval in FW
  237. *
  238. * Related: None
  239. *
  240. * Supported Feature: STA
  241. *
  242. * Usage: External
  243. *
  244. * </ini>
  245. */
  246. #define CFG_SCAN_11D_INTERVAL CFG_INI_UINT( \
  247. "scan_11d_interval", \
  248. 1000, \
  249. 36000000, \
  250. 3600000, \
  251. CFG_VALUE_OR_DEFAULT, \
  252. "set the 11d scan interval in FW")
  253. /*
  254. * <ini>
  255. * ignore_fw_reg_offload_ind - If set, Ignore the FW offload indication
  256. * @Min: 0
  257. * @Max: 1
  258. * @Default: 0
  259. *
  260. * This ini is used to ignore regdb offload indication from FW and
  261. * regulatory will be treated as non offload.
  262. *
  263. * Related: None
  264. *
  265. * Supported Feature: STA/AP
  266. *
  267. * Usage: External
  268. *
  269. * </ini>
  270. */
  271. #define CFG_IGNORE_FW_REG_OFFLOAD_IND CFG_INI_BOOL( \
  272. "ignore_fw_reg_offload_ind", \
  273. 0, \
  274. "Ignore Regulatory offloads Indication from FW")
  275. /*
  276. * <ini>
  277. * enable_pending_list_req - Sets Pending channel List Req.
  278. * @Min: 0
  279. * @Max: 1
  280. * @Default: 1
  281. *
  282. * This option enables/disables SCAN_CHAN_LIST_CMDID channel list command to FW
  283. * till the current scan is complete.
  284. *
  285. * Related: None
  286. *
  287. * Supported Feature: STA
  288. *
  289. * Usage: External
  290. *
  291. * </ini>
  292. */
  293. #define CFG_ENABLE_PENDING_CHAN_LIST_REQ CFG_INI_BOOL( \
  294. "enable_pending_list_req", \
  295. 1, \
  296. "Enable Pending list req")
  297. #if defined(CONFIG_BAND_6GHZ) && defined(CONFIG_AFC_SUPPORT)
  298. /*
  299. * afc_reg_no_action - Whether action to AFC response
  300. * @Min: 0
  301. * @Max: 1
  302. * @Default: 0
  303. *
  304. * This cfg is used to control whether action to AFC response.
  305. *
  306. * Related: None
  307. *
  308. * Supported Feature: SAP
  309. *
  310. */
  311. #define CFG_AFC_REG_NO_ACTION CFG_BOOL( \
  312. "afc_reg_no_action", false, \
  313. "driver/user space action needed for afc resp")
  314. /*
  315. * enable_6ghz_sp_pwrmode_supp - Enable 6Ghz SP power mode
  316. * @Min: 0
  317. * @Max: 1
  318. * @Default: 0
  319. *
  320. * This cfg is used to control support of 6Ghz SP power mode.
  321. *
  322. * Related: None
  323. *
  324. * Supported Feature: SAP
  325. *
  326. */
  327. #define CFG_6GHZ_SP_POWER_MODE_SUPP CFG_INI_BOOL( \
  328. "enable_6ghz_sp_pwrmode_supp", false, \
  329. "Enable support for SP Power mode in 6GHz")
  330. /*
  331. * afc_disable_timer_check - Disable AFC timer check
  332. * @Min: 0
  333. * @Max: 1
  334. * @Default: 0
  335. *
  336. * This cfg is used to control whether disable AFC timer check.
  337. *
  338. * Related: None
  339. *
  340. * Supported Feature: SAP
  341. *
  342. */
  343. #define CFG_AFC_TIMER_CHECK_DIS CFG_BOOL( \
  344. "afc_disable_timer_check", false, \
  345. "Disable the AFC request timer in FW")
  346. /*
  347. * afc_disable_request_id_check - Disable AFC request id check
  348. * @Min: 0
  349. * @Max: 1
  350. * @Default: 0
  351. *
  352. * This ini is used to control whether disable AFC request id check.
  353. *
  354. * Related: None
  355. *
  356. * Supported Feature: SAP
  357. *
  358. */
  359. #define CFG_AFC_REQ_ID_CHECK_DIS CFG_BOOL( \
  360. "afc_disable_request_id_check", false, \
  361. "Disable the AFC request ID check in FW")
  362. #define CFG_AFC_REG_ALL \
  363. CFG(CFG_AFC_REG_NO_ACTION) \
  364. CFG(CFG_6GHZ_SP_POWER_MODE_SUPP) \
  365. CFG(CFG_AFC_TIMER_CHECK_DIS) \
  366. CFG(CFG_AFC_REQ_ID_CHECK_DIS)
  367. #else
  368. #define CFG_AFC_REG_ALL
  369. #endif
  370. /*
  371. * <ini>
  372. * retain_nol_across_regdmn - Retain NOL across reg domain
  373. * @Min: 0
  374. * @Max: 1
  375. * @Default: 1
  376. *
  377. * This ini is used to set if NOL needs to be retained
  378. * on the reg domain change.
  379. *
  380. * Related: None
  381. *
  382. * Supported Feature: SAP
  383. *
  384. * Usage: External
  385. *
  386. * </ini>
  387. */
  388. #define CFG_RETAIN_NOL_ACROSS_REG_DOMAIN CFG_INI_BOOL( \
  389. "retain_nol_across_regdmn", \
  390. 1, \
  391. "Retain NOL even if the regdomain changes")
  392. #ifdef FEATURE_WLAN_CH_AVOID_EXT
  393. /**
  394. * enum ignore_fw_coex_info_modes - Represents modes
  395. * @IGNORE_FW_COEX_INFO_ON_SAP_MODE: Set this bit to ignore fw coex info on
  396. * SAP mode
  397. * @IGNORE_FW_COEX_INFO_ON_P2P_GO_MODE: Set this bit to ignore fw coex info
  398. * on P2P-GO mode
  399. */
  400. enum ignore_fw_coex_info_modes {
  401. IGNORE_FW_COEX_INFO_ON_SAP_MODE = 1 << 0,
  402. IGNORE_FW_COEX_INFO_ON_P2P_GO_MODE = 1 << 1
  403. };
  404. /*
  405. * <ini>
  406. * coex_unsafe_chan_nb_user_prefer- Used to handle coex unsafe freq
  407. * event
  408. *
  409. * @Min: 0
  410. * @Max: 0xFF
  411. * @Default: 0
  412. *
  413. * Bit map of the modes to consider/ignore firmware provided coex/unsafe
  414. * channels.
  415. * Firmware provided coex/unsafe channel info is ignored if the corresponding
  416. * bit is set to 1.
  417. * Firmware provided coex/unsafe channel info is honored if the corresponding
  418. * bit is set to 0.
  419. *
  420. * BIT 0: Don't honor firmware coex info for SAP mode
  421. * BIT 1: Don't honor firmware coex info for P2P-GO mode
  422. * Rest of the bits are currently reserved
  423. *
  424. * This ini is used to handle coex unsafe freq event
  425. * Usage: External
  426. *
  427. * </ini>
  428. */
  429. #define CFG_COEX_UNSAFE_CHAN_NB_USER_PREFER CFG_INI_UINT( \
  430. "coex_unsafe_chan_nb_user_prefer", \
  431. 0, \
  432. 0xff, \
  433. 0, \
  434. CFG_VALUE_OR_DEFAULT, \
  435. "Honor coex unsafe freq event from firmware")
  436. /*
  437. * <ini>
  438. * coex_unsafe_chan_reg_disable - Used to disable reg channels
  439. * for coex unsafe freq event
  440. *
  441. * @Min: 0 (Don't disable reg channels for coex unsafe chan event)
  442. * @Max: 1 (Disable reg channels for coex unsafe chan event)
  443. * Default: 0
  444. *
  445. * This ini is used to disable reg channels for coex unsafe chan
  446. * event
  447. * Usage: External
  448. *
  449. * </ini>
  450. */
  451. #define CFG_COEX_UNSAFE_CHAN_REG_DISABLE CFG_INI_BOOL( \
  452. "coex_unsafe_chan_reg_disable", \
  453. 0, \
  454. "Disable reg channels for coex unsafe chan event")
  455. #define CFG_COEX_UNSAFE_CHAN_ALL \
  456. CFG(CFG_COEX_UNSAFE_CHAN_NB_USER_PREFER) \
  457. CFG(CFG_COEX_UNSAFE_CHAN_REG_DISABLE)
  458. #else
  459. #define CFG_COEX_UNSAFE_CHAN_ALL
  460. #endif
  461. #define CFG_REG_ALL \
  462. CFG_COEX_UNSAFE_CHAN_ALL \
  463. CFG(CFG_SELF_GEN_FRM_PWR) \
  464. CFG(CFG_ENABLE_PENDING_CHAN_LIST_REQ) \
  465. CFG(CFG_ENABLE_11D_IN_WORLD_MODE) \
  466. CFG(CFG_ETSI_SRD_CHAN_IN_MASTER_MODE) \
  467. CFG(CFG_INDOOR_CHANNEL_SUPPORT_FOR_NAN) \
  468. CFG(CFG_FCC_5DOT9_GHZ_CHAN_IN_MASTER_MODE) \
  469. CFG(CFG_RESTART_BEACONING_ON_CH_AVOID) \
  470. CFG(CFG_INDOOR_CHANNEL_SUPPORT) \
  471. CFG(CFG_SCAN_11D_INTERVAL) \
  472. CFG(CFG_IGNORE_FW_REG_OFFLOAD_IND) \
  473. CFG_AFC_REG_ALL \
  474. CFG(CFG_RETAIN_NOL_ACROSS_REG_DOMAIN) \
  475. CFG_SAP_AVOID_ACS_FREQ_LIST_ALL
  476. #endif /* CFG_MLME_REG_H__ */