wlan_pmo_common_cfg.h 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  1. /*
  2. * Copyright (c) 2012-2019 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. #ifndef WLAN_PMO_COMMON_CFG_H__
  19. #define WLAN_PMO_COMMON_CFG_H__
  20. #include "wlan_pmo_common_public_struct.h"
  21. /*
  22. * <ini>
  23. * hostArpOffload - Enable/disable host ARP offload
  24. * @Min: 0
  25. * @Max: 1
  26. * @Default: 1
  27. *
  28. * This ini is used to enable/disable firmware's capability of sending ARP
  29. * response to clients.
  30. *
  31. * Usage: External
  32. *
  33. * </ini>
  34. */
  35. #define CFG_PMO_ENABLE_HOST_ARPOFFLOAD CFG_INI_BOOL( \
  36. "hostArpOffload", \
  37. 1, \
  38. "enable/disable host ARP offload")
  39. /*
  40. * <ini>
  41. * gHwFilterMode - configure hardware filter for DTIM mode
  42. * @Min: 0
  43. * @Max: 3
  44. * @Default: 1
  45. *
  46. * The hardware filter is only effective in DTIM mode. Use this configuration
  47. * to blanket drop broadcast/multicast packets at the hardware level, without
  48. * waking up the firmware
  49. *
  50. * Takes a bitmap of frame types to drop
  51. * @E.g.
  52. * # disable feature
  53. * gHwFilterMode=0
  54. * # drop all broadcast frames, except ARP (default)
  55. * gHwFilterMode=1
  56. * # drop all multicast frames, except ICMPv6
  57. * gHwFilterMode=2
  58. * # drop all broadcast and multicast frames, except ARP and ICMPv6
  59. * gHwFilterMode=3
  60. *
  61. * Related: N/A
  62. *
  63. * Usage: Internal/External
  64. *
  65. * </ini>
  66. */
  67. #define CFG_PMO_HW_FILTER_MODE CFG_INI_UINT( \
  68. "gHwFilterMode", \
  69. 0, \
  70. 3, \
  71. 1, \
  72. CFG_VALUE_OR_DEFAULT, \
  73. "hardware filter for DTIM mode")
  74. /*
  75. * <ini>
  76. * ssdp - Enable/disable SSDP
  77. * @Min: 0
  78. * @Max: 1
  79. * @Default: 1
  80. *
  81. * This ini is used to enable/disable Simple Service Discovery Protocol(SSDP).
  82. *
  83. * Usage: External
  84. *
  85. * </ini>
  86. */
  87. #define CFG_PMO_ENABLE_HOST_SSDP CFG_INI_BOOL( \
  88. "ssdp", \
  89. 1, \
  90. "Enable/disable ssdp")
  91. /*
  92. * <ini>
  93. * hostNSOffload - Enable/disable NS offload
  94. * @Min: 0
  95. * @Max: 1
  96. * @Default: 1
  97. *
  98. * This ini is used to enable/disable NS offload.
  99. *
  100. * Usage: External
  101. *
  102. * </ini>
  103. */
  104. #define CFG_PMO_ENABLE_HOST_NSOFFLOAD CFG_INI_BOOL( \
  105. "hostNSOffload", \
  106. 1, \
  107. "Enable/disable NS offload")
  108. /*
  109. * <ini>
  110. * gEnableDynamicDTIM - Enable Dynamic DTIM
  111. * @Min: 0
  112. * @Max: 9
  113. * @Default: 0
  114. *
  115. * This ini is used to enable/disable dynamic DTIM.
  116. *
  117. * 0 - Disable Dynamic DTIM
  118. * 1 to 5 - SLM will switch to DTIM specified here when host suspends and
  119. * switch DTIM1 when host resumes
  120. *
  121. * Usage: External
  122. *
  123. * </ini>
  124. */
  125. #define CFG_PMO_ENABLE_DYNAMIC_DTIM CFG_INI_UINT( \
  126. "gEnableDynamicDTIM", \
  127. 0, \
  128. 9, \
  129. 0, \
  130. CFG_VALUE_OR_DEFAULT, \
  131. "Enable Dynamic DTIM")
  132. /*
  133. * <ini>
  134. * gEnableModulatedDTIM - Enable/Disable modulated DTIM feature
  135. * @Min: 0
  136. * @Max: 5
  137. * @Default: 0
  138. *
  139. * This ini is used to enable/disable modulated DTIM feature.
  140. *
  141. * 0 - Disable modulated DTIM.
  142. * 1 to 5 - The maximum No. of modulated DTIM period used for calculating the
  143. * target listen interval.
  144. *
  145. * The target listen interval will be updated to firmware when host driver is
  146. * setting the suspend DTIM parameters.
  147. *
  148. * This configuration will be ignored when dynamic DTIM is enabled(by
  149. * gEnableDynamicDTIM).
  150. *
  151. * Usage: External
  152. *
  153. * </ini>
  154. */
  155. #define CFG_PMO_ENABLE_MODULATED_DTIM CFG_INI_UINT( \
  156. "gEnableModulatedDTIM", \
  157. 0, \
  158. 5, \
  159. 0, \
  160. CFG_VALUE_OR_DEFAULT, \
  161. "Enable/disable modulated DTIM feature")
  162. /*
  163. * <ini>
  164. * gMCAddrListEnable - Enable/disable multicast MAC address list feature
  165. * @Min: 0
  166. * @Max: 1
  167. * @Default: 1
  168. *
  169. * This ini is used to enable/disable multicast MAC address list feature.
  170. * Default: Enable
  171. *
  172. * Related: None
  173. *
  174. * Supported Feature: STA
  175. *
  176. * Usage: Internal/External
  177. *
  178. * </ini>
  179. */
  180. #define CFG_PMO_MC_ADDR_LIST_ENABLE CFG_INI_BOOL( \
  181. "gMCAddrListEnable", \
  182. 1, \
  183. "Enable/disable multicast MAC address list feature")
  184. /*
  185. * <ini>
  186. * gEnablePowerSaveOffload - Enable Power Save Offload
  187. * @Min: 0
  188. * @Max: 5
  189. * @Default: 2
  190. *
  191. * This ini is used to set Power Save Offload configuration:
  192. * Current values of gEnablePowerSaveOffload:
  193. * 0 -> Power save offload is disabled
  194. * 1 -> Legacy Power save enabled + Deep sleep Disabled
  195. * 2 -> QPower enabled + Deep sleep Disabled
  196. * 3 -> Legacy Power save enabled + Deep sleep Enabled
  197. * 4 -> QPower enabled + Deep sleep Enabled
  198. * 5 -> Duty cycling QPower enabled
  199. *
  200. * Related: None
  201. *
  202. * Supported Feature: Power Save
  203. *
  204. * Usage: External
  205. *
  206. * </ini>
  207. */
  208. #define CFG_PMO_POWERSAVE_OFFLOAD CFG_INI_UINT( \
  209. "gEnablePowerSaveOffload", \
  210. 0, \
  211. 5, \
  212. 2, \
  213. CFG_VALUE_OR_DEFAULT, \
  214. "Enable Power Save Offload")
  215. /*
  216. * <ini>
  217. * gMaxPsPoll - Max powersave poll
  218. * @Min: 0
  219. * @Max: 255
  220. * @Default: 0
  221. *
  222. * This ini is used to set max powersave poll.
  223. *
  224. * Usage: External
  225. *
  226. * </ini>
  227. */
  228. #define CFG_PMO_MAX_PS_POLL CFG_INI_UINT( \
  229. "gMaxPsPoll", \
  230. 0, \
  231. 255, \
  232. 0, \
  233. CFG_VALUE_OR_DEFAULT, \
  234. "Max powersave poll")
  235. /*
  236. * <ini>
  237. * gEnableWoW - Enable/Disable WoW
  238. * @Min: 0
  239. * @Max: 3
  240. * @Default: 3
  241. *
  242. * This ini is used to enable/disable WoW. Configurations are as follows:
  243. * 0 - Disable both magic pattern match and pattern byte match.
  244. * 1 - Enable magic pattern match on all interfaces.
  245. * 2 - Enable pattern byte match on all interfaces.
  246. * 3 - Enable both magic patter and pattern byte match on all interfaces.
  247. *
  248. * Related: None
  249. *
  250. * Supported Feature: Power Save
  251. *
  252. * Usage: External
  253. *
  254. * </ini>
  255. */
  256. #define CFG_PMO_WOW_ENABLE CFG_INI_UINT("gEnableWoW", \
  257. 0, 3, 3, \
  258. CFG_VALUE_OR_DEFAULT, \
  259. "Enable WoW Support")
  260. /*
  261. * <ini>
  262. * wowlan_deauth_enable - Enable/Disable wowlan deauth enable
  263. * @Min: 0
  264. * @Max: 1
  265. * @Default: 1
  266. *
  267. * This ini is used to enable/disable wowlan deauth enable.
  268. *
  269. * Related: None
  270. *
  271. * Supported Feature: Power Save
  272. *
  273. * Usage: External
  274. *
  275. * </ini>
  276. */
  277. #define CFG_PMO_WOWLAN_DEAUTH_ENABLE CFG_INI_BOOL("wowlan_deauth_enable", \
  278. 1, \
  279. "Enable WoWLan deauth")
  280. /*
  281. * <ini>
  282. * wowlan_disassoc_enable - Enable/Disable wowlan disassoc enable
  283. * @Min: 0
  284. * @Max: 1
  285. * @Default: 1
  286. *
  287. * This ini is used to enable/disable wowlan disassoc enable.
  288. *
  289. * Related: None
  290. *
  291. * Supported Feature: Power Save
  292. *
  293. * Usage: External
  294. *
  295. * </ini>
  296. */
  297. #define CFG_PMO_WOWLAN_DISASSOC_ENABLE CFG_INI_BOOL("wowlan_disassoc_enable", \
  298. 1, \
  299. "Enable WoW Support")
  300. /*
  301. * <ini>
  302. * gActiveModeOffload - Active offload mode configuration
  303. * @Min: 0
  304. * @Max: 1
  305. * @Default: 1
  306. *
  307. * When set to 1 active mode offload will be enabled.
  308. *
  309. * If active mode offload is enabled then all applicable data offload/filtering
  310. * is enabled immediately in FW once config is available in WLAN driver and FW
  311. * caches this configuration across suspend/resume;
  312. * If active mode offload is disabled then all applicable data offload/filtering
  313. * is enabled during cfg80211 suspend and disabled during cfg80211 resume.
  314. *
  315. * Supported Feature: Active mode offload
  316. *
  317. * Usage: External
  318. *
  319. * </ini>
  320. */
  321. #define CFG_PMO_ACTIVE_MODE CFG_INI_BOOL("gActiveModeOffload", \
  322. 1, \
  323. "Enable active mode offload")
  324. /*
  325. * <ini>
  326. * g_auto_detect_power_failure_mode - Auto detect power save failure mode
  327. * @Min: PMO_FW_TO_CRASH_ON_PWR_FAILURE
  328. * @Max: PMO_AUTO_PWR_FAILURE_DETECT_DISABLE
  329. * @Default: PMO_FW_TO_CRASH_ON_PWR_FAILURE
  330. *
  331. * Specifies the behavior of FW in case of CHIP_POWER_SAVE_FAIL_DETECTED event
  332. *
  333. * Supported Feature: Auto detect power save failure
  334. *
  335. * Usage: External
  336. *
  337. * </ini>
  338. */
  339. #define CFG_PMO_PWR_FAILURE CFG_INI_UINT("g_auto_detect_power_failure_mode", \
  340. PMO_FW_TO_CRASH_ON_PWR_FAILURE, \
  341. PMO_AUTO_PWR_FAILURE_DETECT_DISABLE, \
  342. PMO_FW_TO_CRASH_ON_PWR_FAILURE, \
  343. CFG_VALUE_OR_DEFAULT, \
  344. "Auto detect power save failure mode")
  345. /*
  346. * <ini>
  347. * gEnableSapSuspend - Enable/disable SAP Suspend
  348. * @Min: 0
  349. * @Max: 1
  350. * @Default: 0
  351. *
  352. *
  353. * Related: None
  354. *
  355. * Supported Feature: SAP
  356. *
  357. * Usage: External
  358. *
  359. * </ini>
  360. */
  361. #define CFG_ENABLE_SAP_SUSPEND CFG_INI_BOOL( \
  362. "gEnableSapSuspend", \
  363. 1, \
  364. "Enable/disable SAP Suspend")
  365. /*
  366. * <ini>
  367. * g_wow_data_inactivity_timeout - Data activity timeout in wow mode.
  368. * @Min: 1
  369. * @Max: 255
  370. * @Default: 50
  371. *
  372. * This ini is used to set data inactivity timeout in wow mode.
  373. *
  374. * Supported Feature: inactivity timeout in wow mode
  375. *
  376. * Usage: External
  377. *
  378. * </ini>
  379. */
  380. #define CFG_PMO_WOW_DATA_INACTIVITY_TIMEOUT CFG_INI_UINT( \
  381. "g_wow_data_inactivity_timeout", \
  382. 1, \
  383. 255, \
  384. 50, \
  385. CFG_VALUE_OR_DEFAULT, \
  386. "Data activity timeout in wow mode")
  387. /*
  388. * <ini>
  389. * gRArateLimitInterval - RA rate limit interval
  390. * @Min: 60
  391. * @Max: 3600
  392. * @Default: 60
  393. * This ini is used to set RA rate limit interval.
  394. *
  395. * Usage: External
  396. *
  397. * </ini>
  398. */
  399. #define CFG_RA_RATE_LIMIT_INTERVAL CFG_INI_UINT( \
  400. "gRArateLimitInterval", \
  401. 60, \
  402. 3600, \
  403. 60, \
  404. CFG_VALUE_OR_DEFAULT, \
  405. "RA rate limit interval")
  406. #define CFG_PMO_COMMON_ALL \
  407. CFG(CFG_ENABLE_SAP_SUSPEND) \
  408. CFG(CFG_PMO_ENABLE_HOST_ARPOFFLOAD) \
  409. CFG(CFG_PMO_HW_FILTER_MODE) \
  410. CFG(CFG_PMO_ENABLE_HOST_SSDP) \
  411. CFG(CFG_PMO_ENABLE_HOST_NSOFFLOAD) \
  412. CFG(CFG_PMO_ENABLE_DYNAMIC_DTIM) \
  413. CFG(CFG_PMO_ENABLE_MODULATED_DTIM) \
  414. CFG(CFG_PMO_MC_ADDR_LIST_ENABLE) \
  415. CFG(CFG_PMO_POWERSAVE_OFFLOAD) \
  416. CFG(CFG_PMO_MAX_PS_POLL) \
  417. CFG(CFG_PMO_WOWLAN_DEAUTH_ENABLE) \
  418. CFG(CFG_PMO_WOWLAN_DISASSOC_ENABLE) \
  419. CFG(CFG_PMO_WOW_ENABLE) \
  420. CFG(CFG_PMO_ACTIVE_MODE) \
  421. CFG(CFG_PMO_PWR_FAILURE) \
  422. CFG(CFG_PMO_WOW_DATA_INACTIVITY_TIMEOUT) \
  423. CFG(CFG_RA_RATE_LIMIT_INTERVAL)
  424. #endif /* WLAN_PMO_COMMON_CFG_H__ */