cfg_fwol_generic.h 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462
  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. #ifdef FEATURE_WLAN_RA_FILTERING
  335. /* <ini>
  336. * gRAFilterEnable
  337. * @Min: 0
  338. * @Max: 1
  339. * @Default: 1
  340. *
  341. * Related: None
  342. *
  343. * Usage: Internal
  344. *
  345. * </ini>
  346. */
  347. #define CFG_RA_FILTER_ENABLE CFG_INI_BOOL( \
  348. "gRAFilterEnable", \
  349. 1, \
  350. "Enable RA Filter")
  351. #else
  352. #define CFG_RA_FILTER_ENABLE
  353. #endif
  354. /* <ini>
  355. * gtsf_gpio_pin
  356. * @Min: 0
  357. * @Max: 254
  358. * @Default: 255
  359. *
  360. * GPIO pin to toggle when capture tsf
  361. *
  362. * Related: None
  363. *
  364. * Usage: Internal
  365. *
  366. * </ini>
  367. */
  368. #define CFG_SET_TSF_GPIO_PIN CFG_INI_INT( \
  369. "gtsf_gpio_pin", \
  370. 0, \
  371. 254, \
  372. 255, \
  373. CFG_VALUE_OR_DEFAULT, \
  374. "GPIO pin to toggle when capture tsf")
  375. #ifdef DHCP_SERVER_OFFLOAD
  376. /* <ini>
  377. * gDHCPServerOffloadEnable
  378. * @Min: 0
  379. * @Max: 1
  380. * @Default: 0
  381. *
  382. * DHCP Server offload support
  383. *
  384. * Related: None
  385. *
  386. * Usage: Internal
  387. *
  388. * </ini>
  389. */
  390. #define CFG_DHCP_SERVER_OFFLOAD_SUPPORT CFG_INI_BOOL( \
  391. "gDHCPServerOffloadEnable", \
  392. 0, \
  393. "DHCP Server offload support")
  394. /* <ini>
  395. * gDHCPMaxNumClients
  396. * @Min: 1
  397. * @Max: 8
  398. * @Default: 8
  399. *
  400. * Number of DHCP server offload clients
  401. *
  402. * Related: None
  403. *
  404. * Usage: Internal
  405. *
  406. * </ini>
  407. */
  408. #define CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT CFG_INI_INT( \
  409. "gDHCPMaxNumClients", \
  410. 1, \
  411. 8, \
  412. 8, \
  413. CFG_VALUE_OR_DEFAULT, \
  414. "Number of DHCP server offload clients")
  415. #define CFG_FWOL_DHCP \
  416. CFG(CFG_DHCP_SERVER_OFFLOAD_SUPPORT) \
  417. CFG(CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT)
  418. #else
  419. #define CFG_FWOL_DHCP
  420. #endif
  421. #define CFG_FWOL_GENERIC_ALL \
  422. CFG_FWOL_DHCP \
  423. CFG(CFG_ENABLE_ANI) \
  424. CFG(CFG_SET_RTS_FOR_SIFS_BURSTING) \
  425. CFG(CFG_MAX_MPDUS_IN_AMPDU) \
  426. CFG(CFG_ARP_AC_CATEGORY) \
  427. CFG(CFG_ENABLE_PHY_REG) \
  428. CFG(CFG_UPPER_BRSSI_THRESH) \
  429. CFG(CFG_LOWER_BRSSI_THRESH) \
  430. CFG(CFG_DTIM_1CHRX_ENABLE) \
  431. CFG(CFG_ENABLE_COEX_ALT_CHAINMASK) \
  432. CFG(CFG_ENABLE_SMART_CHAINMASK) \
  433. CFG(CFG_ENABLE_FW_RTS_PROFILE) \
  434. CFG(CFG_ENABLE_FW_DEBUG_LOG_LEVEL) \
  435. CFG(CFG_ENABLE_FW_LOG_TYPE) \
  436. CFG(CFG_RA_FILTER_ENABLE) \
  437. CFG(CFG_SET_TSF_GPIO_PIN)
  438. #endif