From 70afa0e409fb6df8ae7e0211c49dba991137b647 Mon Sep 17 00:00:00 2001 From: Wu Gao Date: Tue, 16 Oct 2018 16:19:55 +0800 Subject: [PATCH] qcacld-3.0: Split PMO configures into different files Split PMO configures into different files by feature. Remove unnecessary macro limitation. Change-Id: I1e431fd2f38988c771e02c979c5ce55d0627e605 CRs-Fixed: 2323999 --- .../pmo/dispatcher/inc/wlan_pmo_apf_cfg.h | 44 + components/pmo/dispatcher/inc/wlan_pmo_cfg.h | 808 +----------------- .../pmo/dispatcher/inc/wlan_pmo_common_cfg.h | 365 ++++++++ .../inc/wlan_pmo_common_public_struct.h | 2 - .../pmo/dispatcher/inc/wlan_pmo_extwow_cfg.h | 278 ++++++ .../dispatcher/inc/wlan_pmo_pkt_filter_cfg.h | 63 ++ .../dispatcher/inc/wlan_pmo_runtime_pm_cfg.h | 55 ++ .../dispatcher/inc/wlan_pmo_wow_pulse_cfg.h | 112 +++ 8 files changed, 927 insertions(+), 800 deletions(-) create mode 100644 components/pmo/dispatcher/inc/wlan_pmo_apf_cfg.h create mode 100644 components/pmo/dispatcher/inc/wlan_pmo_common_cfg.h create mode 100644 components/pmo/dispatcher/inc/wlan_pmo_extwow_cfg.h create mode 100644 components/pmo/dispatcher/inc/wlan_pmo_pkt_filter_cfg.h create mode 100644 components/pmo/dispatcher/inc/wlan_pmo_runtime_pm_cfg.h create mode 100644 components/pmo/dispatcher/inc/wlan_pmo_wow_pulse_cfg.h diff --git a/components/pmo/dispatcher/inc/wlan_pmo_apf_cfg.h b/components/pmo/dispatcher/inc/wlan_pmo_apf_cfg.h new file mode 100644 index 000000000000..4419d26b62b8 --- /dev/null +++ b/components/pmo/dispatcher/inc/wlan_pmo_apf_cfg.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef WLAN_PMO_APF_CFG_H__ +#define WLAN_PMO_APF_CFG_H__ + +/* + * + * gBpfFilterEnable - APF feature support configuration + * @Min: 0 + * @Max: 1 + * @Default: 1 + * + * When set to 1 APF feature will be enabled. + * + * Supported Feature: Android packet filter + * + * Usage: External + * + * + */ +#define CFG_PMO_APF_ENABLE CFG_INI_BOOL("gBpfFilterEnable", \ + 1, \ + "Enable APF Support") + +#define CFG_PMO_APF_ALL \ + CFG(CFG_PMO_APF_ENABLE) + +#endif /* WLAN_PMO_APF_CFG_H__ */ diff --git a/components/pmo/dispatcher/inc/wlan_pmo_cfg.h b/components/pmo/dispatcher/inc/wlan_pmo_cfg.h index f92b4bf4bffc..f51a027c63ad 100644 --- a/components/pmo/dispatcher/inc/wlan_pmo_cfg.h +++ b/components/pmo/dispatcher/inc/wlan_pmo_cfg.h @@ -19,807 +19,19 @@ #ifndef WLAN_PMO_CFG_H__ #define WLAN_PMO_CFG_H__ -#include "wlan_pmo_common_public_struct.h" - -/* - * - * hostArpOffload - Enable/disable host ARP offload - * @Min: 0 - * @Max: 1 - * @Default: 1 - * - * This ini is used to enable/disable host ARP offload. - * - * Usage: External - * - * - */ -#define CFG_PMO_ENABLE_HOST_ARPOFFLOAD CFG_INI_BOOL( \ - "hostArpOffload", \ - 1, \ - "enable/disable host arp offload") - -/* - * - * gHwFilterMode - configure hardware filter for DTIM mode - * @Min: 0 - * @Max: 3 - * @Default: 1 - * - * The hardware filter is only effective in DTIM mode. Use this configuration - * to blanket drop broadcast/multicast packets at the hardware level, without - * waking up the firmware - * - * Takes a bitmap of frame types to drop - * @E.g. - * # disable feature - * gHwFilterMode=0 - * # drop all broadcast frames, except ARP (default) - * gHwFilterMode=1 - * # drop all multicast frames, except ICMPv6 - * gHwFilterMode=2 - * # drop all broadcast and multicast frames, except ARP and ICMPv6 - * gHwFilterMode=3 - * - * Related: N/A - * - * Usage: Internal/External - * - * - */ -#define CFG_PMO_HW_FILTER_MODE CFG_INI_UINT( \ - "gHwFilterMode", \ - 0, \ - 3, \ - 1, \ - CFG_VALUE_OR_DEFAULT, \ - "hardware filter for DTIM mode") - -/* - * - * ssdp - Enable/disable ssdp - * @Min: 0 - * @Max: 1 - * @Default: 1 - * - * This ini is used to enable/disable ssdp. - * - * Usage: External - * - * - */ -#define CFG_PMO_ENABLE_HOST_SSDP CFG_INI_BOOL( \ - "ssdp", \ - 1, \ - "Enable/disable ssdp") - -#ifdef FEATURE_RUNTIME_PM -/* - * - * gRuntimePMDelay - Set runtime pm's inactivity timer - * @Min: 100 - * @Max: 10000 - * @Default: 500 - * - * This ini is used to set runtime pm's inactivity timer value. - * the wlan driver will wait for this number of milliseconds of - * inactivity before performing a runtime suspend. - * - * Related: gRuntimePM - * - * Supported Feature: Power Save - * - * Usage: External - * - * - */ -#define CFG_PMO_RUNTIME_PM_DELAY CFG_INI_UINT( \ - "gRuntimePMDelay", \ - 100, \ - 10000, \ - 500, \ - CFG_VALUE_OR_DEFAULT, \ - "Set runtime pm's inactivity timer") -#endif /* FEATURE_RUNTIME_PM */ - -/* - * - * hostNSOffload - Enable/disable NS offload - * @Min: 0 - * @Max: 1 - * @Default: 1 - * - * This ini is used to enable/disable NS offload. - * - * Usage: External - * - * - */ -#define CFG_PMO_ENABLE_HOST_NSOFFLOAD CFG_INI_BOOL( \ - "hostNSOffload", \ - 1, \ - "Enable/disable NS offload") - -/* - * - * gEnableDynamicDTIM - Enable Dynamic DTIM - * @Min: 0 - * @Max: 9 - * @Default: 0 - * - * This ini is used to enable/disable ssdp. - * - * 0 -Disable DynamicDTIM - * 1 to 5 - SLM will switch to DTIM specified here when host suspends and - * switch DTIM1 when host resumes - * - * Usage: External - * - * - */ -#define CFG_PMO_ENABLE_DYNAMIC_DTIM CFG_INI_UINT( \ - "gEnableDynamicDTIM", \ - 0, \ - 9, \ - 0, \ - CFG_VALUE_OR_DEFAULT, \ - "Enable Dynamic DTIM") - -/* - * - * gEnableDynamicDTIM - Enable/Disable modulated DTIM feature - * @Min: 0 - * @Max: 5 - * @Default: 0 - * - * This ini is used to enable/disable modulated DTIM feature. - * - * Usage: External - * - * - */ -#define CFG_PMO_ENABLE_MODULATED_DTIM CFG_INI_UINT( \ - "gEnableModulatedDTIM", \ - 0, \ - 5, \ - 0, \ - CFG_VALUE_OR_DEFAULT, \ - "Enable/disable modulated DTIM feature") - -/* - * - * gMCAddrListEnable - Enable/disable multicast MAC address list feature - * @Min: 0 - * @Max: 1 - * @Default: 1 - * - * This ini is used to enable/disable multicast MAC address list feature. - * Default: Enable - * - * Related: None - * - * Supported Feature: STA - * - * Usage: Internal/External - * - * - */ -#define CFG_PMO_MC_ADDR_LIST_ENABLE CFG_INI_BOOL( \ - "gMCAddrListEnable", \ - 1, \ - "Enable/disable multicast MAC address list feature") - -/* - * - * gEnablePowerSaveOffload - Enable Power Save Offload - * @Min: 0 - * @Max: 5 - * @Default: 0 - * - * This ini is used to set Power Save Offload configuration: - * Current values of gEnablePowerSaveOffload: - * 0 -> Power save offload is disabled - * 1 -> Legacy Power save enabled + Deep sleep Disabled - * 2 -> QPower enabled + Deep sleep Disabled - * 3 -> Legacy Power save enabled + Deep sleep Enabled - * 4 -> QPower enabled + Deep sleep Enabled - * 5 -> Duty cycling QPower enabled - * - * Related: None - * - * Supported Feature: Power Save - * - * Usage: External - * - * - */ -#define CFG_PMO_POWERSAVE_OFFLOAD CFG_INI_UINT( \ - "gEnablePowerSaveOffload", \ - 0, \ - 5, \ - 0, \ - CFG_VALUE_OR_DEFAULT, \ - "Enable Power Save Offload") - -/* - * - * gMaxPsPoll - Max powersave poll - * @Min: 0 - * @Max: 255 - * @Default: 0 - * - * This ini is used to set max powersave poll. - * - * Usage: External - * - * - */ -#define CFG_PMO_MAX_PS_POLL CFG_INI_UINT( \ - "gMaxPsPoll", \ - 0, \ - 255, \ - 0, \ - CFG_VALUE_OR_DEFAULT, \ - "Max powersave poll") - -/* - * - * gEnableWoW - Enable/Disable WoW - * @Min: 0 - * @Max: 3 - * @Default: 3 - * - * This ini is used to enable/disable WoW. Configurations are as follows: - * 0 - Disable both magic pattern match and pattern byte match. - * 1 - Enable magic pattern match on all interfaces. - * 2 - Enable pattern byte match on all interfaces. - * 3 - Enable both magic patter and pattern byte match on all interfaces. - * - * Related: None - * - * Supported Feature: Power Save - * - * Usage: External - * - * - */ -#define CFG_PMO_WOW_ENABLE CFG_INI_UINT("gEnableWoW", \ - 0, 3, 3, \ - CFG_VALUE_OR_DEFAULT, \ - "Enable WoW Support") -/* - * - * wowlan_deauth_enable - Enable/Disable wowlan deauth enable - * @Min: 0 - * @Max: 1 - * @Default: 1 - * - * This ini is used to enable/disable wowlan deauth enable. - * - * Related: None - * - * Supported Feature: Power Save - * - * Usage: External - * - * - */ -#define CFG_PMO_WOWLAN_DEAUTH_ENABLE CFG_INI_BOOL("wowlan_deauth_enable", \ - 1, \ - "Enable WoWLan deauth") -/* - * - * wowlan_disassoc_enable - Enable/Disable wowlan disassoc enable - * @Min: 0 - * @Max: 1 - * @Default: 1 - * - * This ini is used to enable/disable wowlan disassoc enable. - * - * Related: None - * - * Supported Feature: Power Save - * - * Usage: External - * - * - */ -#define CFG_PMO_WOWLAN_DISASSOC_ENABLE CFG_INI_BOOL("wowlan_disassoc_enable", \ - 1, \ - "Enable WoW Support") - -#ifdef WLAN_FEATURE_EXTWOW_SUPPORT -/* - * - * gExtWoWgotoSuspend - Enable/Disable Extended WoW - * @Min: 0 - * @Max: 1 - * @Default: 1 - * - * This ini is used to enable/disable Extended WoW. - * - * Related: None - * - * Supported Feature: Power Save - * - * Usage: External - * - * - */ -#define CFG_EXTWOW_GOTO_SUSPEND CFG_INI_BOOL("gExtWoWgotoSuspend", \ - 1, \ - "Enable Ext WoW goto support") -/* - * - * gExtWowApp1WakeupPinNumber - Set wakeup1 PIN number - * @Min: 0 - * @Max: 255 - * @Default: 12 - * - * This ini is used to set EXT WOW APP1 wakeup PIN number - * - * Related: None - * - * Supported Feature: Power Save - * - * Usage: External - * - * - */ -#define CFG_EXTWOW_APP1_WAKE_PIN_NUMBER \ - CFG_INI_UINT("gExtWowApp1WakeupPinNumber", \ - 0, 255, 12, \ - CFG_VALUE_OR_DEFAULT, \ - "Set wakeup1 PIN number") -/* - * - * gExtWowApp2WakeupPinNumber - Set wakeup2 PIN number - * @Min: 0 - * @Max: 255 - * @Default: 16 - * - * This ini is used to set EXT WOW APP2 wakeup PIN number - * - * Related: None - * - * Supported Feature: Power Save - * - * Usage: External - * - * - */ -#define CFG_EXTWOW_APP2_WAKE_PIN_NUMBER \ - CFG_INI_UINT("gExtWowApp2WakeupPinNumber", \ - 0, 255, 16, \ - CFG_VALUE_OR_DEFAULT, \ - "Set wakeup2 PIN number") -/* - * - * gExtWoWApp2KAInitPingInterval - Set Keep Alive Init Ping Interval - * @Min: 0 - * @Max: 0xffffffff - * @Default: 240 - * - * This ini is used to set Keep Alive Init Ping Interval for EXT WOW - * - * Related: None - * - * Supported Feature: Power Save - * - * Usage: External - * - * - */ -#define CFG_EXTWOW_KA_INIT_PING_INTERVAL \ - CFG_INI_UINT("gExtWoWApp2KAInitPingInterval", \ - 0, 0xffffffff, 240, \ - CFG_VALUE_OR_DEFAULT, \ - "Set Keep Alive Init Ping Interval") -/* - * - * gExtWoWApp2KAMinPingInterval - Set Keep Alive Minimum Ping Interval - * @Min: 0 - * @Max: 0xffffffff - * @Default: 240 - * - * This ini is used to set Keep Alive Minimum Ping Interval for EXT WOW - * - * Related: None - * - * Supported Feature: Power Save - * - * Usage: External - * - * - */ -#define CFG_EXTWOW_KA_MIN_PING_INTERVAL \ - CFG_INI_UINT("gExtWoWApp2KAMinPingInterval", \ - 0, 0xffffffff, 240, \ - CFG_VALUE_OR_DEFAULT, \ - "Set Keep Alive Minimum Ping Interval") -/* - * - * gExtWoWApp2KAMaxPingInterval - Set Keep Alive Maximum Ping Interval - * @Min: 0 - * @Max: 0xffffffff - * @Default: 1280 - * - * This ini is used to set Keep Alive Maximum Ping Interval for EXT WOW - * - * Related: None - * - * Supported Feature: Power Save - * - * Usage: External - * - * - */ -#define CFG_EXTWOW_KA_MAX_PING_INTERVAL \ - CFG_INI_UINT("gExtWoWApp2KAMaxPingInterval", \ - 0, 0xffffffff, 1280, \ - CFG_VALUE_OR_DEFAULT, \ - "Set Keep Alive Maximum Ping Interval") -/* - * - * gExtWoWApp2KAIncPingInterval - Set Keep Alive increment of Ping Interval - * @Min: 0 - * @Max: 0xffffffff - * @Default: 4 - * - * This ini is used to set Keep Alive increment of Ping Interval for EXT WOW - * - * Related: None - * - * Supported Feature: Power Save - * - * Usage: External - * - * - */ -#define CFG_EXTWOW_KA_INC_PING_INTERVAL \ - CFG_INI_UINT("gExtWoWApp2KAIncPingInterval", \ - 0, 0xffffffff, 4, \ - CFG_VALUE_OR_DEFAULT, \ - "Set Keep Alive increment of Ping Interval") -/* - * - * gExtWoWApp2KAIncPingInterval - Set TCP source port - * @Min: 0 - * @Max: 65535 - * @Default: 5000 - * - * This ini is used to set TCP source port when EXT WOW is enabled - * - * Related: None - * - * Supported Feature: Power Save - * - * Usage: External - * - * - */ -#define CFG_EXTWOW_TCP_SRC_PORT \ - CFG_INI_UINT("gExtWoWApp2KAIncPingInterval", \ - 0, 65535, 5000, \ - CFG_VALUE_OR_DEFAULT, \ - "Set TCP source port") -/* - * - * gExtWoWApp2TcpDstPort - Set TCP Destination port - * @Min: 0 - * @Max: 65535 - * @Default: 5001 - * - * This ini is used to set TCP Destination port when EXT WOW is enabled - * - * Related: None - * - * Supported Feature: Power Save - * - * Usage: External - * - * - */ -#define CFG_EXTWOW_TCP_DST_PORT \ - CFG_INI_UINT("gExtWoWApp2TcpDstPort", \ - 0, 65535, 5001, \ - CFG_VALUE_OR_DEFAULT, \ - "Set TCP Destination port") -/* - * - * gExtWoWApp2TcpTxTimeout - Set TCP tx timeout - * @Min: 0 - * @Max: 0xffffffff - * @Default: 200 - * - * This ini is used to set TCP Tx timeout when EXT WOW is enabled - * - * Related: None - * - * Supported Feature: Power Save - * - * Usage: External - * - * - */ -#define CFG_EXTWOW_TCP_TX_TIMEOUT \ - CFG_INI_UINT("gExtWoWApp2TcpTxTimeout", \ - 0, 0xffffffff, 200, \ - CFG_VALUE_OR_DEFAULT, \ - "Set TCP tx timeout") - -/* - * - * gExtWoWApp2TcpRxTimeout - Set TCP rx timeout - * @Min: 0 - * @Max: 0xffffffff - * @Default: 200 - * - * This ini is used to set TCP Rx timeout when EXT WOW is enabled - * - * Supported Feature: Power Save - * - * Usage: External - * - * - */ -#define CFG_EXTWOW_TCP_RX_TIMEOUT \ - CFG_INI_UINT("gExtWoWApp2TcpRxTimeout", \ - 0, 0xffffffff, 200, \ - CFG_VALUE_OR_DEFAULT, \ - "ExtWow App2 tcp rx timeout") -#endif - -/* - * - * gBpfFilterEnable - APF feature support configuration - * @Min: 0 - * @Max: 1 - * @Default: 1 - * - * When set to 1 APF feature will be enabled. - * - * Supported Feature: Android packet filter - * - * Usage: External - * - * - */ -#define CFG_PMO_APF_ENABLE CFG_INI_BOOL("gBpfFilterEnable", \ - 1, \ - "Enable APF Support") - -/* - * - * gActiveModeOffload - Active offload mode configuration - * @Min: 0 - * @Max: 1 - * @Default: 1 - * - * When set to 1 active mode offload will be enabled. - * - * If active mode offload is enabled then all applicable data offload/filtering - * is enabled immediately in FW once config is available in WLAN driver and FW - * caches this configuration across suspend/resume; - * If active mode offload is disabled then all applicable data offload/filtering - * is enabled during cfg80211 suspend and disabled during cfg80211 resume. - * - * Supported Feature: Active mode offload - * - * Usage: External - * - * - */ -#define CFG_PMO_ACTIVE_MODE CFG_INI_BOOL("gActiveModeOffload", \ - 1, \ - "Enable active mode offload") - -/* - * - * gwow_pulse_support - WOW pulse feature configuration - * @Min: 0 - * @Max: 1 - * @Default: 0 - * - * When set to 1 WOW pulse feature will be enabled. - * - * Related: gwow_pulse_pin, gwow_pulse_interval_low, gwow_pulse_interval_high - * - * Supported Feature: WOW pulse - * - * Usage: External - * - * - */ -#define CFG_PMO_WOW_PULSE_ENABLE CFG_INI_BOOL("gwow_pulse_support", \ - 0, \ - "Enable wow pulse") - -/* - * - * gwow_pulse_pin - GPIO pin for WOW pulse - * @Min: 0 - * @Max: 254 - * @Default: 35 - * - * Which PIN to send the Pulse - * - * Supported Feature: WOW pulse - * - * Usage: External - * - * - */ -#define CFG_PMO_WOW_PULSE_PIN CFG_INI_UINT("gwow_pulse_pin", \ - 0, 254, 35, \ - CFG_VALUE_OR_DEFAULT, \ - "Pin for wow pulse") - -/* - * - * gwow_pulse_interval_low - Pulse interval low - * @Min: 160 - * @Max: 480 - * @Default: 180 - * - * The interval of low level in the pulse - * - * Supported Feature: WOW pulse - * - * Usage: External - * - * - */ -#define CFG_PMO_WOW_PULSE_LOW CFG_INI_UINT("gwow_pulse_interval_low", \ - 160, 480, 180, \ - CFG_VALUE_OR_DEFAULT, \ - "Interval of low pulse") - -/* - * - * gwow_pulse_interval_high - Pulse interval high - * @Min: 20 - * @Max: 40 - * @Default: 20 - * - * The interval of high level in the pulse - * - * Supported Feature: WOW pulse - * - * Usage: External - * - * - */ -#define CFG_PMO_WOW_PULSE_HIGH CFG_INI_UINT("gwow_pulse_interval_high", \ - 20, 40, 20, \ - CFG_VALUE_OR_DEFAULT, \ - "Interval of high pulse") - -/* - * - * g_auto_detect_power_failure_mode - Auto detect power save failure mode - * @Min: PMO_FW_TO_CRASH_ON_PWR_FAILURE - * @Max: PMO_AUTO_PWR_FAILURE_DETECT_DISABLE - * @Default: PMO_FW_TO_CRASH_ON_PWR_FAILURE - * - * Specifies the behavior of FW in case of CHIP_POWER_SAVE_FAIL_DETECTED event - * - * Supported Feature: Auto detect power save failure - * - * Usage: External - * - * - */ -#define CFG_PMO_PWR_FAILURE CFG_INI_UINT("g_auto_detect_power_failure_mode", \ - PMO_FW_TO_CRASH_ON_PWR_FAILURE, \ - PMO_AUTO_PWR_FAILURE_DETECT_DISABLE, \ - PMO_FW_TO_CRASH_ON_PWR_FAILURE, \ - CFG_VALUE_OR_DEFAULT, \ - "Auto detect power save failure mode") - -/* - * - * g_enable_packet_filter_bitmap - Packet filters configuration - * @Min: 0 - * @Max: 63 - * @Default: 0 - * - * To enable packet filters when target goes to suspend, clear when resume: - * bit-0 : IPv6 multicast - * bit-1 : IPv4 multicast - * bit-2 : IPv4 broadcast - * bit-3 : XID - Exchange station Identification packet, solicits the - * identification of the receiving station - * bit-4 : STP - Spanning Tree Protocol, builds logical loop free topology - * bit-5 : DTP/LLC/CDP - * DTP - Dynamic Trunking Protocol is used by Cisco switches to - * negotiate whether an interconnection between two switches - * should be put into access or trunk mode - * LLC - Logical link control, used for multiplexing, flow & error - * control - * CDP - Cisco Discovery Protocol packet contains information about the - * cisco devices in the network - * - * Supported Feature: Packet filtering - * - * Usage: Internal/External - * - * - */ -#define CFG_PMO_PKT_FILTER CFG_INI_UINT("g_enable_packet_filter_bitmap", \ - 0, 63, 0, \ - CFG_VALUE_OR_DEFAULT, \ - "Packet filter bitmap configure") - -#ifdef WLAN_FEATURE_EXTWOW_SUPPORT - #define CFG_EXTWOW_ALL \ - CFG(CFG_EXTWOW_GOTO_SUSPEND) \ - CFG(CFG_EXTWOW_APP1_WAKE_PIN_NUMBER) \ - CFG(CFG_EXTWOW_APP2_WAKE_PIN_NUMBER) \ - CFG(CFG_EXTWOW_KA_INIT_PING_INTERVAL) \ - CFG(CFG_EXTWOW_KA_MIN_PING_INTERVAL) \ - CFG(CFG_EXTWOW_KA_MAX_PING_INTERVAL) \ - CFG(CFG_EXTWOW_KA_INC_PING_INTERVAL) \ - CFG(CFG_EXTWOW_TCP_SRC_PORT) \ - CFG(CFG_EXTWOW_TCP_DST_PORT) \ - CFG(CFG_EXTWOW_TCP_TX_TIMEOUT) \ - CFG(CFG_EXTWOW_TCP_RX_TIMEOUT) -#else - #define CFG_EXTWOW_ALL -#endif - -#ifdef FEATURE_WLAN_APF - #define CFG_PMO_APF_ALL \ - CFG(CFG_PMO_APF_ENABLE) -#else - #define CFG_PMO_APF_ALL -#endif - -#ifdef WLAN_FEATURE_WOW_PULSE - #define CFG_WOW_ALL \ - CFG(CFG_PMO_WOW_PULSE_ENABLE) \ - CFG(CFG_PMO_WOW_PULSE_PIN) \ - CFG(CFG_PMO_WOW_PULSE_LOW) \ - CFG(CFG_PMO_WOW_PULSE_HIGH) -#else - #define CFG_WOW_ALL -#endif - -#ifdef WLAN_FEATURE_PACKET_FILTERING - #define CFG_PACKET_FILTERING_ALL \ - CFG(CFG_PMO_PKT_FILTER) -#else - #define CFG_PACKET_FILTERING_ALL -#endif - -#ifdef FEATURE_RUNTIME_PM - #define CFG_RUNTIME_PM_ALL \ - CFG(CFG_PMO_RUNTIME_PM_DELAY) -#else - #define CFG_RUNTIME_PM_ALL -#endif - -#define CFG_PMO_BASIC_ALL \ - CFG(CFG_PMO_ENABLE_HOST_ARPOFFLOAD) \ - CFG(CFG_PMO_HW_FILTER_MODE) \ - CFG(CFG_PMO_ENABLE_HOST_SSDP) \ - CFG(CFG_PMO_ENABLE_HOST_NSOFFLOAD) \ - CFG(CFG_PMO_ENABLE_DYNAMIC_DTIM) \ - CFG(CFG_PMO_ENABLE_MODULATED_DTIM) \ - CFG(CFG_PMO_MC_ADDR_LIST_ENABLE) \ - CFG(CFG_PMO_POWERSAVE_OFFLOAD) \ - CFG(CFG_PMO_MAX_PS_POLL) \ - CFG(CFG_PMO_WOWLAN_DEAUTH_ENABLE) \ - CFG(CFG_PMO_WOWLAN_DISASSOC_ENABLE) \ - CFG(CFG_PMO_WOW_ENABLE) \ - CFG(CFG_PMO_ACTIVE_MODE) \ - CFG(CFG_PMO_PWR_FAILURE) +#include "wlan_pmo_apf_cfg.h" +#include "wlan_pmo_common_cfg.h" +#include "wlan_pmo_extwow_cfg.h" +#include "wlan_pmo_pkt_filter_cfg.h" +#include "wlan_pmo_runtime_pm_cfg.h" +#include "wlan_pmo_wow_pulse_cfg.h" #define CFG_PMO_ALL \ CFG_EXTWOW_ALL \ - CFG_PACKET_FILTERING_ALL \ + CFG_PACKET_FILTER_ALL \ CFG_PMO_APF_ALL \ - CFG_PMO_BASIC_ALL \ + CFG_PMO_COMMON_ALL \ CFG_RUNTIME_PM_ALL \ - CFG_WOW_ALL + CFG_WOW_PULSE_ALL + #endif /* WLAN_PMO_CFG_H__ */ diff --git a/components/pmo/dispatcher/inc/wlan_pmo_common_cfg.h b/components/pmo/dispatcher/inc/wlan_pmo_common_cfg.h new file mode 100644 index 000000000000..34a28e86cc0c --- /dev/null +++ b/components/pmo/dispatcher/inc/wlan_pmo_common_cfg.h @@ -0,0 +1,365 @@ +/* + * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef WLAN_PMO_COMMON_CFG_H__ +#define WLAN_PMO_COMMON_CFG_H__ + +#include "wlan_pmo_common_public_struct.h" + +/* + * + * hostArpOffload - Enable/disable host ARP offload + * @Min: 0 + * @Max: 1 + * @Default: 1 + * + * This ini is used to enable/disable host ARP offload. + * + * Usage: External + * + * + */ +#define CFG_PMO_ENABLE_HOST_ARPOFFLOAD CFG_INI_BOOL( \ + "hostArpOffload", \ + 1, \ + "enable/disable host arp offload") + +/* + * + * gHwFilterMode - configure hardware filter for DTIM mode + * @Min: 0 + * @Max: 3 + * @Default: 1 + * + * The hardware filter is only effective in DTIM mode. Use this configuration + * to blanket drop broadcast/multicast packets at the hardware level, without + * waking up the firmware + * + * Takes a bitmap of frame types to drop + * @E.g. + * # disable feature + * gHwFilterMode=0 + * # drop all broadcast frames, except ARP (default) + * gHwFilterMode=1 + * # drop all multicast frames, except ICMPv6 + * gHwFilterMode=2 + * # drop all broadcast and multicast frames, except ARP and ICMPv6 + * gHwFilterMode=3 + * + * Related: N/A + * + * Usage: Internal/External + * + * + */ +#define CFG_PMO_HW_FILTER_MODE CFG_INI_UINT( \ + "gHwFilterMode", \ + 0, \ + 3, \ + 1, \ + CFG_VALUE_OR_DEFAULT, \ + "hardware filter for DTIM mode") + +/* + * + * ssdp - Enable/disable ssdp + * @Min: 0 + * @Max: 1 + * @Default: 1 + * + * This ini is used to enable/disable ssdp. + * + * Usage: External + * + * + */ +#define CFG_PMO_ENABLE_HOST_SSDP CFG_INI_BOOL( \ + "ssdp", \ + 1, \ + "Enable/disable ssdp") + +/* + * + * hostNSOffload - Enable/disable NS offload + * @Min: 0 + * @Max: 1 + * @Default: 1 + * + * This ini is used to enable/disable NS offload. + * + * Usage: External + * + * + */ +#define CFG_PMO_ENABLE_HOST_NSOFFLOAD CFG_INI_BOOL( \ + "hostNSOffload", \ + 1, \ + "Enable/disable NS offload") + +/* + * + * gEnableDynamicDTIM - Enable Dynamic DTIM + * @Min: 0 + * @Max: 9 + * @Default: 0 + * + * This ini is used to enable/disable ssdp. + * + * 0 -Disable DynamicDTIM + * 1 to 5 - SLM will switch to DTIM specified here when host suspends and + * switch DTIM1 when host resumes + * + * Usage: External + * + * + */ +#define CFG_PMO_ENABLE_DYNAMIC_DTIM CFG_INI_UINT( \ + "gEnableDynamicDTIM", \ + 0, \ + 9, \ + 0, \ + CFG_VALUE_OR_DEFAULT, \ + "Enable Dynamic DTIM") + +/* + * + * gEnableDynamicDTIM - Enable/Disable modulated DTIM feature + * @Min: 0 + * @Max: 5 + * @Default: 0 + * + * This ini is used to enable/disable modulated DTIM feature. + * + * Usage: External + * + * + */ +#define CFG_PMO_ENABLE_MODULATED_DTIM CFG_INI_UINT( \ + "gEnableModulatedDTIM", \ + 0, \ + 5, \ + 0, \ + CFG_VALUE_OR_DEFAULT, \ + "Enable/disable modulated DTIM feature") + +/* + * + * gMCAddrListEnable - Enable/disable multicast MAC address list feature + * @Min: 0 + * @Max: 1 + * @Default: 1 + * + * This ini is used to enable/disable multicast MAC address list feature. + * Default: Enable + * + * Related: None + * + * Supported Feature: STA + * + * Usage: Internal/External + * + * + */ +#define CFG_PMO_MC_ADDR_LIST_ENABLE CFG_INI_BOOL( \ + "gMCAddrListEnable", \ + 1, \ + "Enable/disable multicast MAC address list feature") + +/* + * + * gEnablePowerSaveOffload - Enable Power Save Offload + * @Min: 0 + * @Max: 5 + * @Default: 0 + * + * This ini is used to set Power Save Offload configuration: + * Current values of gEnablePowerSaveOffload: + * 0 -> Power save offload is disabled + * 1 -> Legacy Power save enabled + Deep sleep Disabled + * 2 -> QPower enabled + Deep sleep Disabled + * 3 -> Legacy Power save enabled + Deep sleep Enabled + * 4 -> QPower enabled + Deep sleep Enabled + * 5 -> Duty cycling QPower enabled + * + * Related: None + * + * Supported Feature: Power Save + * + * Usage: External + * + * + */ +#define CFG_PMO_POWERSAVE_OFFLOAD CFG_INI_UINT( \ + "gEnablePowerSaveOffload", \ + 0, \ + 5, \ + 0, \ + CFG_VALUE_OR_DEFAULT, \ + "Enable Power Save Offload") + +/* + * + * gMaxPsPoll - Max powersave poll + * @Min: 0 + * @Max: 255 + * @Default: 0 + * + * This ini is used to set max powersave poll. + * + * Usage: External + * + * + */ +#define CFG_PMO_MAX_PS_POLL CFG_INI_UINT( \ + "gMaxPsPoll", \ + 0, \ + 255, \ + 0, \ + CFG_VALUE_OR_DEFAULT, \ + "Max powersave poll") + +/* + * + * gEnableWoW - Enable/Disable WoW + * @Min: 0 + * @Max: 3 + * @Default: 3 + * + * This ini is used to enable/disable WoW. Configurations are as follows: + * 0 - Disable both magic pattern match and pattern byte match. + * 1 - Enable magic pattern match on all interfaces. + * 2 - Enable pattern byte match on all interfaces. + * 3 - Enable both magic patter and pattern byte match on all interfaces. + * + * Related: None + * + * Supported Feature: Power Save + * + * Usage: External + * + * + */ +#define CFG_PMO_WOW_ENABLE CFG_INI_UINT("gEnableWoW", \ + 0, 3, 3, \ + CFG_VALUE_OR_DEFAULT, \ + "Enable WoW Support") +/* + * + * wowlan_deauth_enable - Enable/Disable wowlan deauth enable + * @Min: 0 + * @Max: 1 + * @Default: 1 + * + * This ini is used to enable/disable wowlan deauth enable. + * + * Related: None + * + * Supported Feature: Power Save + * + * Usage: External + * + * + */ +#define CFG_PMO_WOWLAN_DEAUTH_ENABLE CFG_INI_BOOL("wowlan_deauth_enable", \ + 1, \ + "Enable WoWLan deauth") +/* + * + * wowlan_disassoc_enable - Enable/Disable wowlan disassoc enable + * @Min: 0 + * @Max: 1 + * @Default: 1 + * + * This ini is used to enable/disable wowlan disassoc enable. + * + * Related: None + * + * Supported Feature: Power Save + * + * Usage: External + * + * + */ +#define CFG_PMO_WOWLAN_DISASSOC_ENABLE CFG_INI_BOOL("wowlan_disassoc_enable", \ + 1, \ + "Enable WoW Support") + +/* + * + * gActiveModeOffload - Active offload mode configuration + * @Min: 0 + * @Max: 1 + * @Default: 1 + * + * When set to 1 active mode offload will be enabled. + * + * If active mode offload is enabled then all applicable data offload/filtering + * is enabled immediately in FW once config is available in WLAN driver and FW + * caches this configuration across suspend/resume; + * If active mode offload is disabled then all applicable data offload/filtering + * is enabled during cfg80211 suspend and disabled during cfg80211 resume. + * + * Supported Feature: Active mode offload + * + * Usage: External + * + * + */ +#define CFG_PMO_ACTIVE_MODE CFG_INI_BOOL("gActiveModeOffload", \ + 1, \ + "Enable active mode offload") + +/* + * + * g_auto_detect_power_failure_mode - Auto detect power save failure mode + * @Min: PMO_FW_TO_CRASH_ON_PWR_FAILURE + * @Max: PMO_AUTO_PWR_FAILURE_DETECT_DISABLE + * @Default: PMO_FW_TO_CRASH_ON_PWR_FAILURE + * + * Specifies the behavior of FW in case of CHIP_POWER_SAVE_FAIL_DETECTED event + * + * Supported Feature: Auto detect power save failure + * + * Usage: External + * + * + */ +#define CFG_PMO_PWR_FAILURE CFG_INI_UINT("g_auto_detect_power_failure_mode", \ + PMO_FW_TO_CRASH_ON_PWR_FAILURE, \ + PMO_AUTO_PWR_FAILURE_DETECT_DISABLE, \ + PMO_FW_TO_CRASH_ON_PWR_FAILURE, \ + CFG_VALUE_OR_DEFAULT, \ + "Auto detect power save failure mode") + +#define CFG_PMO_COMMON_ALL \ + CFG(CFG_PMO_ENABLE_HOST_ARPOFFLOAD) \ + CFG(CFG_PMO_HW_FILTER_MODE) \ + CFG(CFG_PMO_ENABLE_HOST_SSDP) \ + CFG(CFG_PMO_ENABLE_HOST_NSOFFLOAD) \ + CFG(CFG_PMO_ENABLE_DYNAMIC_DTIM) \ + CFG(CFG_PMO_ENABLE_MODULATED_DTIM) \ + CFG(CFG_PMO_MC_ADDR_LIST_ENABLE) \ + CFG(CFG_PMO_POWERSAVE_OFFLOAD) \ + CFG(CFG_PMO_MAX_PS_POLL) \ + CFG(CFG_PMO_WOWLAN_DEAUTH_ENABLE) \ + CFG(CFG_PMO_WOWLAN_DISASSOC_ENABLE) \ + CFG(CFG_PMO_WOW_ENABLE) \ + CFG(CFG_PMO_ACTIVE_MODE) \ + CFG(CFG_PMO_PWR_FAILURE) + +#endif /* WLAN_PMO_COMMON_CFG_H__ */ diff --git a/components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h b/components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h index bf4d2d49d657..7b1b6fa3bba3 100644 --- a/components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h +++ b/components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h @@ -340,9 +340,7 @@ enum pmo_auto_pwr_detect_failure_mode { */ struct pmo_psoc_cfg { bool ptrn_match_enable_all_vdev; -#ifdef FEATURE_WLAN_APF bool apf_enable; -#endif bool arp_offload_enable; enum pmo_hw_filter_mode hw_filter_mode_bitmap; bool ns_offload_enable_static; diff --git a/components/pmo/dispatcher/inc/wlan_pmo_extwow_cfg.h b/components/pmo/dispatcher/inc/wlan_pmo_extwow_cfg.h new file mode 100644 index 000000000000..71b4dfe315ed --- /dev/null +++ b/components/pmo/dispatcher/inc/wlan_pmo_extwow_cfg.h @@ -0,0 +1,278 @@ +/* + * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef WLAN_PMO_EXTWOW_CFG_H__ +#define WLAN_PMO_EXTWOW_CFG_H__ + +#ifdef WLAN_FEATURE_EXTWOW_SUPPORT +/* + * + * gExtWoWgotoSuspend - Enable/Disable Extended WoW + * @Min: 0 + * @Max: 1 + * @Default: 1 + * + * This ini is used to enable/disable Extended WoW. + * + * Related: None + * + * Supported Feature: Power Save + * + * Usage: External + * + * + */ +#define CFG_EXTWOW_GOTO_SUSPEND CFG_INI_BOOL("gExtWoWgotoSuspend", \ + 1, \ + "Enable Ext WoW goto support") +/* + * + * gExtWowApp1WakeupPinNumber - Set wakeup1 PIN number + * @Min: 0 + * @Max: 255 + * @Default: 12 + * + * This ini is used to set EXT WOW APP1 wakeup PIN number + * + * Related: None + * + * Supported Feature: Power Save + * + * Usage: External + * + * + */ +#define CFG_EXTWOW_APP1_WAKE_PIN_NUMBER \ + CFG_INI_UINT("gExtWowApp1WakeupPinNumber", \ + 0, 255, 12, \ + CFG_VALUE_OR_DEFAULT, \ + "Set wakeup1 PIN number") +/* + * + * gExtWowApp2WakeupPinNumber - Set wakeup2 PIN number + * @Min: 0 + * @Max: 255 + * @Default: 16 + * + * This ini is used to set EXT WOW APP2 wakeup PIN number + * + * Related: None + * + * Supported Feature: Power Save + * + * Usage: External + * + * + */ +#define CFG_EXTWOW_APP2_WAKE_PIN_NUMBER \ + CFG_INI_UINT("gExtWowApp2WakeupPinNumber", \ + 0, 255, 16, \ + CFG_VALUE_OR_DEFAULT, \ + "Set wakeup2 PIN number") +/* + * + * gExtWoWApp2KAInitPingInterval - Set Keep Alive Init Ping Interval + * @Min: 0 + * @Max: 0xffffffff + * @Default: 240 + * + * This ini is used to set Keep Alive Init Ping Interval for EXT WOW + * + * Related: None + * + * Supported Feature: Power Save + * + * Usage: External + * + * + */ +#define CFG_EXTWOW_KA_INIT_PING_INTERVAL \ + CFG_INI_UINT("gExtWoWApp2KAInitPingInterval", \ + 0, 0xffffffff, 240, \ + CFG_VALUE_OR_DEFAULT, \ + "Set Keep Alive Init Ping Interval") +/* + * + * gExtWoWApp2KAMinPingInterval - Set Keep Alive Minimum Ping Interval + * @Min: 0 + * @Max: 0xffffffff + * @Default: 240 + * + * This ini is used to set Keep Alive Minimum Ping Interval for EXT WOW + * + * Related: None + * + * Supported Feature: Power Save + * + * Usage: External + * + * + */ +#define CFG_EXTWOW_KA_MIN_PING_INTERVAL \ + CFG_INI_UINT("gExtWoWApp2KAMinPingInterval", \ + 0, 0xffffffff, 240, \ + CFG_VALUE_OR_DEFAULT, \ + "Set Keep Alive Minimum Ping Interval") +/* + * + * gExtWoWApp2KAMaxPingInterval - Set Keep Alive Maximum Ping Interval + * @Min: 0 + * @Max: 0xffffffff + * @Default: 1280 + * + * This ini is used to set Keep Alive Maximum Ping Interval for EXT WOW + * + * Related: None + * + * Supported Feature: Power Save + * + * Usage: External + * + * + */ +#define CFG_EXTWOW_KA_MAX_PING_INTERVAL \ + CFG_INI_UINT("gExtWoWApp2KAMaxPingInterval", \ + 0, 0xffffffff, 1280, \ + CFG_VALUE_OR_DEFAULT, \ + "Set Keep Alive Maximum Ping Interval") +/* + * + * gExtWoWApp2KAIncPingInterval - Set Keep Alive increment of Ping Interval + * @Min: 0 + * @Max: 0xffffffff + * @Default: 4 + * + * This ini is used to set Keep Alive increment of Ping Interval for EXT WOW + * + * Related: None + * + * Supported Feature: Power Save + * + * Usage: External + * + * + */ +#define CFG_EXTWOW_KA_INC_PING_INTERVAL \ + CFG_INI_UINT("gExtWoWApp2KAIncPingInterval", \ + 0, 0xffffffff, 4, \ + CFG_VALUE_OR_DEFAULT, \ + "Set Keep Alive increment of Ping Interval") +/* + * + * gExtWoWApp2KAIncPingInterval - Set TCP source port + * @Min: 0 + * @Max: 65535 + * @Default: 5000 + * + * This ini is used to set TCP source port when EXT WOW is enabled + * + * Related: None + * + * Supported Feature: Power Save + * + * Usage: External + * + * + */ +#define CFG_EXTWOW_TCP_SRC_PORT \ + CFG_INI_UINT("gExtWoWApp2KAIncPingInterval", \ + 0, 65535, 5000, \ + CFG_VALUE_OR_DEFAULT, \ + "Set TCP source port") +/* + * + * gExtWoWApp2TcpDstPort - Set TCP Destination port + * @Min: 0 + * @Max: 65535 + * @Default: 5001 + * + * This ini is used to set TCP Destination port when EXT WOW is enabled + * + * Related: None + * + * Supported Feature: Power Save + * + * Usage: External + * + * + */ +#define CFG_EXTWOW_TCP_DST_PORT \ + CFG_INI_UINT("gExtWoWApp2TcpDstPort", \ + 0, 65535, 5001, \ + CFG_VALUE_OR_DEFAULT, \ + "Set TCP Destination port") +/* + * + * gExtWoWApp2TcpTxTimeout - Set TCP tx timeout + * @Min: 0 + * @Max: 0xffffffff + * @Default: 200 + * + * This ini is used to set TCP Tx timeout when EXT WOW is enabled + * + * Related: None + * + * Supported Feature: Power Save + * + * Usage: External + * + * + */ +#define CFG_EXTWOW_TCP_TX_TIMEOUT \ + CFG_INI_UINT("gExtWoWApp2TcpTxTimeout", \ + 0, 0xffffffff, 200, \ + CFG_VALUE_OR_DEFAULT, \ + "Set TCP tx timeout") + +/* + * + * gExtWoWApp2TcpRxTimeout - Set TCP rx timeout + * @Min: 0 + * @Max: 0xffffffff + * @Default: 200 + * + * This ini is used to set TCP Rx timeout when EXT WOW is enabled + * + * Supported Feature: Power Save + * + * Usage: External + * + * + */ +#define CFG_EXTWOW_TCP_RX_TIMEOUT \ + CFG_INI_UINT("gExtWoWApp2TcpRxTimeout", \ + 0, 0xffffffff, 200, \ + CFG_VALUE_OR_DEFAULT, \ + "ExtWow App2 tcp rx timeout") + +#define CFG_EXTWOW_ALL \ + CFG(CFG_EXTWOW_GOTO_SUSPEND) \ + CFG(CFG_EXTWOW_APP1_WAKE_PIN_NUMBER) \ + CFG(CFG_EXTWOW_APP2_WAKE_PIN_NUMBER) \ + CFG(CFG_EXTWOW_KA_INIT_PING_INTERVAL) \ + CFG(CFG_EXTWOW_KA_MIN_PING_INTERVAL) \ + CFG(CFG_EXTWOW_KA_MAX_PING_INTERVAL) \ + CFG(CFG_EXTWOW_KA_INC_PING_INTERVAL) \ + CFG(CFG_EXTWOW_TCP_SRC_PORT) \ + CFG(CFG_EXTWOW_TCP_DST_PORT) \ + CFG(CFG_EXTWOW_TCP_TX_TIMEOUT) \ + CFG(CFG_EXTWOW_TCP_RX_TIMEOUT) +#else +#define CFG_EXTWOW_ALL +#endif /* WLAN_FEATURE_EXTWOW_SUPPORT */ +#endif /* WLAN_PMO_EXTWOW_CFG_H_ */ diff --git a/components/pmo/dispatcher/inc/wlan_pmo_pkt_filter_cfg.h b/components/pmo/dispatcher/inc/wlan_pmo_pkt_filter_cfg.h new file mode 100644 index 000000000000..a4b8a6ef82c0 --- /dev/null +++ b/components/pmo/dispatcher/inc/wlan_pmo_pkt_filter_cfg.h @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef WLAN_PMO_PACKET_FILTER_CFG_H__ +#define WLAN_PMO_PACKET_FILTER_CFG_H__ + +#ifdef WLAN_FEATURE_PACKET_FILTERING +/* + * + * g_enable_packet_filter_bitmap - Packet filters configuration + * @Min: 0 + * @Max: 63 + * @Default: 0 + * + * To enable packet filters when target goes to suspend, clear when resume: + * bit-0 : IPv6 multicast + * bit-1 : IPv4 multicast + * bit-2 : IPv4 broadcast + * bit-3 : XID - Exchange station Identification packet, solicits the + * identification of the receiving station + * bit-4 : STP - Spanning Tree Protocol, builds logical loop free topology + * bit-5 : DTP/LLC/CDP + * DTP - Dynamic Trunking Protocol is used by Cisco switches to + * negotiate whether an interconnection between two switches + * should be put into access or trunk mode + * LLC - Logical link control, used for multiplexing, flow & error + * control + * CDP - Cisco Discovery Protocol packet contains information + * about the cisco devices in the network + * + * Supported Feature: Packet filtering + * + * Usage: Internal/External + * + * + */ +#define CFG_PMO_PKT_FILTER CFG_INI_UINT( \ + "g_enable_packet_filter_bitmap", \ + 0, 63, 0, \ + CFG_VALUE_OR_DEFAULT, \ + "Packet filter bitmap configure") + +#define CFG_PACKET_FILTER_ALL \ + CFG(CFG_PMO_PKT_FILTER) +#else +#define CFG_PACKET_FILTER_ALL +#endif /* WLAN_FEATURE_PACKET_FILTERING */ +#endif /* WLAN_PMO_PACKET_FILTER_CFG_H__ */ diff --git a/components/pmo/dispatcher/inc/wlan_pmo_runtime_pm_cfg.h b/components/pmo/dispatcher/inc/wlan_pmo_runtime_pm_cfg.h new file mode 100644 index 000000000000..4b03cdf498db --- /dev/null +++ b/components/pmo/dispatcher/inc/wlan_pmo_runtime_pm_cfg.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef WLAN_PMO_RUNTIME_PM_CFG_H__ +#define WLAN_PMO_RUNTIME_PM_CFG_H__ + +#ifdef FEATURE_RUNTIME_PM +/* + * + * gRuntimePMDelay - Set runtime pm's inactivity timer + * @Min: 100 + * @Max: 10000 + * @Default: 500 + * + * This ini is used to set runtime pm's inactivity timer value. + * the wlan driver will wait for this number of milliseconds of + * inactivity before performing a runtime suspend. + * + * Related: gRuntimePM + * + * Supported Feature: Power Save + * + * Usage: External + * + * + */ +#define CFG_PMO_RUNTIME_PM_DELAY CFG_INI_UINT( \ + "gRuntimePMDelay", \ + 100, \ + 10000, \ + 500, \ + CFG_VALUE_OR_DEFAULT, \ + "Set runtime pm's inactivity timer") + +#define CFG_RUNTIME_PM_ALL \ + CFG(CFG_PMO_RUNTIME_PM_DELAY) +#else +#define CFG_RUNTIME_PM_ALL +#endif /* FEATURE_RUNTIME_PM */ +#endif /* WLAN_PMO_RUNTIME_PM_CFG_H__ */ diff --git a/components/pmo/dispatcher/inc/wlan_pmo_wow_pulse_cfg.h b/components/pmo/dispatcher/inc/wlan_pmo_wow_pulse_cfg.h new file mode 100644 index 000000000000..6dfaf67da49c --- /dev/null +++ b/components/pmo/dispatcher/inc/wlan_pmo_wow_pulse_cfg.h @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef WLAN_PMO_WOW_PULSE_CFG_H__ +#define WLAN_PMO_WOW_PULSE_CFG_H__ + +#ifdef WLAN_FEATURE_WOW_PULSE +/* + * + * gwow_pulse_support - WOW pulse feature configuration + * @Min: 0 + * @Max: 1 + * @Default: 0 + * + * When set to 1 WOW pulse feature will be enabled. + * + * Related: gwow_pulse_pin, gwow_pulse_interval_low, gwow_pulse_interval_high + * + * Supported Feature: WOW pulse + * + * Usage: External + * + * + */ +#define CFG_PMO_WOW_PULSE_ENABLE CFG_INI_BOOL("gwow_pulse_support", \ + 0, \ + "Enable wow pulse") + +/* + * + * gwow_pulse_pin - GPIO pin for WOW pulse + * @Min: 0 + * @Max: 254 + * @Default: 35 + * + * Which PIN to send the Pulse + * + * Supported Feature: WOW pulse + * + * Usage: External + * + * + */ +#define CFG_PMO_WOW_PULSE_PIN CFG_INI_UINT("gwow_pulse_pin", \ + 0, 254, 35, \ + CFG_VALUE_OR_DEFAULT, \ + "Pin for wow pulse") + +/* + * + * gwow_pulse_interval_low - Pulse interval low + * @Min: 160 + * @Max: 480 + * @Default: 180 + * + * The interval of low level in the pulse + * + * Supported Feature: WOW pulse + * + * Usage: External + * + * + */ +#define CFG_PMO_WOW_PULSE_LOW CFG_INI_UINT("gwow_pulse_interval_low", \ + 160, 480, 180, \ + CFG_VALUE_OR_DEFAULT, \ + "Interval of low pulse") + +/* + * + * gwow_pulse_interval_high - Pulse interval high + * @Min: 20 + * @Max: 40 + * @Default: 20 + * + * The interval of high level in the pulse + * + * Supported Feature: WOW pulse + * + * Usage: External + * + * + */ +#define CFG_PMO_WOW_PULSE_HIGH CFG_INI_UINT("gwow_pulse_interval_high", \ + 20, 40, 20, \ + CFG_VALUE_OR_DEFAULT, \ + "Interval of high pulse") + +#define CFG_WOW_PULSE_ALL \ + CFG(CFG_PMO_WOW_PULSE_ENABLE) \ + CFG(CFG_PMO_WOW_PULSE_PIN) \ + CFG(CFG_PMO_WOW_PULSE_LOW) \ + CFG(CFG_PMO_WOW_PULSE_HIGH) +#else +#define CFG_WOW_PULSE_ALL +#endif /* WLAN_FEATURE_WOW_PULSE */ +#endif /* WLAN_PMO_WOW_PULSE_CFG_H__ */