diff --git a/components/pmo/core/inc/wlan_pmo_main.h b/components/pmo/core/inc/wlan_pmo_main.h
index f89807bde5..9232b44cc6 100644
--- a/components/pmo/core/inc/wlan_pmo_main.h
+++ b/components/pmo/core/inc/wlan_pmo_main.h
@@ -85,6 +85,26 @@ void pmo_free_ctx(void);
*/
struct wlan_pmo_ctx *pmo_get_context(void);
+/**
+ * pmo_psoc_open() - pmo psoc object open
+ * @psoc: objmgr vdev
+ *.
+ * This function used to open pmo psoc object
+ *
+ * Return: Success or failure
+ */
+QDF_STATUS pmo_psoc_open(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * pmo_psoc_close() - pmo psoc object close
+ * @psoc: objmgr vdev
+ *.
+ * This function used to close pmo psoc object
+ *
+ * Return: Success or failure
+ */
+QDF_STATUS pmo_psoc_close(struct wlan_objmgr_psoc *psoc);
+
/**
* pmo_get_vdev_bss_peer_mac_addr() - API to get bss peer mac address
* @vdev: objmgr vdev
diff --git a/components/pmo/core/src/wlan_pmo_main.c b/components/pmo/core/src/wlan_pmo_main.c
index 2f7a00a8a5..b75bdb49a4 100644
--- a/components/pmo/core/src/wlan_pmo_main.c
+++ b/components/pmo/core/src/wlan_pmo_main.c
@@ -22,6 +22,8 @@
#include "wlan_pmo_main.h"
#include "wlan_pmo_obj_mgmt_public_struct.h"
+#include "wlan_pmo_cfg.h"
+#include "cfg_ucfg_api.h"
static struct wlan_pmo_ctx *gp_pmo_ctx;
@@ -63,6 +65,138 @@ struct wlan_pmo_ctx *pmo_get_context(void)
return gp_pmo_ctx;
}
+#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
+static void wlan_extwow_init_cfg(struct wlan_objmgr_psoc *psoc,
+ struct pmo_psoc_cfg *psoc_cfg)
+{
+ psoc_cfg->extwow_goto_suspend =
+ cfg_get(psoc, CFG_EXTWOW_GOTO_SUSPEND);
+ psoc_cfg->extwow_app1_wakeup_pin_num =
+ cfg_get(psoc, CFG_EXTWOW_APP1_WAKE_PIN_NUMBER);
+ psoc_cfg->extwow_app2_wakeup_pin_num =
+ cfg_get(psoc, CFG_EXTWOW_APP2_WAKE_PIN_NUMBER);
+ psoc_cfg->extwow_app2_init_ping_interval =
+ cfg_get(psoc, CFG_EXTWOW_KA_INIT_PING_INTERVAL);
+ psoc_cfg->extwow_app2_min_ping_interval =
+ cfg_get(psoc, CFG_EXTWOW_KA_MIN_PING_INTERVAL);
+ psoc_cfg->extwow_app2_max_ping_interval =
+ cfg_get(psoc, CFG_EXTWOW_KA_MAX_PING_INTERVAL);
+ psoc_cfg->extwow_app2_inc_ping_interval =
+ cfg_get(psoc, CFG_EXTWOW_KA_INC_PING_INTERVAL);
+ psoc_cfg->extwow_app2_tcp_src_port =
+ cfg_get(psoc, CFG_EXTWOW_TCP_SRC_PORT);
+ psoc_cfg->extwow_app2_tcp_dst_port =
+ cfg_get(psoc, CFG_EXTWOW_TCP_DST_PORT);
+ psoc_cfg->extwow_app2_tcp_tx_timeout =
+ cfg_get(psoc, CFG_EXTWOW_TCP_TX_TIMEOUT);
+ psoc_cfg->extwow_app2_tcp_rx_timeout =
+ cfg_get(psoc, CFG_EXTWOW_TCP_RX_TIMEOUT);
+}
+#else
+static void wlan_extwow_init_cfg(struct wlan_objmgr_psoc *psoc,
+ struct pmo_psoc_cfg *psoc_cfg)
+{
+}
+#endif
+
+#ifdef WLAN_FEATURE_WOW_PULSE
+static void wlan_pmo_wow_pulse_init_cfg(struct wlan_objmgr_psoc *psoc,
+ struct pmo_psoc_cfg *psoc_cfg)
+{
+ psoc_cfg->is_wow_pulse_supported =
+ cfg_get(psoc, CFG_PMO_WOW_PULSE_ENABLE);
+ psoc_cfg->wow_pulse_pin = cfg_get(psoc, CFG_PMO_WOW_PULSE_PIN);
+ psoc_cfg->wow_pulse_interval_high =
+ cfg_get(psoc, CFG_PMO_WOW_PULSE_HIGH);
+ psoc_cfg->wow_pulse_interval_low =
+ cfg_get(psoc, CFG_PMO_WOW_PULSE_LOW);
+}
+#else
+static void wlan_pmo_wow_pulse_init_cfg(struct wlan_objmgr_psoc *psoc,
+ struct pmo_psoc_cfg *psoc_cfg)
+{
+}
+#endif
+
+#ifdef WLAN_FEATURE_PACKET_FILTERING
+static void wlan_pmo_pkt_filter_init_cfg(struct wlan_objmgr_psoc *psoc,
+ struct pmo_psoc_cfg *psoc_cfg)
+{
+ psoc_cfg->packet_filters_bitmap = cfg_get(psoc, CFG_PMO_PKT_FILTER);
+}
+#else
+static void wlan_pmo_pkt_filter_init_cfg(struct wlan_objmgr_psoc *psoc,
+ struct pmo_psoc_cfg *psoc_cfg)
+{
+}
+#endif
+
+#ifdef FEATURE_RUNTIME_PM
+static void wlan_pmo_runtime_pm_init_cfg(struct wlan_objmgr_psoc *psoc,
+ struct pmo_psoc_cfg *psoc_cfg)
+{
+ psoc_cfg->runtime_pm_delay = cfg_get(psoc, CFG_PMO_RUNTIME_PM_DELAY);
+}
+#else
+static void wlan_pmo_runtime_pm_init_cfg(struct wlan_objmgr_psoc *psoc,
+ struct pmo_psoc_cfg *psoc_cfg)
+{
+}
+#endif
+
+static void wlan_pmo_init_cfg(struct wlan_objmgr_psoc *psoc,
+ struct pmo_psoc_cfg *psoc_cfg)
+{
+ psoc_cfg->arp_offload_enable =
+ cfg_get(psoc, CFG_PMO_ENABLE_HOST_ARPOFFLOAD);
+ psoc_cfg->hw_filter_mode_bitmap = cfg_get(psoc, CFG_PMO_HW_FILTER_MODE);
+ psoc_cfg->ssdp = cfg_get(psoc, CFG_PMO_ENABLE_HOST_SSDP);
+ psoc_cfg->ns_offload_enable_static =
+ cfg_get(psoc, CFG_PMO_ENABLE_HOST_NSOFFLOAD);
+ psoc_cfg->ns_offload_enable_dynamic =
+ cfg_get(psoc, CFG_PMO_ENABLE_HOST_NSOFFLOAD);
+ psoc_cfg->sta_dynamic_dtim = cfg_get(psoc, CFG_PMO_ENABLE_DYNAMIC_DTIM);
+ psoc_cfg->sta_mod_dtim = cfg_get(psoc, CFG_PMO_ENABLE_MODULATED_DTIM);
+ psoc_cfg->enable_mc_list = cfg_get(psoc, CFG_PMO_MC_ADDR_LIST_ENABLE);
+ psoc_cfg->power_save_mode = cfg_get(psoc, CFG_PMO_POWERSAVE_OFFLOAD);
+ psoc_cfg->max_ps_poll = cfg_get(psoc, CFG_PMO_MAX_PS_POLL);
+
+ psoc_cfg->wow_enable = cfg_get(psoc, CFG_PMO_WOW_ENABLE);
+ psoc_cfg->wowlan_deauth_enable =
+ cfg_get(psoc, CFG_PMO_WOWLAN_DEAUTH_ENABLE);
+ psoc_cfg->wowlan_disassoc_enable =
+ cfg_get(psoc, CFG_PMO_WOWLAN_DISASSOC_ENABLE);
+
+ wlan_extwow_init_cfg(psoc, psoc_cfg);
+ psoc_cfg->apf_enable = cfg_get(psoc, CFG_PMO_APF_ENABLE);
+ psoc_cfg->active_mode_offload = cfg_get(psoc, CFG_PMO_ACTIVE_MODE);
+ wlan_pmo_wow_pulse_init_cfg(psoc, psoc_cfg);
+ wlan_pmo_pkt_filter_init_cfg(psoc, psoc_cfg);
+ wlan_pmo_runtime_pm_init_cfg(psoc, psoc_cfg);
+ psoc_cfg->auto_power_save_fail_mode =
+ cfg_get(psoc, CFG_PMO_PWR_FAILURE);
+}
+
+QDF_STATUS pmo_psoc_open(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx;
+
+ if (!psoc) {
+ pmo_err("null psoc");
+ return QDF_STATUS_E_INVAL;
+ }
+
+ pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+ wlan_pmo_init_cfg(psoc, &pmo_psoc_ctx->psoc_cfg);
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS pmo_psoc_close(struct wlan_objmgr_psoc *psoc)
+{
+ return QDF_STATUS_SUCCESS;
+}
+
bool pmo_is_vdev_in_beaconning_mode(enum QDF_OPMODE vdev_opmode)
{
switch (vdev_opmode) {
diff --git a/components/pmo/dispatcher/inc/wlan_pmo_cfg.h b/components/pmo/dispatcher/inc/wlan_pmo_cfg.h
new file mode 100644
index 0000000000..f92b4bf4bf
--- /dev/null
+++ b/components/pmo/dispatcher/inc/wlan_pmo_cfg.h
@@ -0,0 +1,825 @@
+/*
+ * 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_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)
+
+#define CFG_PMO_ALL \
+ CFG_EXTWOW_ALL \
+ CFG_PACKET_FILTERING_ALL \
+ CFG_PMO_APF_ALL \
+ CFG_PMO_BASIC_ALL \
+ CFG_RUNTIME_PM_ALL \
+ CFG_WOW_ALL
+#endif /* WLAN_PMO_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 c6a4b9b79c..bf4d2d49d6 100644
--- a/components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h
+++ b/components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h
@@ -183,6 +183,40 @@ enum pmo_wow_interface_pause {
PMO_WOW_INTERFACE_PAUSE_COUNT
};
+/**
+ * enum wow_enable_type - used to enable/disable WoW.
+ * @PMO_WOW_DISABLE_BOTH: Disable both magic pattern match and pattern
+ * byte match.
+ * @PMO_WOW_ENABLE_MAGIC_PATTERN: Enable magic pattern match on all interfaces.
+ * @PMO_WOW_ENABLE_PATTERN_BYTE: Enable pattern byte match on all interfaces.
+ * @PMO_WOW_ENABLE_BOTH: Enable both magic patter and pattern byte match on
+ * all interfaces.
+ */
+enum pmo_wow_enable_type {
+ PMO_WOW_DISABLE_BOTH = 0,
+ PMO_WOW_ENABLE_MAGIC_PATTERN,
+ PMO_WOW_ENABLE_PATTERN_BYTE,
+ PMO_WOW_ENABLE_BOTH
+};
+
+/**
+ * enum powersave_qpower_mode: powersave_mode
+ * @PS_NOT_SUPPORTED: Power save is not supported
+ * @PS_LEGACY_NODEEPSLEEP: Legacy power save enabled and deep sleep disabled
+ * @PS_QPOWER_NODEEPSLEEP: QPOWER enabled and deep sleep disabled
+ * @PS_LEGACY_DEEPSLEEP: Legacy power save enabled and deep sleep enabled
+ * @PS_QPOWER_DEEPSLEEP: QPOWER enabled and deep sleep enabled
+ * @PS_DUTY_CYCLING_QPOWER: QPOWER enabled in duty cycling mode
+ */
+enum powersave_mode {
+ PS_NOT_SUPPORTED = 0,
+ PS_LEGACY_NODEEPSLEEP = 1,
+ PS_QPOWER_NODEEPSLEEP = 2,
+ PS_LEGACY_DEEPSLEEP = 3,
+ PS_QPOWER_DEEPSLEEP = 4,
+ PS_DUTY_CYCLING_QPOWER = 5
+};
+
#define PMO_TARGET_SUSPEND_TIMEOUT 6000
#define PMO_WAKE_LOCK_TIMEOUT 1000
#define PMO_RESUME_TIMEOUT 6000
@@ -279,15 +313,36 @@ enum pmo_auto_pwr_detect_failure_mode {
* @disassoc_enable: true when wake up on disassoc is enabled else false
* @bmiss_enable: true when wake up on bmiss is enabled else false
* @lpass_enable: true when lpass is enabled else false
+ * @max_ps:poll: max power save poll
* @sta_dynamic_dtim: station dynamic DTIM value
* @sta_mod_dtim: station modulated DTIM value
* @sta_max_li_mod_dtim: station max listen interval DTIM value
+ * @wow_enable: enable wow with majic pattern match or pattern byte match
* @power_save_mode: power save mode for psoc
+ * @runtime_pm_delay: set runtime pm's inactivity timer
+ * @extwow_goto_suspend: true when extended WoW enabled else false
+ * @extwow_app1_wakeup_pin_num: set wakeup1 PIN number
+ * @extwow_app2_wakeup_pin_num: set wakeup2 PIN number
+ * @extwow_app2_init_ping_interval: set keep alive init ping interval
+ * @extwow_app2_min_ping_interval: set keep alive minimum ping interval
+ * @extwow_app2_max_ping_interval: set keep alive maximum ping interval
+ * @extwow_app2_inc_ping_interval: set keep alive increment ping interval
+ * @extwow_app2_tcp_src_port: set TCP source port
+ * @extwow_app2_tcp_dst_port: set TCP dest port
+ * @extwow_app2_tcp_tx_timeout: set TCP TX timeout
+ * @extwow_app2_tcp_rx_timeout: set TCP RX timeout
* @auto_power_save_fail_mode: auto detect power save failure
+ * @is_wow_pulse_supported: true when wow pulse feature is enabled else false
+ * @wow_pulse_pin: GPIO pin of wow pulse feature
+ * @wow_pulse_interval_high: The interval of high level in the pulse
+ * @wow_pulse_interval_low: The interval of low level in the pulse
+ * @packet_filters_bitmap: Packet filter bitmap configuration
*/
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;
@@ -305,11 +360,40 @@ struct pmo_psoc_cfg {
bool disassoc_enable;
bool bmiss_enable;
bool lpass_enable;
+ bool wowlan_deauth_enable;
+ bool wowlan_disassoc_enable;
+ uint8_t max_ps_poll;
uint8_t sta_dynamic_dtim;
uint8_t sta_mod_dtim;
uint8_t sta_max_li_mod_dtim;
- uint8_t power_save_mode;
+ enum pmo_wow_enable_type wow_enable;
+ enum powersave_mode power_save_mode;
+#ifdef FEATURE_RUNTIME_PM
+ uint32_t runtime_pm_delay;
+#endif
+#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
+ bool extwow_goto_suspend;
+ uint8_t extwow_app1_wakeup_pin_num;
+ uint8_t extwow_app2_wakeup_pin_num;
+ uint32_t extwow_app2_init_ping_interval;
+ uint32_t extwow_app2_min_ping_interval;
+ uint32_t extwow_app2_max_ping_interval;
+ uint32_t extwow_app2_inc_ping_interval;
+ uint16_t extwow_app2_tcp_src_port;
+ uint16_t extwow_app2_tcp_dst_port;
+ uint32_t extwow_app2_tcp_tx_timeout;
+ uint32_t extwow_app2_tcp_rx_timeout;
+#endif
enum pmo_auto_pwr_detect_failure_mode auto_power_save_fail_mode;
+#ifdef WLAN_FEATURE_WOW_PULSE
+ bool is_wow_pulse_supported;
+ uint8_t wow_pulse_pin;
+ uint16_t wow_pulse_interval_high;
+ uint16_t wow_pulse_interval_low;
+#endif
+#ifdef WLAN_FEATURE_PACKET_FILTERING
+ uint8_t packet_filters_bitmap;
+#endif
};
/**
diff --git a/components/pmo/dispatcher/inc/wlan_pmo_ucfg_api.h b/components/pmo/dispatcher/inc/wlan_pmo_ucfg_api.h
index 0cd3f1e21a..f3914b09d5 100644
--- a/components/pmo/dispatcher/inc/wlan_pmo_ucfg_api.h
+++ b/components/pmo/dispatcher/inc/wlan_pmo_ucfg_api.h
@@ -34,6 +34,27 @@
#include "wlan_pmo_hw_filter_public_struct.h"
#ifdef WLAN_POWER_MANAGEMENT_OFFLOAD
+
+/**
+ * ucfg_pmo_psoc_open() - pmo psoc object open
+ * @psoc: objmgr vdev
+ *.
+ * This function used to open pmo psoc object by user space
+ *
+ * Return: true in case success else false
+ */
+QDF_STATUS ucfg_pmo_psoc_open(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_psoc_open() - pmo psoc object close
+ * @psoc: objmgr vdev
+ *.
+ * This function used to close pmo psoc object by user space
+ *
+ * Return: true in case success else false
+ */
+QDF_STATUS ucfg_pmo_psoc_close(struct wlan_objmgr_psoc *psoc);
+
/**
* ucfg_pmo_get_apf_instruction_size() - get the current APF instruction size
* @psoc: the psoc to query
@@ -110,6 +131,120 @@ QDF_STATUS ucfg_pmo_update_psoc_config(struct wlan_objmgr_psoc *psoc,
QDF_STATUS ucfg_pmo_psoc_set_caps(struct wlan_objmgr_psoc *psoc,
struct pmo_device_caps *caps);
+/**
+ * ucfg_pmo_is_arp_offload_enabled() - Get arp offload enable or not
+ * @psoc: pointer to psoc object
+ *
+ * Return: arp offload enable or not
+ */
+bool
+ucfg_pmo_is_arp_offload_enabled(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_set_arp_offload_enabled() - Set arp offload enable or not
+ * @psoc: pointer to psoc object
+ * @val: enable/disable arp offload
+ *
+ * Return: None
+ */
+void
+ucfg_pmo_set_arp_offload_enabled(struct wlan_objmgr_psoc *psoc,
+ bool val);
+
+/**
+ * ucfg_pmo_is_ssdp_enabled() - Get ssdp enable or not
+ * @psoc: pointer to psoc object
+ *
+ * Return: enable/disable ssdp
+ */
+bool
+ucfg_pmo_is_ssdp_enabled(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_is_ns_offloaded() - Get ns offload support or not
+ * @psoc: pointer to psoc object
+ *
+ * Return: ns offload or not
+ */
+bool
+ucfg_pmo_is_ns_offloaded(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_get_sta_dynamic_dtim() - Get dynamic dtim
+ * @psoc: pointer to psoc object
+ *
+ * Return: dynamic dtim
+ */
+uint8_t
+ucfg_pmo_get_sta_dynamic_dtim(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_get_sta_mod_dtim() - Get modulated dtim
+ * @psoc: pointer to psoc object
+ *
+ * Return: modulated dtim
+ */
+uint8_t
+ucfg_pmo_get_sta_mod_dtim(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_set_sta_mod_dtim() - Set modulated dtim
+ * @psoc: pointer to psoc object
+ * @val: modulated dtim
+ *
+ * Return: None
+ */
+void
+ucfg_pmo_set_sta_mod_dtim(struct wlan_objmgr_psoc *psoc,
+ uint8_t val);
+
+/**
+ * ucfg_pmo_is_mc_addr_list_enabled() - Get multicast address list enable or not
+ * @psoc: pointer to psoc object
+ *
+ * Return: multicast address list enable or not
+ */
+bool
+ucfg_pmo_is_mc_addr_list_enabled(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_get_power_save_mode() - Get power save mode
+ * @psoc: pointer to psoc object
+ *
+ * Return: power save mode
+ */
+enum powersave_mode
+ucfg_pmo_get_power_save_mode(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_set_power_save_mode() - Set power save mode
+ * @psoc: pointer to psoc object
+ * @val: power save mode
+ *
+ * Return: None
+ */
+void
+ucfg_pmo_set_power_save_mode(struct wlan_objmgr_psoc *psoc,
+ enum powersave_mode val);
+
+/**
+ * ucfg_pmo_get_max_ps_poll() - Get max power save poll
+ * @psoc: pointer to psoc object
+ *
+ * Return: power save poll
+ */
+uint8_t
+ucfg_pmo_get_max_ps_poll(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_power_save_offload_enabled() - Get power save offload enabled type
+ * @psoc: pointer to psoc object
+ *
+ * Return: power save offload enabled type
+ */
+uint8_t
+ucfg_pmo_power_save_offload_enabled(struct wlan_objmgr_psoc *psoc);
+
/**
* pmo_ucfg_enable_wakeup_event() - enable wow wakeup events
* @psoc: objmgr psoc
@@ -394,6 +529,13 @@ QDF_STATUS pmo_ucfg_enable_gtk_offload_in_fwr(struct wlan_objmgr_vdev *vdev);
QDF_STATUS pmo_ucfg_disable_gtk_offload_in_fwr(struct wlan_objmgr_vdev *vdev);
#ifdef WLAN_FEATURE_PACKET_FILTERING
+/**
+ * ucfg_pmo_get_pkt_filter_bitmap() - get default packet filters bitmap
+ * @psoc: the psoc to query
+ *
+ * Return: retrieve packet filter bitmap configuration
+ */
+uint8_t ucfg_pmo_get_pkt_filter_bitmap(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_pmo_get_num_packet_filters() - get the number of packet filters
@@ -427,6 +569,12 @@ QDF_STATUS pmo_ucfg_clear_pkt_filter(struct wlan_objmgr_psoc *psoc,
struct pmo_rcv_pkt_fltr_clear_param *pmo_clr_pkt_fltr_param,
uint8_t vdev_id);
#else
+static inline uint8_t
+ucfg_pmo_get_pkt_filter_bitmap(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+
static inline uint32_t
ucfg_pmo_get_num_packet_filters(struct wlan_objmgr_psoc *psoc)
{
@@ -452,6 +600,44 @@ pmo_ucfg_clear_pkt_filter(
}
#endif
+/**
+ * ucfg_pmo_get_wow_enable() - Get wow enable type
+ * @psoc: pointer to psoc object
+ *
+ * Return: wow enable type
+ */
+enum pmo_wow_enable_type
+ucfg_pmo_get_wow_enable(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_set_wow_enable() - Set wow enable type
+ * @psoc: pointer to psoc object
+ * @val: wow enalbe value
+ *
+ * Return: None
+ */
+void
+ucfg_pmo_set_wow_enable(struct wlan_objmgr_psoc *psoc,
+ enum pmo_wow_enable_type val);
+
+/**
+ * ucfg_pmo_is_wowlan_deauth_enabled() - Get wowlan deauth enable
+ * @psoc: pointer to psoc object
+ *
+ * Return: wowlan deauth enable or not
+ */
+bool
+ucfg_pmo_is_wowlan_deauth_enabled(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_is_wowlan_disassoc_enabled() - Get wowlan disassoc enable
+ * @psoc: pointer to psoc object
+ *
+ * Return: wowlan disassoc enable
+ */
+bool
+ucfg_pmo_is_wowlan_disassoc_enabled(struct wlan_objmgr_psoc *psoc);
+
/**
* pmo_ucfg_get_gtk_rsp(): API to send gtk response request to fwr
* @vdev: objmgr vdev handle
@@ -705,13 +891,116 @@ QDF_STATUS pmo_ucfg_config_listen_interval(struct wlan_objmgr_vdev *vdev,
*/
QDF_STATUS pmo_ucfg_config_modulated_dtim(struct wlan_objmgr_vdev *vdev,
uint32_t mod_dtim);
+
+#ifdef WLAN_FEATURE_WOW_PULSE
+/**
+ * ucfg_pmo_is_wow_pulse_enabled() - to get wow pulse enable configuration
+ * @psoc: objmgr psoc handle
+ *
+ * Return: wow pulse enable configuration
+ */
+bool ucfg_pmo_is_wow_pulse_enabled(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_get_wow_pulse_pin() - to get wow pulse pin configuration
+ * @psoc: objmgr psoc handle
+ *
+ * Return: wow pulse pin configuration
+ */
+uint8_t ucfg_pmo_get_wow_pulse_pin(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_get_wow_pulse_interval_high() - to get wow pulse interval high
+ * @psoc: objmgr psoc handle
+ *
+ * Return: wow pulse interval high configuration
+ */
+uint16_t ucfg_pmo_get_wow_pulse_interval_high(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_get_wow_pulse_interval_low() - to get wow pulse interval low
+ * @psoc: objmgr psoc handle
+ *
+ * Return: wow pulse interval high configuration
+ */
+uint16_t ucfg_pmo_get_wow_pulse_interval_low(struct wlan_objmgr_psoc *psoc);
+#else
+static inline bool
+ucfg_pmo_is_wow_pulse_enabled(struct wlan_objmgr_psoc *psoc)
+{
+ return false;
+}
+
+static inline uint8_t
+ucfg_pmo_get_wow_pulse_pin(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+
+static inline uint16_t
+ucfg_pmo_get_wow_pulse_interval_high(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+#endif
+
+/**
+ * ucfg_pmo_is_active_mode_offloaded() - get active mode offload configuration
+ * @psoc: objmgr psoc handle
+ *
+ * Return: retrieve active mode offload configuration
+ */
+bool ucfg_pmo_is_active_mode_offloaded(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_get_auto_power_fail_mode() - to get auto power save failure mode
+ * @psoc: objmgr psoc handle
+ *
+ * Return: auto power save failure mode configuration
+ */
+enum pmo_auto_pwr_detect_failure_mode
+ucfg_pmo_get_auto_power_fail_mode(struct wlan_objmgr_psoc *psoc);
+
+#ifdef FEATURE_WLAN_APF
+/**
+ * ucfg_pmo_is_apf_enabled() - to get apf configuration
+ * @psoc: objmgr psoc handle
+ *
+ * Return: true if enabled, it is intersection of ini and target cap
+ */
+bool ucfg_pmo_is_apf_enabled(struct wlan_objmgr_psoc *psoc);
+#else
+static inline bool ucfg_pmo_is_apf_enabled(struct wlan_objmgr_psoc *psoc)
+{
+ return false;
+}
+#endif
+
#else /* WLAN_POWER_MANAGEMENT_OFFLOAD */
+static inline QDF_STATUS
+ucfg_pmo_psoc_open(struct wlan_objmgr_psoc *psoc)
+{
+ return QDF_STATUS_SUCCESS;
+}
+
+static inline QDF_STATUS
+ucfg_pmo_psoc_close(struct wlan_objmgr_psoc *psoc)
+{
+ return QDF_STATUS_SUCCESS;
+}
+
static inline uint32_t
ucfg_pmo_get_apf_instruction_size(struct wlan_objmgr_psoc *psoc)
{
return 0;
}
+static inline uint8_t
+ucfg_pmo_get_pkt_filter_bitmap(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+
static inline uint32_t
ucfg_pmo_get_num_packet_filters(struct wlan_objmgr_psoc *psoc)
{
@@ -1167,6 +1456,301 @@ pmo_ucfg_config_modulated_dtim(struct wlan_objmgr_vdev *vdev,
{
return QDF_STATUS_SUCCESS;
}
+
+static inline bool
+ucfg_pmo_is_arp_offload_enabled(struct wlan_objmgr_psoc *psoc)
+{
+ return false;
+}
+
+static inline void
+ucfg_pmo_set_arp_offload_enabled(struct wlan_objmgr_psoc *psoc,
+ bool val)
+{
+}
+
+static inline bool
+ucfg_pmo_is_wow_pulse_enabled(struct wlan_objmgr_psoc *psoc)
+{
+ return false;
+}
+
+static inline uint8_t
+ucfg_pmo_get_wow_pulse_pin(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+
+static inline uint16_t
+ucfg_pmo_get_wow_pulse_interval_high(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+
+static inline uint16_t
+ucfg_pmo_get_wow_pulse_interval_low(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+
+static inline bool
+ucfg_pmo_is_active_mode_offloaded(struct wlan_objmgr_psoc *psoc)
+{
+ return true;
+}
+
+static inline enum pmo_auto_pwr_detect_failure_mode
+ucfg_pmo_get_auto_power_fail_mode(struct wlan_objmgr_psoc *psoc)
+{
+ return PMO_FW_TO_CRASH_ON_PWR_FAILURE;
+}
+
+static inline bool ucfg_pmo_is_apf_enabled(struct wlan_objmgr_psoc *psoc)
+{
+ return false;
+}
+
+static inline bool ucfg_pmo_is_ssdp_enabled(struct wlan_objmgr_psoc *psoc)
+{
+ return false;
+}
+
+static inline bool ucfg_pmo_is_ns_offloaded(struct wlan_objmgr_psoc *psoc)
+{
+ return false;
+}
+
+static inline uint8_t
+ucfg_pmo_get_sta_dynamic_dtim(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+
+static inline uint8_t
+ucfg_pmo_get_sta_mod_dtim(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+
+static inline void
+ucfg_pmo_set_sta_mod_dtim(struct wlan_objmgr_psoc *psoc,
+ uint8_t val)
+{
+}
+
+static inline bool
+ucfg_pmo_is_mc_addr_list_enabled(struct wlan_objmgr_psoc *psoc)
+{
+ return false;
+}
+
+static inline enum powersave_mode
+ucfg_pmo_get_power_save_mode(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+
+static inline void
+ucfg_pmo_set_power_save_mode(struct wlan_objmgr_psoc *psoc,
+ enum powersave_mode val)
+{
+}
+
+static inline uint8_t
+ucfg_pmo_get_max_ps_poll(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+
+static inline uint8_t
+ucfg_pmo_power_save_offload_enabled(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
#endif /* WLAN_POWER_MANAGEMENT_OFFLOAD */
+#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
+/**
+ * ucfg_pmo_extwow_is_goto_suspend_enabled() - Get extwow goto suspend enable
+ * @psoc: pointer to psoc object
+ *
+ * Return: extend wow goto suspend enable or not
+ */
+bool
+ucfg_pmo_extwow_is_goto_suspend_enabled(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_extwow_app1_wakeup_pin_num() - Get wakeup1 PIN number
+ * @psoc: pointer to psoc object
+ *
+ * Return: wakeup1 PIN number
+ */
+uint8_t
+ucfg_pmo_extwow_app1_wakeup_pin_num(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_extwow_app2_wakeup_pin_num() - Get wakeup2 PIN number
+ * @psoc: pointer to psoc object
+ *
+ * Return: wakeup2 PIN number
+ */
+uint8_t
+ucfg_pmo_extwow_app2_wakeup_pin_num(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_extwow_app2_init_ping_interval() - Get keep alive init ping interval
+ * @psoc: pointer to psoc object
+ *
+ * Return: keep alive init ping interval
+ */
+uint32_t
+ucfg_pmo_extwow_app2_init_ping_interval(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_extwow_app2_min_ping_interval() - Get keep alive min ping interval
+ * @psoc: pointer to psoc object
+ *
+ * Return: keep alive min ping interval
+ */
+uint32_t
+ucfg_pmo_extwow_app2_min_ping_interval(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_extwow_app2_max_ping_interval() - Get keep alive max ping interval
+ * @psoc: pointer to psoc object
+ *
+ * Return: keep alive max ping interval
+ */
+uint32_t
+ucfg_pmo_extwow_app2_max_ping_interval(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_extwow_app2_inc_ping_interval() - Get keep alive inc ping interval
+ * @psoc: pointer to psoc object
+ *
+ * Return: keep alive inc ping interval
+ */
+uint32_t
+ucfg_pmo_extwow_app2_inc_ping_interval(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_extwow_app2_tcp_src_port() - Get TCP source port
+ * @psoc: pointer to psoc object
+ *
+ * Return: TCP source port
+ */
+uint16_t
+ucfg_pmo_extwow_app2_tcp_src_port(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_extwow_app2_tcp_dst_port() - Get TCP Destination port
+ * @psoc: pointer to psoc object
+ *
+ * Return: TCP Destination port
+ */
+uint16_t
+ucfg_pmo_extwow_app2_tcp_dst_port(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_extwow_app2_tcp_tx_timeout() - Get TCP Tx timeout
+ * @psoc: pointer to psoc object
+ *
+ * Return: TCP Tx timeout
+ */
+uint32_t
+ucfg_pmo_extwow_app2_tcp_tx_timeout(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_pmo_extwow_app2_tcp_rx_timeout() - to get extwow tcp rx timeout
+ * @psoc: objmgr psoc handle
+ *
+ * Return: retrieve extwow app2 tcp rx timeout configuration
+ */
+uint32_t
+ucfg_pmo_extwow_app2_tcp_rx_timeout(struct wlan_objmgr_psoc *psoc);
+
+#else
+static inline bool
+ucfg_pmo_extwow_is_goto_suspend_enabled(struct wlan_objmgr_psoc *psoc)
+{
+ return false;
+}
+
+static inline uint32_t
+ucfg_pmo_extwow_app1_wakeup_pin_num(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+
+static inline uint32_t
+ucfg_pmo_extwow_app2_wakeup_pin_num(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+
+static inline uint32_t
+ucfg_pmo_extwow_app2_init_ping_interval(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+
+static inline uint32_t
+ucfg_pmo_extwow_app2_min_ping_interval(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+
+static inline uint32_t
+ucfg_pmo_extwow_app2_max_ping_interval(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+
+static inline uint32_t
+ucfg_pmo_extwow_app2_inc_ping_interval(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+
+static inline uint16_t
+ucfg_pmo_extwow_app2_tcp_src_port(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+
+static inline uint16_t
+ucfg_pmo_extwow_app2_tcp_dst_port(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+
+static inline uint32_t
+ucfg_pmo_extwow_app2_tcp_tx_timeout(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+
+static inline uint32_t
+ucfg_pmo_extwow_app2_tcp_rx_timeout(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+#endif
+
+#ifdef FEATURE_RUNTIME_PM
+/**
+ * ucfg_pmo_get_runtime_pm_delay() - Get runtime pm's inactivity timer
+ * @psoc: pointer to psoc object
+ *
+ * Return: runtime pm's inactivity timer
+ */
+uint32_t
+ucfg_pmo_get_runtime_pm_delay(struct wlan_objmgr_psoc *psoc);
+#else
+static inline uint32_t
+ucfg_pmo_get_runtime_pm_delay(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
+#endif /* FEATURE_RUNTIME_PM */
#endif /* end of _WLAN_PMO_UCFG_API_H_ */
diff --git a/components/pmo/dispatcher/src/wlan_pmo_ucfg_api.c b/components/pmo/dispatcher/src/wlan_pmo_ucfg_api.c
index 22a82110a7..d4206b8b74 100644
--- a/components/pmo/dispatcher/src/wlan_pmo_ucfg_api.c
+++ b/components/pmo/dispatcher/src/wlan_pmo_ucfg_api.c
@@ -31,6 +31,18 @@
#include "wlan_pmo_suspend_resume.h"
#include "wlan_pmo_pkt_filter.h"
#include "wlan_pmo_hw_filter.h"
+#include "wlan_pmo_cfg.h"
+#include "cfg_ucfg_api.h"
+
+QDF_STATUS ucfg_pmo_psoc_open(struct wlan_objmgr_psoc *psoc)
+{
+ return pmo_psoc_open(psoc);
+}
+
+QDF_STATUS ucfg_pmo_psoc_close(struct wlan_objmgr_psoc *psoc)
+{
+ return pmo_psoc_close(psoc);
+}
uint32_t ucfg_pmo_get_apf_instruction_size(struct wlan_objmgr_psoc *psoc)
{
@@ -250,6 +262,13 @@ QDF_STATUS pmo_ucfg_disable_gtk_offload_in_fwr(struct wlan_objmgr_vdev *vdev)
}
#ifdef WLAN_FEATURE_PACKET_FILTERING
+uint8_t ucfg_pmo_get_pkt_filter_bitmap(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.packet_filters_bitmap;
+}
+
uint32_t ucfg_pmo_get_num_packet_filters(struct wlan_objmgr_psoc *psoc)
{
QDF_BUG(psoc);
@@ -440,3 +459,304 @@ QDF_STATUS pmo_ucfg_config_modulated_dtim(struct wlan_objmgr_vdev *vdev,
return pmo_core_config_modulated_dtim(vdev, mod_dtim);
}
+enum pmo_wow_enable_type
+ucfg_pmo_get_wow_enable(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.wow_enable;
+}
+
+void
+ucfg_pmo_set_wow_enable(struct wlan_objmgr_psoc *psoc,
+ enum pmo_wow_enable_type val)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ pmo_psoc_ctx->psoc_cfg.wow_enable = val;
+}
+
+bool
+ucfg_pmo_is_wowlan_deauth_enabled(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.wowlan_deauth_enable;
+}
+
+bool
+ucfg_pmo_is_wowlan_disassoc_enabled(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.wowlan_disassoc_enable;
+}
+
+bool
+ucfg_pmo_is_arp_offload_enabled(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.arp_offload_enable;
+}
+
+void
+ucfg_pmo_set_arp_offload_enabled(struct wlan_objmgr_psoc *psoc,
+ bool val)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ pmo_psoc_ctx->psoc_cfg.arp_offload_enable = val;
+}
+
+enum pmo_auto_pwr_detect_failure_mode
+ucfg_pmo_get_auto_power_fail_mode(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.auto_power_save_fail_mode;
+}
+
+#ifdef WLAN_FEATURE_WOW_PULSE
+bool ucfg_pmo_is_wow_pulse_enabled(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.is_wow_pulse_supported;
+}
+
+uint8_t ucfg_pmo_get_wow_pulse_pin(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.wow_pulse_pin;
+}
+
+uint16_t ucfg_pmo_get_wow_pulse_interval_high(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.wow_pulse_interval_high;
+}
+
+uint16_t ucfg_pmo_get_wow_pulse_interval_low(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.wow_pulse_interval_low;
+}
+#endif
+
+bool ucfg_pmo_is_active_mode_offloaded(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.active_mode_offload;
+}
+
+#ifdef FEATURE_WLAN_APF
+bool ucfg_pmo_is_apf_enabled(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_intersect_apf(pmo_psoc_ctx);
+}
+#endif
+
+bool
+ucfg_pmo_is_ssdp_enabled(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.ssdp;
+}
+
+#ifdef FEATURE_RUNTIME_PM
+uint32_t
+ucfg_pmo_get_runtime_pm_delay(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.runtime_pm_delay;
+}
+#endif /* FEATURE_RUNTIME_PM */
+
+bool
+ucfg_pmo_is_ns_offloaded(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.ns_offload_enable_static;
+}
+
+uint8_t
+ucfg_pmo_get_sta_dynamic_dtim(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.sta_dynamic_dtim;
+}
+
+uint8_t
+ucfg_pmo_get_sta_mod_dtim(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.sta_dynamic_dtim;
+}
+
+void
+ucfg_pmo_set_sta_mod_dtim(struct wlan_objmgr_psoc *psoc,
+ uint8_t val)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ pmo_psoc_ctx->psoc_cfg.sta_dynamic_dtim = val;
+}
+
+bool
+ucfg_pmo_is_mc_addr_list_enabled(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.enable_mc_list;
+}
+
+enum powersave_mode
+ucfg_pmo_get_power_save_mode(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.power_save_mode;
+}
+
+void
+ucfg_pmo_set_power_save_mode(struct wlan_objmgr_psoc *psoc,
+ enum powersave_mode val)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ pmo_psoc_ctx->psoc_cfg.power_save_mode = val;
+}
+
+uint8_t
+ucfg_pmo_get_max_ps_poll(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.max_ps_poll;
+}
+
+uint8_t
+ucfg_pmo_power_save_offload_enabled(struct wlan_objmgr_psoc *psoc)
+{
+ uint8_t powersave_offload_enabled;
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ if (!pmo_psoc_ctx->psoc_cfg.max_ps_poll ||
+ !pmo_psoc_ctx->psoc_cfg.power_save_mode)
+ powersave_offload_enabled =
+ pmo_psoc_ctx->psoc_cfg.power_save_mode;
+ else if ((pmo_psoc_ctx->psoc_cfg.power_save_mode ==
+ PS_QPOWER_NODEEPSLEEP) ||
+ (pmo_psoc_ctx->psoc_cfg.power_save_mode ==
+ PS_LEGACY_NODEEPSLEEP))
+ powersave_offload_enabled = PS_LEGACY_NODEEPSLEEP;
+ else
+ powersave_offload_enabled = PS_LEGACY_DEEPSLEEP;
+
+ pmo_debug("powersave offload enabled type:%d",
+ powersave_offload_enabled);
+
+ return powersave_offload_enabled;
+}
+
+#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
+bool
+ucfg_pmo_extwow_is_goto_suspend_enabled(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.extwow_goto_suspend;
+}
+
+uint8_t
+ucfg_pmo_extwow_app1_wakeup_pin_num(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.extwow_app1_wakeup_pin_num;
+}
+
+uint8_t
+ucfg_pmo_extwow_app2_wakeup_pin_num(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.extwow_app2_wakeup_pin_num;
+}
+
+uint32_t
+ucfg_pmo_extwow_app2_init_ping_interval(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.extwow_app2_init_ping_interval;
+}
+
+uint32_t
+ucfg_pmo_extwow_app2_min_ping_interval(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.extwow_app2_min_ping_interval;
+}
+
+uint32_t
+ucfg_pmo_extwow_app2_max_ping_interval(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.extwow_app2_max_ping_interval;
+}
+
+uint32_t
+ucfg_pmo_extwow_app2_inc_ping_interval(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.extwow_app2_inc_ping_interval;
+}
+
+uint16_t
+ucfg_pmo_extwow_app2_tcp_src_port(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.extwow_app2_tcp_src_port;
+}
+
+uint16_t
+ucfg_pmo_extwow_app2_tcp_dst_port(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.extwow_app2_tcp_dst_port;
+}
+
+uint32_t
+ucfg_pmo_extwow_app2_tcp_tx_timeout(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.extwow_app2_tcp_tx_timeout;
+}
+
+uint32_t
+ucfg_pmo_extwow_app2_tcp_rx_timeout(struct wlan_objmgr_psoc *psoc)
+{
+ struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc);
+
+ return pmo_psoc_ctx->psoc_cfg.extwow_app2_tcp_rx_timeout;
+}
+#endif