cfg_mlme_generic.h 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  1. /*
  2. * Copyright (c) 2012-2018 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_GENERIC_H
  22. #define __CFG_MLME_GENERIC_H
  23. #ifdef WLAN_FEATURE_11W
  24. #define CFG_PMF_SA_QUERY_MAX_RETRIES_TYPE CFG_INI_UINT
  25. #define CFG_PMF_SA_QUERY_RETRY_INTERVAL_TYPE CFG_INI_UINT
  26. #else
  27. #define CFG_PMF_SA_QUERY_MAX_RETRIES_TYPE CFG_UINT
  28. #define CFG_PMF_SA_QUERY_RETRY_INTERVAL_TYPE CFG_UINT
  29. #endif /*WLAN_FEATURE_11W*/
  30. /*
  31. * pmfSaQueryMaxRetries - Control PMF SA query retries for SAP
  32. * @Min: 0
  33. * @Max: 20
  34. * @Default: 5
  35. *
  36. * This ini to set the number of PMF SA query retries for SAP
  37. *
  38. * Related: None.
  39. *
  40. * Supported Feature: PMF(11W)
  41. *
  42. */
  43. #define CFG_PMF_SA_QUERY_MAX_RETRIES CFG_PMF_SA_QUERY_MAX_RETRIES_TYPE( \
  44. "pmfSaQueryMaxRetries", \
  45. 0, \
  46. 20, \
  47. 5, \
  48. CFG_VALUE_OR_DEFAULT, \
  49. "PMF SA query retries for SAP")
  50. /*
  51. * pmfSaQueryRetryInterval - Control PMF SA query retry interval
  52. * for SAP in ms
  53. * @Min: 10
  54. * @Max: 2000
  55. * @Default: 200
  56. *
  57. * This ini to set the PMF SA query retry interval for SAP in ms
  58. *
  59. * Related: None.
  60. *
  61. * Supported Feature: PMF(11W)
  62. *
  63. */
  64. #define CFG_PMF_SA_QUERY_RETRY_INTERVAL CFG_PMF_SA_QUERY_RETRY_INTERVAL_TYPE( \
  65. "pmfSaQueryRetryInterval", \
  66. 10, \
  67. 2000, \
  68. 200, \
  69. CFG_VALUE_OR_DEFAULT, \
  70. "PMF SA query retry interval for SAP")
  71. #define CFG_RTT3_ENABLE CFG_BOOL( \
  72. "rtt3_enabled", \
  73. 1, \
  74. "RTT3 enable/disable info")
  75. /*
  76. * <ini>
  77. * BandCapability - Preferred band (0: Both, 1: 2.4G only, 2: 5G only)
  78. * @Min: 0
  79. * @Max: 2
  80. * @Default: 0
  81. *
  82. * This ini is used to set default band capability
  83. * (0: Both, 1: 2.4G only, 2: 5G only)
  84. *
  85. * Related: None
  86. *
  87. * Supported Feature: STA
  88. *
  89. * Usage: Internal/External
  90. *
  91. * </ini>
  92. */
  93. #define CFG_BAND_CAPABILITY CFG_INI_UINT( \
  94. "BandCapability", \
  95. 0, \
  96. 2, \
  97. 0, \
  98. CFG_VALUE_OR_DEFAULT, \
  99. "Band Capability")
  100. /*
  101. * <ini>
  102. * gPreventLinkDown - Enable to prevent bus link from going down
  103. * @Min: 0
  104. * @Max: 1
  105. * @Default: 0
  106. *
  107. * Enable to prevent bus link from going down. Useful for platforms that do not
  108. * (yet) support link down suspend cases.
  109. *
  110. * Related: N/A
  111. *
  112. * Supported Feature: Suspend/Resume
  113. *
  114. * Usage: Internal
  115. *
  116. * </ini>
  117. */
  118. #if defined(QCA_WIFI_NAPIER_EMULATION) || defined(QCA_WIFI_QCA6290)
  119. #define CFG_PREVENT_LINK_DOWN CFG_INI_BOOL( \
  120. "gPreventLinkDown", \
  121. 1, \
  122. "Prevent Bus Link Down")
  123. #else
  124. #define CFG_PREVENT_LINK_DOWN CFG_INI_BOOL( \
  125. "gPreventLinkDown", \
  126. 0, \
  127. "Prevent Bus Link Down")
  128. #endif /* QCA_WIFI_NAPIER_EMULATION */
  129. /*
  130. * <ini>
  131. * gSelect5GHzMargin - Sets RSSI preference for 5GHz over 2.4GHz AP.
  132. * @Min: 0
  133. * @Max: 60
  134. * @Default: 0
  135. *
  136. * Prefer connecting to 5G AP even if its RSSI is lower by gSelect5GHzMargin
  137. * dBm than 2.4G AP. This feature requires the dependent cfg.ini
  138. * "gRoamPrefer5GHz" set to 1
  139. *
  140. * Related: gRoamPrefer5GHz
  141. *
  142. * Supported Feature: Roaming
  143. *
  144. * Usage: External
  145. *
  146. * </ini>
  147. */
  148. #define CFG_SELECT_5GHZ_MARGIN CFG_INI_UINT( \
  149. "gSelect5GHzMargin", \
  150. 0, \
  151. 60, \
  152. 0, \
  153. CFG_VALUE_OR_DEFAULT, \
  154. "Select 5Ghz Margin")
  155. /*
  156. * <ini>
  157. * gEnableMemDeepSleep - Sets Memory Deep Sleep on/off.
  158. * @Min: 0
  159. * @Max: 1
  160. * @Default: 1
  161. *
  162. *
  163. * Related: None
  164. *
  165. * Supported Feature: General
  166. *
  167. * Usage: External
  168. *
  169. * </ini>
  170. */
  171. #define CFG_ENABLE_MEM_DEEP_SLEEP CFG_INI_BOOL( \
  172. "gEnableMemDeepSleep", \
  173. 1, \
  174. "Enable Memory Deep Sleep")
  175. /*
  176. * <ini>
  177. *
  178. * gEnableCckTxFirOverride - Enable/disable CCK TxFIR Override
  179. * @Min: 0 (disabled)
  180. * @Max: 1 (enabled)
  181. * @Default: 0 (disabled)
  182. *
  183. * When operating in an 802.11b mode, this configuration item forces a 2x2 radio
  184. * configuration into 1x for Tx and 2x for Rx (ie 1x2) for regulatory compliance
  185. * reasons.
  186. *
  187. * Related: enable2x2
  188. *
  189. * Supported Feature: 802.11b, 2x2
  190. *
  191. * Usage: Internal/External
  192. *
  193. * </ini>
  194. */
  195. #define CFG_ENABLE_CCK_TX_FIR_OVERRIDE CFG_INI_BOOL( \
  196. "gEnableCckTxFirOverride", \
  197. 0, \
  198. "Enable CCK TX FIR Override")
  199. /*
  200. * <ini>
  201. *
  202. * gEnableForceTargetAssert - Enable/disable SSR
  203. * @Min: 0 (disabled)
  204. * @Max: 1 (enabled)
  205. * @Default: 0 (disabled)
  206. *
  207. * This INI item is used to control subsystem restart(SSR) test framework
  208. * Set it's value to 1 to enable APPS trigerred SSR testing
  209. *
  210. * Related: None
  211. *
  212. * Supported Feature: General
  213. *
  214. * Usage: Internal/External
  215. *
  216. * </ini>
  217. */
  218. #define CFG_ENABLE_CRASH_INJECT CFG_INI_BOOL( \
  219. "gEnableForceTargetAssert", \
  220. 0, \
  221. "Enable Crash Inject")
  222. /*
  223. * <ini>
  224. *
  225. * gEnableLpassSupport - Enable/disable LPASS Support
  226. * @Min: 0 (disabled)
  227. * @Max: 1 (enabled)
  228. * @Default: 0 (disabled)
  229. *
  230. * Related: None
  231. *
  232. * Supported Feature: General
  233. *
  234. * Usage: Internal/External
  235. *
  236. * </ini>
  237. */
  238. #ifdef WLAN_FEATURE_LPSS
  239. #define CFG_ENABLE_LPASS_SUPPORT CFG_INI_BOOL( \
  240. "gEnableLpassSupport", \
  241. 0, \
  242. "Enable LPASS Support")
  243. #else
  244. #define CFG_ENABLE_LPASS_SUPPORT CFG_BOOL( \
  245. "gEnableLpassSupport", \
  246. 0, \
  247. "Enable LPASS Support")
  248. #endif
  249. /*
  250. * <ini>
  251. *
  252. * gEnableSelfRecovery - Enable/disable Self Recovery
  253. * @Min: 0 (disabled)
  254. * @Max: 1 (enabled)
  255. * @Default: 0 (disabled)
  256. *
  257. * Related: None
  258. *
  259. * Supported Feature: General
  260. *
  261. * Usage: Internal/External
  262. *
  263. * </ini>
  264. */
  265. #define CFG_ENABLE_SELF_RECOVERY CFG_INI_BOOL( \
  266. "gEnableSelfRecovery", \
  267. 0, \
  268. "Enable Self Recovery")
  269. /*
  270. * <ini>
  271. *
  272. * gSapDot11mc - Enable/disable SAP 802.11mc support
  273. * @Min: 0 (disabled)
  274. * @Max: 1 (enabled)
  275. * @Default: 0 (disabled)
  276. *
  277. * Related: None
  278. *
  279. * Supported Feature: General
  280. *
  281. * Usage: Internal/External
  282. *
  283. * </ini>
  284. */
  285. #define CFG_SAP_DOT11MC CFG_INI_BOOL( \
  286. "gSapDot11mc", \
  287. 0, \
  288. "SAP 802.11mc support")
  289. /*
  290. * <ini>
  291. *
  292. * gEnableFatalEvent - Enable/Disable BUG report in case of fatal event
  293. * @Min: 0 (disabled)
  294. * @Max: 1 (enabled)
  295. * @Default: 1 (enabled)
  296. *
  297. * Related: None
  298. *
  299. * Supported Feature: General
  300. *
  301. * Usage: Internal/External
  302. *
  303. * </ini>
  304. */
  305. #define CFG_ENABLE_FATAL_EVENT_TRIGGER CFG_INI_BOOL( \
  306. "gEnableFatalEvent", \
  307. 1, \
  308. "Enable Fatal Event Trigger")
  309. /*
  310. * <ini>
  311. * gSub20ChannelWidth - Control sub 20 channel width (5/10 Mhz)
  312. * @Min: 0
  313. * @Max: 2
  314. * @Default: 0
  315. *
  316. * This ini is used to set the sub 20 channel width.
  317. * gSub20ChannelWidth=0: indicates do not use Sub 20 MHz bandwidth
  318. * gSub20ChannelWidth=1: Bring up SAP/STA in 5 MHz bandwidth
  319. * gSub20ChannelWidth=2: Bring up SAP/STA in 10 MHz bandwidth
  320. *
  321. * Related: None
  322. *
  323. * Supported Feature: 5/10 Mhz channel width support
  324. *
  325. * Usage: Internal/External
  326. *
  327. * </ini>
  328. */
  329. #define CFG_SUB_20_CHANNEL_WIDTH CFG_INI_UINT( \
  330. "gSub20ChannelWidth", \
  331. 0, \
  332. 2, \
  333. 0, \
  334. CFG_VALUE_OR_DEFAULT, \
  335. "Sub 20 Channel Width")
  336. /*
  337. * <ini>
  338. * goptimize_chan_avoid_event - Optimize channel avoidance indication
  339. * coming from firmware
  340. * @Min: 0
  341. * @Max: 1
  342. * @Default: 0
  343. *
  344. * Related: None
  345. *
  346. * Supported Feature: General
  347. *
  348. * Usage: Internal/External
  349. *
  350. * </ini>
  351. */
  352. #define CFG_OPTIMIZE_CA_EVENT CFG_INI_BOOL( \
  353. "goptimize_chan_avoid_event", \
  354. 0, \
  355. "Optimize FW CA Event")
  356. /*
  357. * <ini>
  358. * fw_timeout_crash - Enable/Disable BUG ON
  359. * @Min: 0
  360. * @Max: 1
  361. * @Default: 1
  362. *
  363. * This ini is used to Trigger host crash when firmware fails to send the
  364. * response to host
  365. * fw_timeout_crash = 0 Disabled
  366. * fw_timeout_crash = 1 Trigger host crash
  367. *
  368. * Related: None
  369. *
  370. * Supported Feature: SSR
  371. *
  372. * Usage: Internal/External
  373. *
  374. * </ini>
  375. */
  376. #define CFG_CRASH_FW_TIMEOUT CFG_INI_BOOL( \
  377. "fw_timeout_crash", \
  378. 1, \
  379. "Enable FW Timeout Crash")
  380. /*
  381. * <ini>
  382. * gDroppedPktDisconnectTh - Sets dropped packet threshold in firmware
  383. * @Min: 0
  384. * @Max: 512
  385. * @Default: 512
  386. *
  387. * This INI is the packet drop threshold will trigger disconnect from remote
  388. * peer.
  389. *
  390. * Related: None
  391. *
  392. * Supported Feature: connection
  393. *
  394. * Usage: External
  395. *
  396. * </ini>
  397. */
  398. #define CFG_DROPPED_PKT_DISCONNECT_THRESHOLD CFG_INI_UINT( \
  399. "gDroppedPktDisconnectTh", \
  400. 0, \
  401. 65535, \
  402. 512, \
  403. CFG_VALUE_OR_DEFAULT, \
  404. "Dropped Pkt Disconnect threshold")
  405. /*
  406. * <ini>
  407. * gItoRepeatCount - sets ito repeated count
  408. * @Min: 0
  409. * @Max: 5
  410. * @Default: 0
  411. *
  412. * This ini sets the ito count in FW
  413. *
  414. * Usage: External
  415. *
  416. * </ini>
  417. */
  418. #define CFG_ITO_REPEAT_COUNT CFG_INI_UINT( \
  419. "gItoRepeatCount", \
  420. 0, \
  421. 5, \
  422. 0, \
  423. CFG_VALUE_OR_DEFAULT, \
  424. "ITO Repeat Count")
  425. #define CFG_GENERIC_ALL \
  426. CFG(CFG_PMF_SA_QUERY_MAX_RETRIES) \
  427. CFG(CFG_PMF_SA_QUERY_RETRY_INTERVAL) \
  428. CFG(CFG_RTT3_ENABLE) \
  429. CFG(CFG_BAND_CAPABILITY) \
  430. CFG(CFG_PREVENT_LINK_DOWN) \
  431. CFG(CFG_SELECT_5GHZ_MARGIN) \
  432. CFG(CFG_ENABLE_MEM_DEEP_SLEEP) \
  433. CFG(CFG_ENABLE_CCK_TX_FIR_OVERRIDE) \
  434. CFG(CFG_ENABLE_CRASH_INJECT) \
  435. CFG(CFG_ENABLE_LPASS_SUPPORT) \
  436. CFG(CFG_ENABLE_SELF_RECOVERY) \
  437. CFG(CFG_SAP_DOT11MC) \
  438. CFG(CFG_ENABLE_FATAL_EVENT_TRIGGER) \
  439. CFG(CFG_SUB_20_CHANNEL_WIDTH) \
  440. CFG(CFG_OPTIMIZE_CA_EVENT) \
  441. CFG(CFG_CRASH_FW_TIMEOUT) \
  442. CFG(CFG_DROPPED_PKT_DISCONNECT_THRESHOLD) \
  443. CFG(CFG_ITO_REPEAT_COUNT)
  444. #endif /* __CFG_MLME_GENERIC_H */