cfg_mlme_generic.h 10 KB

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