1 /* 2 * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 /** 20 * DOC: Declare various struct, macros which are common for 21 * various pmo related features. 22 * 23 * Note: This file shall not contain public API's prototype/declarations. 24 * 25 */ 26 27 #ifndef _WLAN_PMO_COMMONP_PUBLIC_STRUCT_H_ 28 #define _WLAN_PMO_COMMONP_PUBLIC_STRUCT_H_ 29 30 #include "wlan_cmn.h" 31 #include "wlan_objmgr_cmn.h" 32 #include "wlan_objmgr_global_obj.h" 33 #include "wmi_unified.h" 34 #include "qdf_status.h" 35 #include "qdf_lock.h" 36 #include "qdf_event.h" 37 #include "wlan_pmo_hw_filter_public_struct.h" 38 39 40 #define PMO_IPV4_ARP_REPLY_OFFLOAD 0 41 #define PMO_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1 42 #define PMO_IPV6_NS_OFFLOAD 2 43 #define PMO_OFFLOAD_DISABLE 0 44 #define PMO_OFFLOAD_ENABLE 1 45 46 #define PMO_MAC_NS_OFFLOAD_SIZE 1 47 #define PMO_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA 16 48 #define PMO_IPV6_ADDR_VALID 1 49 #define PMO_IPV6_ADDR_UC_TYPE 0 50 #define PMO_IPV6_ADDR_AC_TYPE 1 51 52 53 #define PMO_WOW_REQUIRED_CREDITS 1 54 55 #define MAX_MC_IP_ADDR 10 56 #define IGMP_QUERY_ADDRESS 0x10000e0 57 58 #define WOW_LARGE_RX_RTPM_DELAY 1200 59 60 /** 61 * enum pmo_vdev_param_id: tell vdev param id 62 * @pmo_vdev_param_listen_interval: vdev listen interval param id 63 * @pmo_vdev_param_dtim_policy: vdev param dtim policy 64 * @pmo_vdev_param_forced_dtim_count: vdev param forced dtim count 65 * @pmo_vdev_param_moddtim: vdev param moddtim 66 * @pmo_vdev_max_param: Max vdev param id 67 */ 68 enum pmo_vdev_param_id { 69 pmo_vdev_param_listen_interval = 0, 70 pmo_vdev_param_dtim_policy, 71 pmo_vdev_param_forced_dtim_count, 72 pmo_vdev_param_moddtim, 73 pmo_vdev_max_param 74 }; 75 76 /** 77 * enum pmo_beacon_dtim_policy: tell vdev beacon policy 78 * @pmo_ignore_dtim: fwr need to igonre dtime policy 79 * @pmo_normal_dtim: fwr need to use normal dtime policy 80 * @pmo_stick_dtim: fwr need to use stick dtime policy 81 * @pmo_auto_dtim: fwr need to auto dtime policy 82 */ 83 enum pmo_beacon_dtim_policy { 84 pmo_ignore_dtim = 0x01, 85 pmo_normal_dtim = 0x02, 86 pmo_stick_dtim = 0x03, 87 pmo_auto_dtim = 0x04, 88 }; 89 90 /** 91 * enum pmo_sta_powersave_param - STA powersave parameters 92 * @pmo_sta_ps_param_rx_wake_policy: Controls how frames are retrievd from AP 93 * while STA is sleeping. 94 * @pmo_sta_ps_param_tx_wake_threshold: STA will go active after this many TX 95 * @pmo_sta_ps_param_pspoll_count:No of PS-Poll to send before STA wakes up 96 * @pmo_sta_ps_param_inactivity_time: TX/RX inactivity time in msec before 97 * going to sleep. 98 * @pmo_sta_ps_param_uapsd: Set uapsd configuration. 99 * @pmo_sta_ps_param_advanced_power_pspoll_count: No of PS-Poll to send before 100 * STA wakes up in Advanced Power Save Mode. 101 * @pmo_sta_ps_enable_advanced_power: Enable Advanced Power Save 102 * @pmo_sta_ps_param_advanced_power_max_tx_before_wake: Number of TX frames 103 * before the entering the Active state 104 * @pmo_sta_ps_param_ito_repeat_count: Indicates ito repeated count 105 * @pmo_sta_ps_param_spec_wake_interval: OPM speculative wake interval 106 */ 107 enum pmo_sta_powersave_param { 108 pmo_sta_ps_param_rx_wake_policy = 0, 109 pmo_sta_ps_param_tx_wake_threshold = 1, 110 pmo_sta_ps_param_pspoll_count = 2, 111 pmo_sta_ps_param_inactivity_time = 3, 112 pmo_sta_ps_param_uapsd = 4, 113 pmo_sta_ps_param_advanced_power_pspoll_count = 5, 114 pmo_sta_ps_enable_advanced_power = 6, 115 pmo_sta_ps_param_advanced_power_max_tx_before_wake = 7, 116 pmo_sta_ps_param_ito_repeat_count = 8, 117 pmo_sta_ps_param_spec_wake_interval = 9, 118 }; 119 120 /** 121 * enum pmo_wow_resume_trigger - resume trigger override setting values 122 * @PMO_WOW_RESUME_TRIGGER_DEFAULT: fw to use platform default resume trigger 123 * @PMO_WOW_RESUME_TRIGGER_HTC_WAKEUP: force fw to use HTC Wakeup to resume 124 * @PMO_WOW_RESUME_TRIGGER_GPIO: force fw to use GPIO to resume 125 * @PMO_WOW_RESUME_TRIGGER_COUNT: number of resume trigger options 126 */ 127 enum pmo_wow_resume_trigger { 128 /* always first */ 129 PMO_WOW_RESUME_TRIGGER_DEFAULT = 0, 130 PMO_WOW_RESUME_TRIGGER_HTC_WAKEUP, 131 PMO_WOW_RESUME_TRIGGER_GPIO, 132 /* always last */ 133 PMO_WOW_RESUME_TRIGGER_COUNT 134 }; 135 136 /** 137 * enum pmo_wow_interface_pause - interface pause override setting values 138 * @PMO_WOW_INTERFACE_PAUSE_DEFAULT: use platform default iface pause setting 139 * @PMO_WOW_INTERFACE_PAUSE_ENABLE: force interface pause setting to enabled 140 * @PMO_WOW_INTERFACE_PAUSE_DISABLE: force interface pause setting to disabled 141 * @PMO_WOW_INTERFACE_PAUSE_COUNT: number of interface pause options 142 */ 143 enum pmo_wow_interface_pause { 144 /* always first */ 145 PMO_WOW_INTERFACE_PAUSE_DEFAULT = 0, 146 PMO_WOW_INTERFACE_PAUSE_ENABLE, 147 PMO_WOW_INTERFACE_PAUSE_DISABLE, 148 /* always last */ 149 PMO_WOW_INTERFACE_PAUSE_COUNT 150 }; 151 152 /** 153 * enum pmo_wow_enable_type - used to enable/disable WoW. 154 * @PMO_WOW_DISABLE_BOTH: Disable both magic pattern match and pattern 155 * byte match. 156 * @PMO_WOW_ENABLE_MAGIC_PATTERN: Enable magic pattern match on all interfaces. 157 * @PMO_WOW_ENABLE_PATTERN_BYTE: Enable pattern byte match on all interfaces. 158 * @PMO_WOW_ENABLE_BOTH: Enable both magic pattern and pattern byte match on 159 * all interfaces. 160 */ 161 enum pmo_wow_enable_type { 162 PMO_WOW_DISABLE_BOTH = 0, 163 PMO_WOW_ENABLE_MAGIC_PATTERN, 164 PMO_WOW_ENABLE_PATTERN_BYTE, 165 PMO_WOW_ENABLE_BOTH 166 }; 167 168 /** 169 * enum powersave_mode - powersave_mode 170 * @PMO_PS_ADVANCED_POWER_SAVE_DISABLE: Disable advanced power save mode 171 * @PMO_PS_ADVANCED_POWER_SAVE_ENABLE: Enable power save mode 172 * @PMO_PS_ADVANCED_POWER_SAVE_USER_DEFINED: User Defined 173 */ 174 enum powersave_mode { 175 PMO_PS_ADVANCED_POWER_SAVE_DISABLE = 0, 176 PMO_PS_ADVANCED_POWER_SAVE_ENABLE = 1, 177 PMO_PS_ADVANCED_POWER_SAVE_USER_DEFINED = 2 178 }; 179 180 /** 181 * enum pmo_suspend_mode - suspend_mode 182 * @PMO_SUSPEND_NONE: Does not support suspend 183 * @PMO_SUSPEND_LEGENCY: Legency PDEV suspend mode 184 * @PMO_SUSPEND_WOW: WoW suspend mode 185 * @PMO_SUSPEND_SHUTDOWN: Shutdown suspend mode. Shutdown while suspend 186 */ 187 enum pmo_suspend_mode { 188 PMO_SUSPEND_NONE = 0, 189 PMO_SUSPEND_LEGENCY, 190 PMO_SUSPEND_WOW, 191 PMO_SUSPEND_SHUTDOWN 192 }; 193 194 #define PMO_TARGET_SUSPEND_TIMEOUT (4000) 195 #define PMO_WAKE_LOCK_TIMEOUT 1000 196 #define PMO_RESUME_TIMEOUT (4000) 197 198 /** 199 * struct pmo_wow_enable_params - A collection of wow enable override parameters 200 * @is_unit_test: true to notify fw this is a unit-test suspend 201 * @interface_pause: used to override the interface pause indication sent to fw 202 * @resume_trigger: used to force fw to use a particular resume method 203 */ 204 struct pmo_wow_enable_params { 205 bool is_unit_test; 206 enum pmo_wow_interface_pause interface_pause; 207 enum pmo_wow_resume_trigger resume_trigger; 208 }; 209 210 /** 211 * typedef pmo_psoc_suspend_handler() - psoc suspend handler 212 * @psoc: psoc being suspended 213 * @arg: iterator argument 214 * 215 * Return: QDF_STATUS_SUCCESS if suspended, QDF_STATUS_E_* if failure 216 */ 217 typedef QDF_STATUS(*pmo_psoc_suspend_handler) 218 (struct wlan_objmgr_psoc *psoc, void *arg); 219 220 /** 221 * typedef pmo_psoc_resume_handler() - psoc resume handler 222 * @psoc: psoc being resumed 223 * @arg: iterator argument 224 * 225 * Return: QDF_STATUS_SUCCESS if resumed, QDF_STATUS_E_* if failure 226 */ 227 typedef QDF_STATUS (*pmo_psoc_resume_handler) 228 (struct wlan_objmgr_psoc *psoc, void *arg); 229 230 /** 231 * enum pmo_offload_trigger: trigger information 232 * @pmo_apps_suspend: trigger is apps suspend 233 * @pmo_apps_resume: trigger is apps resume 234 * @pmo_runtime_suspend: trigger is runtime suspend 235 * @pmo_runtime_resume: trigger is runtime resume 236 * @pmo_ipv4_change_notify: trigger is ipv4 change handler 237 * @pmo_ipv6_change_notify: trigger is ipv6 change handler 238 * @pmo_mc_list_change_notify: trigger is multicast list change 239 * @pmo_ns_offload_dynamic_update: enable/disable ns offload on the fly 240 * @pmo_peer_disconnect: trigger is peer disconnect 241 * @pmo_mcbc_setting_dynamic_update: mcbc value update on the fly 242 * @pmo_arp_ns_offload_dynamic_update: enable/disable arp/ns offload on the fly 243 * 244 * @pmo_offload_trigger_max: Max trigger value 245 */ 246 enum pmo_offload_trigger { 247 pmo_apps_suspend = 0, 248 pmo_apps_resume, 249 pmo_runtime_suspend, 250 pmo_runtime_resume, 251 pmo_ipv4_change_notify, 252 pmo_ipv6_change_notify, 253 pmo_mc_list_change_notify, 254 pmo_ns_offload_dynamic_update, 255 pmo_peer_disconnect, 256 pmo_mcbc_setting_dynamic_update, 257 pmo_arp_ns_offload_dynamic_update, 258 259 pmo_offload_trigger_max, 260 }; 261 262 /** 263 * enum pmo_auto_pwr_detect_failure_mode - auto detect failure modes 264 * @PMO_FW_TO_CRASH_ON_PWR_FAILURE: Don't register wow wakeup event and FW 265 * crashes on power failure 266 * @PMO_FW_TO_SEND_WOW_IND_ON_PWR_FAILURE: Register wow wakeup event and FW 267 * sends failure event to host on power failure 268 * @PMO_FW_TO_REJUVENATE_ON_PWR_FAILURE: Don't register wow wakeup event and 269 * FW silently rejuvenate on power failure 270 * @PMO_AUTO_PWR_FAILURE_DETECT_DISABLE: Don't register wow wakeup event and the 271 * auto power failure detect feature is disabled in FW. 272 */ 273 enum pmo_auto_pwr_detect_failure_mode { 274 PMO_FW_TO_CRASH_ON_PWR_FAILURE, 275 PMO_FW_TO_SEND_WOW_IND_ON_PWR_FAILURE, 276 PMO_FW_TO_REJUVENATE_ON_PWR_FAILURE, 277 PMO_AUTO_PWR_FAILURE_DETECT_DISABLE 278 }; 279 280 /** 281 * enum active_apf_mode - the modes active APF can operate in 282 * @ACTIVE_APF_DISABLED: APF is disabled in active mode 283 * @ACTIVE_APF_ENABLED: APF is enabled for all packets 284 * @ACTIVE_APF_ADAPTIVE: APF is enabled for packets up to some threshold 285 * @ACTIVE_APF_MODE_COUNT: The number of active APF modes 286 */ 287 enum active_apf_mode { 288 ACTIVE_APF_DISABLED = 0, 289 ACTIVE_APF_ENABLED, 290 ACTIVE_APF_ADAPTIVE, 291 ACTIVE_APF_MODE_COUNT 292 }; 293 294 /** 295 * enum pmo_gpio_wakeup_mode - gpio wakeup mode 296 * @PMO_GPIO_WAKEUP_MODE_INVALID: gpio wakeup trigger invalid 297 * @PMO_GPIO_WAKEUP_MODE_RISING: gpio wakeup trigger rising 298 * @PMO_GPIO_WAKEUP_MODE_FALLING: gpio wakeup trigger failing 299 * @PMO_GPIO_WAKEUP_MODE_HIGH: gpio wakeup trigger high 300 * @PMO_GPIO_WAKEUP_MODE_LOW: gpio wakeup trigger low 301 */ 302 enum pmo_gpio_wakeup_mode { 303 PMO_GPIO_WAKEUP_MODE_INVALID, 304 PMO_GPIO_WAKEUP_MODE_RISING, 305 PMO_GPIO_WAKEUP_MODE_FALLING, 306 PMO_GPIO_WAKEUP_MODE_HIGH, 307 PMO_GPIO_WAKEUP_MODE_LOW, 308 }; 309 310 #ifdef WLAN_FEATURE_ICMP_OFFLOAD 311 #define ICMP_MAX_IPV6_ADDRESS 16 312 313 /** 314 * struct pmo_icmp_offload - structure to hold icmp param 315 * 316 * @vdev_id: vdev id 317 * @enable: enable/disable 318 * @trigger: icmp offload trigger information 319 * @ipv6_count: number of host ipv6 address 320 * @ipv4_addr: host interface ipv4 address 321 * @ipv6_addr: array of host ipv6 address 322 * 323 **/ 324 struct pmo_icmp_offload { 325 uint8_t vdev_id; 326 bool enable; 327 enum pmo_offload_trigger trigger; 328 uint8_t ipv6_count; 329 uint8_t ipv4_addr[QDF_IPV4_ADDR_SIZE]; 330 uint8_t ipv6_addr[ICMP_MAX_IPV6_ADDRESS][QDF_IPV6_ADDR_SIZE]; 331 }; 332 #endif 333 334 /* 335 * enum pmo_page_fault_action - Host action on FW page fault 336 * @PMO_PF_HOST_ACTION_NO_OP: Host will ignore PF wakeup event. 337 * @PMO_PF_HOST_ACTION_TRIGGER_SSR: Host will trigger SSR on PF threshold. 338 * @PMO_PF_HOST_ACTION_NOTIFY_APPS: Host will notify APPS on PF threshold. 339 * 340 * @PMO_PF_HOST_ACTION_MAX: Reserved and invalid value 341 */ 342 enum pmo_page_fault_action { 343 PMO_PF_HOST_ACTION_NO_OP = 0, 344 PMO_PF_HOST_ACTION_TRIGGER_SSR = 1, 345 PMO_PF_HOST_ACTION_NOTIFY_APPS = 2, 346 347 /* Keep it last */ 348 PMO_PF_HOST_ACTION_MAX, 349 }; 350 351 /** 352 * struct pmo_psoc_cfg - user configuration required for pmo 353 * @ptrn_match_enable_all_vdev: true when pattern match is enable for all vdev 354 * @apf_enable: true if psoc supports apf else false 355 * @arp_offload_enable: true if arp offload is supported for psoc else false 356 * @hw_filter_mode_bitmap: which mode the hardware filter should use during DTIM 357 * @ns_offload_enable_static: true if psoc supports ns offload in ini else false 358 * @ns_offload_enable_dynamic: to enable / disable the ns offload using 359 * ioctl or vendor command. 360 * @packet_filter_enabled: true if feature is enabled by configuration 361 * @ssdp: true if psoc supports if ssdp configuration in wow mode 362 * @enable_mc_list: true if psoc supports mc addr list else false 363 * @active_mode_offload: true if psoc supports active mode offload else false 364 * @ap_arpns_support: true if psoc supports arp ns for ap mode 365 * @d0_wow_supported: true if psoc supports D0 wow command 366 * @ra_ratelimit_enable: true when ra filtering ins eanbled else false 367 * @ra_ratelimit_interval: ra packets interval 368 * @magic_ptrn_enable: true when magic pattern is enabled else false 369 * @deauth_enable: true when wake up on deauth is enabled else false 370 * @disassoc_enable: true when wake up on disassoc is enabled else false 371 * @lpass_enable: true when lpass is enabled else false 372 * @max_ps_poll: max power save poll 373 * @sta_dynamic_dtim: station dynamic DTIM value 374 * @sta_mod_dtim: station modulated DTIM value 375 * @sta_max_li_mod_dtim: station max listen interval DTIM value 376 * @sta_forced_dtim: station forced DTIM value 377 * @wow_enable: enable wow with majic pattern match or pattern byte match 378 * @power_save_mode: power save mode for psoc 379 * @default_power_save_mode: default power save mode for psoc 380 * @suspend_mode: suspend mode for psoc 381 * @runtime_pm_delay: set runtime pm's inactivity timer 382 * @extwow_goto_suspend: true when extended WoW enabled else false 383 * @extwow_app1_wakeup_pin_num: set wakeup1 PIN number 384 * @extwow_app2_wakeup_pin_num: set wakeup2 PIN number 385 * @extwow_app2_init_ping_interval: set keep alive init ping interval 386 * @extwow_app2_min_ping_interval: set keep alive minimum ping interval 387 * @extwow_app2_max_ping_interval: set keep alive maximum ping interval 388 * @extwow_app2_inc_ping_interval: set keep alive increment ping interval 389 * @extwow_app2_tcp_src_port: set TCP source port 390 * @extwow_app2_tcp_dst_port: set TCP dest port 391 * @extwow_app2_tcp_tx_timeout: set TCP TX timeout 392 * @extwow_app2_tcp_rx_timeout: set TCP RX timeout 393 * @auto_power_save_fail_mode: auto detect power save failure 394 * @is_wow_pulse_supported: true when wow pulse feature is enabled else false 395 * @wow_pulse_pin: GPIO pin of wow pulse feature 396 * @wow_pulse_interval_high: The interval of high level in the pulse 397 * @wow_pulse_interval_low: The interval of low level in the pulse 398 * @wow_pulse_repeat_count: Pulse repeat count 399 * @wow_pulse_init_state: Pulse init level 400 * @packet_filters_bitmap: Packet filter bitmap configuration 401 * @enable_sap_suspend: enable SoftAP suspend 402 * @wow_data_inactivity_timeout: power save wow data inactivity timeout 403 * wow mode 404 * @wow_spec_wake_interval: OPM speculatvie wkae interval in wow mode 405 * @active_uc_apf_mode: Setting that determines how APF is applied in active 406 * mode for uc packets 407 * @active_mc_bc_apf_mode: Setting that determines how APF is applied in 408 * active mode for MC/BC packets 409 * @ito_repeat_count: Indicates ito repeated count 410 * @is_mod_dtim_on_sys_suspend_enabled: true when mod dtim is enabled for 411 * system suspend wow else false 412 * @is_bus_suspend_enabled_in_sap_mode: Can bus suspend in SoftAP mode 413 * @is_bus_suspend_enabled_in_go_mode: Can bus suspend in P2P GO mode 414 * @enable_gpio_wakeup: enable gpio wakeup 415 * @gpio_wakeup_pin: gpio wakeup pin 416 * @gpio_wakeup_mode: gpio wakeup mode 417 * @igmp_version_support: igmp version support 418 * @igmp_offload_enable: enable/disable igmp offload feature to fw 419 * @disconnect_sap_tdls_in_wow: sap/p2p_go disconnect or teardown tdls link 420 * @is_icmp_offload_enable: true if icmp offload is supported 421 * for psoc else false 422 * @host_pf_action: Action to take on page fault 423 * @min_pagefault_wakeups_for_action: Min number of pagefaults after which 424 * host needs to start act upon. 425 * @interval_for_pagefault_wakeup_counts: Time in ms in which max pagefault 426 * wakeups needs to be monitored. 427 * @ssr_frequency_on_pagefault: Time in ms in which SSR needs to be triggered 428 * on max pagefault 429 */ 430 struct pmo_psoc_cfg { 431 bool ptrn_match_enable_all_vdev; 432 bool apf_enable; 433 bool arp_offload_enable; 434 enum pmo_hw_filter_mode hw_filter_mode_bitmap; 435 bool ns_offload_enable_static; 436 bool ns_offload_enable_dynamic; 437 bool packet_filter_enabled; 438 bool ssdp; 439 bool enable_mc_list; 440 bool active_mode_offload; 441 bool ap_arpns_support; 442 bool d0_wow_supported; 443 bool ra_ratelimit_enable; 444 #ifdef FEATURE_WLAN_RA_FILTERING 445 uint16_t ra_ratelimit_interval; 446 #endif 447 bool magic_ptrn_enable; 448 bool deauth_enable; 449 bool disassoc_enable; 450 bool lpass_enable; 451 uint8_t max_ps_poll; 452 uint8_t sta_dynamic_dtim; 453 uint8_t sta_mod_dtim; 454 uint8_t sta_max_li_mod_dtim; 455 bool sta_forced_dtim; 456 enum pmo_wow_enable_type wow_enable; 457 enum powersave_mode power_save_mode; 458 enum powersave_mode default_power_save_mode; 459 enum pmo_suspend_mode suspend_mode; 460 #ifdef FEATURE_RUNTIME_PM 461 uint32_t runtime_pm_delay; 462 #endif 463 #ifdef WLAN_FEATURE_EXTWOW_SUPPORT 464 bool extwow_goto_suspend; 465 uint8_t extwow_app1_wakeup_pin_num; 466 uint8_t extwow_app2_wakeup_pin_num; 467 uint32_t extwow_app2_init_ping_interval; 468 uint32_t extwow_app2_min_ping_interval; 469 uint32_t extwow_app2_max_ping_interval; 470 uint32_t extwow_app2_inc_ping_interval; 471 uint16_t extwow_app2_tcp_src_port; 472 uint16_t extwow_app2_tcp_dst_port; 473 uint32_t extwow_app2_tcp_tx_timeout; 474 uint32_t extwow_app2_tcp_rx_timeout; 475 #endif 476 enum pmo_auto_pwr_detect_failure_mode auto_power_save_fail_mode; 477 #ifdef WLAN_FEATURE_WOW_PULSE 478 bool is_wow_pulse_supported; 479 uint8_t wow_pulse_pin; 480 uint16_t wow_pulse_interval_high; 481 uint16_t wow_pulse_interval_low; 482 uint32_t wow_pulse_repeat_count; 483 uint32_t wow_pulse_init_state; 484 #endif 485 #ifdef WLAN_FEATURE_PACKET_FILTERING 486 uint8_t packet_filters_bitmap; 487 #endif 488 bool enable_sap_suspend; 489 uint8_t wow_data_inactivity_timeout; 490 uint8_t wow_spec_wake_interval; 491 enum active_apf_mode active_uc_apf_mode; 492 enum active_apf_mode active_mc_bc_apf_mode; 493 uint8_t ito_repeat_count; 494 bool is_mod_dtim_on_sys_suspend_enabled; 495 bool is_bus_suspend_enabled_in_sap_mode; 496 bool is_bus_suspend_enabled_in_go_mode; 497 #ifdef WLAN_ENABLE_GPIO_WAKEUP 498 bool enable_gpio_wakeup; 499 uint32_t gpio_wakeup_pin; 500 enum pmo_gpio_wakeup_mode gpio_wakeup_mode; 501 #endif 502 #ifdef WLAN_FEATURE_IGMP_OFFLOAD 503 uint32_t igmp_version_support; 504 bool igmp_offload_enable; 505 #endif 506 bool disconnect_sap_tdls_in_wow; 507 #ifdef WLAN_FEATURE_ICMP_OFFLOAD 508 bool is_icmp_offload_enable; 509 #endif 510 enum pmo_page_fault_action host_pf_action; 511 uint8_t min_pagefault_wakeups_for_action; 512 uint32_t interval_for_pagefault_wakeup_counts; 513 uint32_t ssr_frequency_on_pagefault; 514 }; 515 516 /** 517 * struct pmo_device_caps - device capability flags (true if feature is 518 * supported) 519 * @apf: Android Packet Filter (aka BPF) 520 * @arp_ns_offload: APR/NS offload 521 * @packet_filter: Legacy "Packet Filter" 522 * @unified_wow: Firmware supports "interface pause" flag in WoW command. 523 * This allows both D0-WoW (bus up) and Non-D0-WoW (bus down) to use one 524 * unified command 525 * @li_offload: Firmware has listen interval offload support 526 */ 527 struct pmo_device_caps { 528 bool apf; 529 bool arp_ns_offload; 530 bool packet_filter; 531 bool unified_wow; 532 bool li_offload; 533 }; 534 535 /** 536 * struct pmo_igmp_offload_req - structure to hold igmp param 537 * 538 * @vdev_id: vdev id 539 * @enable: enable/disable 540 * @version_support: version support 541 * @num_grp_ip_address: num grp ip addr 542 * @grp_ip_address: array of grp_ip_address 543 * 544 **/ 545 struct pmo_igmp_offload_req { 546 uint32_t vdev_id; 547 bool enable; 548 uint32_t version_support; 549 uint32_t num_grp_ip_address; 550 uint32_t grp_ip_address[MAX_MC_IP_ADDR]; 551 }; 552 553 /** 554 * struct pmo_ps_params - structure to hold OPM params 555 * 556 * @opm_mode: OPM mode 557 * @ps_ito: power save inactivity timeout 558 * @spec_wake: OPM speculative wake interval 559 */ 560 struct pmo_ps_params { 561 enum powersave_mode opm_mode; 562 uint16_t ps_ito; 563 uint16_t spec_wake; 564 }; 565 #endif /* end of _WLAN_PMO_COMMONP_STRUCT_H_ */ 566