wlan_pmo_common_cfg.h 8.5 KB

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