cfg_fwol_generic.h 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461
  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. * gLowerrBrssiThresh - 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: Takes values from enum DBGLOG_LOG_LVL,
  288. * make default value as DBGLOG_WARN to enable error and
  289. * warning logs by default.
  290. * @Min: 0
  291. * @Max: 255
  292. * @Default: 3
  293. *
  294. * Related: None
  295. *
  296. * Supported Features: Debugging
  297. *
  298. * Usage: Internal
  299. *
  300. * </ini>
  301. */
  302. #define CFG_ENABLE_FW_DEBUG_LOG_LEVEL CFG_INI_INT( \
  303. "gFwDebugLogLevel", \
  304. 0, \
  305. 255, \
  306. 3, \
  307. CFG_VALUE_OR_DEFAULT, \
  308. "enable error and warning logs by default")
  309. /* <ini>
  310. * gFwDebugLogType: takes values from enum dbglog_process_t,
  311. * make default value as DBGLOG_PROCESS_NET_RAW to give the
  312. * logs to net link since cnss_diag service is started at boot
  313. * time by default.
  314. * @Min: 0
  315. * @Max: 255
  316. * @Default: 3
  317. *
  318. * Related: None
  319. *
  320. * Supported Features: Debugging
  321. *
  322. * Usage: Internal
  323. *
  324. * </ini>
  325. */
  326. #define CFG_ENABLE_FW_LOG_TYPE CFG_INI_INT( \
  327. "gFwDebugLogType", \
  328. 0, \
  329. 255, \
  330. 3, \
  331. CFG_VALUE_OR_DEFAULT, \
  332. "Default value to be given to the net link cnss_diag service")
  333. #ifdef FEATURE_WLAN_RA_FILTERING
  334. /* <ini>
  335. * gRAFilterEnable
  336. * @Min: 0
  337. * @Max: 1
  338. * @Default: 1
  339. *
  340. * Related: None
  341. *
  342. * Usage: Internal
  343. *
  344. * </ini>
  345. */
  346. #define CFG_RA_FILTER_ENABLE CFG_INI_BOOL( \
  347. "gRAFilterEnable", \
  348. 1, \
  349. "Enable RA Filter")
  350. #else
  351. #define CFG_RA_FILTER_ENABLE
  352. #endif
  353. /* <ini>
  354. * gtsf_gpio_pin
  355. * @Min: 0
  356. * @Max: 254
  357. * @Default: 255
  358. *
  359. * GPIO pin to toggle when capture tsf
  360. *
  361. * Related: None
  362. *
  363. * Usage: Internal
  364. *
  365. * </ini>
  366. */
  367. #define CFG_SET_TSF_GPIO_PIN CFG_INI_INT( \
  368. "gtsf_gpio_pin", \
  369. 0, \
  370. 254, \
  371. 255, \
  372. CFG_VALUE_OR_DEFAULT, \
  373. "GPIO pin to toggle when capture tsf")
  374. #ifdef DHCP_SERVER_OFFLOAD
  375. /* <ini>
  376. * gEnableDeauthToDisassocMap
  377. * @Min: 0
  378. * @Max: 1
  379. * @Default: 0
  380. *
  381. * DHCP Server offload support
  382. *
  383. * Related: None
  384. *
  385. * Usage: Internal
  386. *
  387. * </ini>
  388. */
  389. #define CFG_DHCP_SERVER_OFFLOAD_SUPPORT CFG_INI_BOOL( \
  390. "gEnableDeauthToDisassocMap", \
  391. 0, \
  392. "DHCP Server offload support")
  393. /* <ini>
  394. * gDHCPMaxNumClients
  395. * @Min: 1
  396. * @Max: 8
  397. * @Default: 8
  398. *
  399. * Number of DHCP server offload clients
  400. *
  401. * Related: None
  402. *
  403. * Usage: Internal
  404. *
  405. * </ini>
  406. */
  407. #define CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT CFG_INI_INT( \
  408. "gDHCPMaxNumClients", \
  409. 1, \
  410. 8, \
  411. 8, \
  412. CFG_VALUE_OR_DEFAULT, \
  413. "Number of DHCP server offload clients")
  414. #define CFG_FWOL_DHCP \
  415. CFG(CFG_DHCP_SERVER_OFFLOAD_SUPPORT) \
  416. CFG(CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT)
  417. #else
  418. #define CFG_FWOL_DHCP
  419. #endif
  420. #define CFG_FWOL_GENERIC_ALL \
  421. CFG_FWOL_DHCP \
  422. CFG(CFG_ENABLE_ANI) \
  423. CFG(CFG_SET_RTS_FOR_SIFS_BURSTING) \
  424. CFG(CFG_MAX_MPDUS_IN_AMPDU) \
  425. CFG(CFG_ARP_AC_CATEGORY) \
  426. CFG(CFG_ENABLE_PHY_REG) \
  427. CFG(CFG_UPPER_BRSSI_THRESH) \
  428. CFG(CFG_LOWER_BRSSI_THRESH) \
  429. CFG(CFG_DTIM_1CHRX_ENABLE) \
  430. CFG(CFG_ENABLE_COEX_ALT_CHAINMASK) \
  431. CFG(CFG_ENABLE_SMART_CHAINMASK) \
  432. CFG(CFG_ENABLE_FW_RTS_PROFILE) \
  433. CFG(CFG_ENABLE_FW_DEBUG_LOG_LEVEL) \
  434. CFG(CFG_ENABLE_FW_LOG_TYPE) \
  435. CFG(CFG_RA_FILTER_ENABLE) \
  436. CFG(CFG_SET_TSF_GPIO_PIN)
  437. #endif