cfg_fwol_generic.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  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_FWOL_GENERIC_H
  22. #define __CFG_FWOL_GENERIC_H
  23. /*
  24. *
  25. * <ini>
  26. * gEnableANI - Enable Adaptive Noise Immunity
  27. * @Min: 0
  28. * @Max: 1
  29. * @Default: 1
  30. *
  31. * This ini is used to enable or disable Adaptive Noise Immunity.
  32. *
  33. * Related: None
  34. *
  35. * Supported Feature: ANI
  36. *
  37. * Usage: External
  38. *
  39. * </ini>
  40. */
  41. #define CFG_ENABLE_ANI CFG_INI_BOOL( \
  42. "gEnableANI", \
  43. 1, \
  44. "Enable/Disable Adaptive Noise Immunity")
  45. /**
  46. * gSetRTSForSIFSBursting - set rts for sifs bursting
  47. * @Min: 0
  48. * @Max: 1
  49. * @Default: 0
  50. *
  51. * This ini set rts for sifs bursting
  52. *
  53. * Usage: External
  54. *
  55. * </ini>
  56. */
  57. #define CFG_SET_RTS_FOR_SIFS_BURSTING CFG_INI_BOOL( \
  58. "gSetRTSForSIFSBursting", \
  59. 0, \
  60. "Set rts for sifs bursting")
  61. /**
  62. * <ini>
  63. * gMaxMPDUsInAMPDU - max mpdus in ampdu
  64. * @Min: 0
  65. * @Max: 64
  66. * @Default: 0
  67. *
  68. * This ini configure max mpdus in ampdu
  69. *
  70. * Usage: External
  71. *
  72. * </ini>
  73. */
  74. #define CFG_MAX_MPDUS_IN_AMPDU CFG_INI_INT( \
  75. "gMaxMPDUsInAMPDU", \
  76. 0, \
  77. 64, \
  78. 0, \
  79. CFG_VALUE_OR_DEFAULT, \
  80. "This ini configure max mpdus in ampdu")
  81. /**
  82. * arp_ac_category - ARP access category
  83. * @Min: 0
  84. * @Max: 3
  85. * @Default: 3
  86. *
  87. * Firmware by default categorizes ARP packets with VOICE TID.
  88. * This ini shall be used to override the default configuration.
  89. * Access category enums are referenced in ieee80211_common.h
  90. * WME_AC_BE = 0 (Best effort)
  91. * WME_AC_BK = 1 (Background)
  92. * WME_AC_VI = 2 (Video)
  93. * WME_AC_VO = 3 (Voice)
  94. *
  95. * Related: none
  96. *
  97. * Usage: Internal/External
  98. *
  99. * </ini>
  100. */
  101. #define CFG_ARP_AC_CATEGORY CFG_INI_INT( \
  102. "arp_ac_category", \
  103. 0, \
  104. 3, \
  105. 3, \
  106. CFG_VALUE_OR_DEFAULT, \
  107. "Override the default ARP AC configuration")
  108. /*
  109. * </ini>
  110. * gEnableFastPwrTransition - Configuration for fast power transition
  111. * @Min: 0
  112. * @Max: 2
  113. * @Default: 0
  114. *
  115. * This ini supported values:
  116. * 0x0: Phy register retention disabled (Higher timeline, Good for power)
  117. * 0x1: Phy register retention statically enabled
  118. * 0x2: Phy register retention enabled/disabled dynamically
  119. *
  120. * Usage: Internal
  121. *
  122. * </ini>
  123. */
  124. #define CFG_ENABLE_PHY_REG CFG_INI_UINT( \
  125. "gEnableFastPwrTransition", \
  126. 0x0, \
  127. 0x2, \
  128. 0x0, \
  129. CFG_VALUE_OR_DEFAULT, \
  130. "Configuration for fast power transition")
  131. /*
  132. * <ini>
  133. * gUpperBrssiThresh - Sets Upper threshold for beacon RSSI
  134. * @Min: 36
  135. * @Max: 66
  136. * @Default: 46
  137. *
  138. * This ini sets Upper beacon threshold for beacon RSSI in FW
  139. * Used to reduced RX chainmask in FW, once this threshold is
  140. * reached FW will switch to 1X1 (Single chain).
  141. *
  142. * Supported Feature: STA
  143. *
  144. * Usage: External
  145. *
  146. * </ini>
  147. */
  148. #define CFG_UPPER_BRSSI_THRESH CFG_INI_UINT( \
  149. "gUpperBrssiThresh", \
  150. 36, \
  151. 66, \
  152. 46, \
  153. CFG_VALUE_OR_DEFAULT, \
  154. "Sets Upper threshold for beacon RSSI")
  155. /*
  156. * <ini>
  157. * gLowerBrssiThresh - Sets Lower threshold for beacon RSSI
  158. * @Min: 6
  159. * @Max: 36
  160. * @Default: 26
  161. *
  162. * This ini sets Lower beacon threshold for beacon RSSI in FW
  163. * Used to increase RX chainmask in FW, once this threshold is
  164. * reached FW will switch to 2X2 chain.
  165. *
  166. * Supported Feature: STA
  167. *
  168. * Usage: External
  169. *
  170. * </ini>
  171. */
  172. #define CFG_LOWER_BRSSI_THRESH CFG_INI_UINT( \
  173. "gLowerBrssiThresh", \
  174. 6, \
  175. 36, \
  176. 26, \
  177. CFG_VALUE_OR_DEFAULT, \
  178. "Sets Lower threshold for beacon RSSI")
  179. /*
  180. * <ini>
  181. * gDtim1ChRxEnable - Enable/Disable DTIM 1Chrx feature
  182. * @Min: 0
  183. * @Max: 1
  184. * @Default: 1
  185. *
  186. * This ini Enables or Disables DTIM 1CHRX feature in FW
  187. * If this flag is set FW enables shutting off one chain
  188. * while going to power save.
  189. *
  190. * Supported Feature: STA
  191. *
  192. * Usage: External
  193. *
  194. * </ini>
  195. */
  196. #define CFG_DTIM_1CHRX_ENABLE CFG_INI_BOOL( \
  197. "gDtim1ChRxEnable", \
  198. 1, \
  199. "Enable/Disable DTIM 1Chrx feature")
  200. /*
  201. * <ini>
  202. * gEnableAlternativeChainmask - Enable Co-Ex Alternative Chainmask
  203. * @Min: 0
  204. * @Max: 1
  205. * @Default: 0
  206. *
  207. * This ini is used to enable/disable the Co-ex Alternative Chainmask
  208. * feature via the WMI_PDEV_PARAM_ALTERNATIVE_CHAINMASK_SCHEME
  209. * firmware parameter.
  210. *
  211. * Related: None
  212. *
  213. * Supported Feature: STA
  214. *
  215. * Usage: Internal/External
  216. *
  217. * </ini>
  218. */
  219. #define CFG_ENABLE_COEX_ALT_CHAINMASK CFG_INI_BOOL( \
  220. "gEnableAlternativeChainmask", \
  221. 0, \
  222. "Enable Co-Ex Alternative Chainmask")
  223. /*
  224. * <ini>
  225. * gEnableSmartChainmask - Enable Smart Chainmask
  226. * @Min: 0
  227. * @Max: 1
  228. * @Default: 0
  229. *
  230. * This ini is used to enable/disable the Smart Chainmask feature via
  231. * the WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME firmware parameter.
  232. *
  233. * Related: None
  234. *
  235. * Supported Feature: STA
  236. *
  237. * Usage: Internal/External
  238. *
  239. * </ini>
  240. */
  241. #define CFG_ENABLE_SMART_CHAINMASK CFG_INI_BOOL( \
  242. "gEnableSmartChainmask", \
  243. 0, \
  244. "Enable/disable the Smart Chainmask feature")
  245. /*
  246. * <ini>
  247. * gEnableRTSProfiles - It will use configuring different RTS profiles
  248. * @Min: 0
  249. * @Max: 66
  250. * @Default: 33
  251. *
  252. * This ini used for configuring different RTS profiles
  253. * to firmware.
  254. * Following are the valid values for the rts profile:
  255. * RTSCTS_DISABLED 0
  256. * NOT_ALLOWED 1
  257. * NOT_ALLOWED 2
  258. * RTSCTS_DISABLED 16
  259. * RTSCTS_ENABLED_4_SECOND_RATESERIES 17
  260. * CTS2SELF_ENABLED_4_SECOND_RATESERIES 18
  261. * RTSCTS_DISABLED 32
  262. * RTSCTS_ENABLED_4_SWRETRIES 33
  263. * CTS2SELF_ENABLED_4_SWRETRIES 34
  264. * NOT_ALLOWED 48
  265. * NOT_ALLOWED 49
  266. * NOT_ALLOWED 50
  267. * RTSCTS_DISABLED 64
  268. * RTSCTS_ENABLED_4_ALL_RATESERIES 65
  269. * CTS2SELF_ENABLED_4_ALL_RATESERIES 66
  270. *
  271. * Related: None
  272. *
  273. * Supported Feature: STA
  274. *
  275. * Usage: Internal/External
  276. *
  277. * </ini>
  278. */
  279. #define CFG_ENABLE_FW_RTS_PROFILE CFG_INI_INT( \
  280. "gEnableRTSProfiles", \
  281. 0, \
  282. 66, \
  283. 33, \
  284. CFG_VALUE_OR_DEFAULT, \
  285. "It is used to configure different RTS profiles")
  286. /* <ini>
  287. * gFwDebugLogLevel - Firmware debug log level
  288. * @Min: 0
  289. * @Max: 255
  290. * @Default: 3
  291. *
  292. * This option controls the level of firmware debug log. Default value is
  293. * DBGLOG_WARN, which is to enable error and warning logs.
  294. *
  295. * Related: None
  296. *
  297. * Supported Features: Debugging
  298. *
  299. * Usage: Internal
  300. *
  301. * </ini>
  302. */
  303. #define CFG_ENABLE_FW_DEBUG_LOG_LEVEL CFG_INI_INT( \
  304. "gFwDebugLogLevel", \
  305. 0, \
  306. 255, \
  307. 3, \
  308. CFG_VALUE_OR_DEFAULT, \
  309. "enable error and warning logs by default")
  310. /* <ini>
  311. * gFwDebugLogType - Firmware debug log type
  312. * @Min: 0
  313. * @Max: 255
  314. * @Default: 3
  315. *
  316. * This option controls how driver is to give the firmware logs to net link
  317. * when cnss_diag service is started.
  318. *
  319. * Related: None
  320. *
  321. * Supported Features: Debugging
  322. *
  323. * Usage: Internal
  324. *
  325. * </ini>
  326. */
  327. #define CFG_ENABLE_FW_LOG_TYPE CFG_INI_INT( \
  328. "gFwDebugLogType", \
  329. 0, \
  330. 255, \
  331. 3, \
  332. CFG_VALUE_OR_DEFAULT, \
  333. "Default value to be given to the net link cnss_diag service")
  334. /*
  335. * <ini>
  336. * gFwDebugModuleLoglevel - modulized firmware debug log level
  337. * @Min: N/A
  338. * @Max: N/A
  339. * @Default: N/A
  340. *
  341. * This ini is used to set modulized firmware debug log level.
  342. * FW module log level input string format looks like below:
  343. * gFwDebugModuleLoglevel="<FW Module ID>,<Log Level>,..."
  344. * For example:
  345. * gFwDebugModuleLoglevel="1,0,2,1,3,2,4,3,5,4,6,5,7,6"
  346. * The above input string means:
  347. * For FW module ID 1 enable log level 0
  348. * For FW module ID 2 enable log level 1
  349. * For FW module ID 3 enable log level 2
  350. * For FW module ID 4 enable log level 3
  351. * For FW module ID 5 enable log level 4
  352. * For FW module ID 6 enable log level 5
  353. * For FW module ID 7 enable log level 6
  354. * For valid values of log levels check enum DBGLOG_LOG_LVL and
  355. * for valid values of module ids check enum WLAN_MODULE_ID.
  356. *
  357. * Related: None
  358. *
  359. * Supported Feature: Debugging
  360. *
  361. * Usage: Internal/External
  362. *
  363. * </ini>
  364. */
  365. #define FW_MODULE_LOG_LEVEL_STRING_LENGTH (512)
  366. #define CFG_ENABLE_FW_MODULE_LOG_LEVEL CFG_INI_STRING( \
  367. "gFwDebugModuleLoglevel", \
  368. 0, \
  369. FW_MODULE_LOG_LEVEL_STRING_LENGTH, \
  370. "2,1,3,1,5,1,9,1,13,1,14,1,18,1,19,1,26,1,28,1,29,1,31,1,36,1,38,1,"\
  371. "46,1,47,1,50,1,52,1,53,1,56,1,60,1,61,1,4,1", \
  372. "Set modulized firmware debug log level")
  373. #ifdef FEATURE_WLAN_RA_FILTERING
  374. /* <ini>
  375. * gRAFilterEnable
  376. * @Min: 0
  377. * @Max: 1
  378. * @Default: 1
  379. *
  380. * Related: None
  381. *
  382. * Usage: Internal
  383. *
  384. * </ini>
  385. */
  386. #define CFG_RA_FILTER_ENABLE CFG_INI_BOOL( \
  387. "gRAFilterEnable", \
  388. 1, \
  389. "Enable RA Filter")
  390. #else
  391. #define CFG_RA_FILTER_ENABLE
  392. #endif
  393. /* <ini>
  394. * gtsf_gpio_pin
  395. * @Min: 0
  396. * @Max: 254
  397. * @Default: 255
  398. *
  399. * GPIO pin to toggle when capture tsf
  400. *
  401. * Related: None
  402. *
  403. * Usage: Internal
  404. *
  405. * </ini>
  406. */
  407. #define CFG_SET_TSF_GPIO_PIN CFG_INI_INT( \
  408. "gtsf_gpio_pin", \
  409. 0, \
  410. 254, \
  411. 255, \
  412. CFG_VALUE_OR_DEFAULT, \
  413. "GPIO pin to toggle when capture tsf")
  414. #ifdef DHCP_SERVER_OFFLOAD
  415. /* <ini>
  416. * gDHCPServerOffloadEnable
  417. * @Min: 0
  418. * @Max: 1
  419. * @Default: 0
  420. *
  421. * DHCP Server offload support
  422. *
  423. * Related: None
  424. *
  425. * Usage: Internal
  426. *
  427. * </ini>
  428. */
  429. #define CFG_DHCP_SERVER_OFFLOAD_SUPPORT CFG_INI_BOOL( \
  430. "gDHCPServerOffloadEnable", \
  431. 0, \
  432. "DHCP Server offload support")
  433. /* <ini>
  434. * gDHCPMaxNumClients
  435. * @Min: 1
  436. * @Max: 8
  437. * @Default: 8
  438. *
  439. * Number of DHCP server offload clients
  440. *
  441. * Related: None
  442. *
  443. * Usage: Internal
  444. *
  445. * </ini>
  446. */
  447. #define CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT CFG_INI_INT( \
  448. "gDHCPMaxNumClients", \
  449. 1, \
  450. 8, \
  451. 8, \
  452. CFG_VALUE_OR_DEFAULT, \
  453. "Number of DHCP server offload clients")
  454. #define CFG_FWOL_DHCP \
  455. CFG(CFG_DHCP_SERVER_OFFLOAD_SUPPORT) \
  456. CFG(CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT)
  457. #else
  458. #define CFG_FWOL_DHCP
  459. #endif
  460. #define CFG_FWOL_GENERIC_ALL \
  461. CFG_FWOL_DHCP \
  462. CFG(CFG_ENABLE_ANI) \
  463. CFG(CFG_SET_RTS_FOR_SIFS_BURSTING) \
  464. CFG(CFG_MAX_MPDUS_IN_AMPDU) \
  465. CFG(CFG_ARP_AC_CATEGORY) \
  466. CFG(CFG_ENABLE_PHY_REG) \
  467. CFG(CFG_UPPER_BRSSI_THRESH) \
  468. CFG(CFG_LOWER_BRSSI_THRESH) \
  469. CFG(CFG_DTIM_1CHRX_ENABLE) \
  470. CFG(CFG_ENABLE_COEX_ALT_CHAINMASK) \
  471. CFG(CFG_ENABLE_SMART_CHAINMASK) \
  472. CFG(CFG_ENABLE_FW_RTS_PROFILE) \
  473. CFG(CFG_ENABLE_FW_DEBUG_LOG_LEVEL) \
  474. CFG(CFG_ENABLE_FW_LOG_TYPE) \
  475. CFG(CFG_ENABLE_FW_MODULE_LOG_LEVEL) \
  476. CFG(CFG_RA_FILTER_ENABLE) \
  477. CFG(CFG_SET_TSF_GPIO_PIN)
  478. #endif