qcacld-3.0: Move CLD components outside core folder
Core is legacy module folder in CLD. Hence move MCL specific components folder outside core. Change-Id: Iba3f9fdb06ad10dc4a5b19f3ff1ffa23f7372605 CRs-Fixed: 2077963
这个提交包含在:
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright (c) 2017 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.
|
||||
*/
|
||||
/**
|
||||
* DOC: Declare various struct, macros which shall be used in
|
||||
* pmo arp offload feature.
|
||||
*
|
||||
* Note: This file shall not contain public API's prototype/declarations.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_PMO_ARP_PUBLIC_STRUCT_H_
|
||||
#define _WLAN_PMO_ARP_PUBLIC_STRUCT_H_
|
||||
|
||||
#include "wlan_pmo_common_public_struct.h"
|
||||
|
||||
/**
|
||||
* struct pmo_arp_req - pmo arp request
|
||||
* @psoc: objmgr psoc
|
||||
* @vdev_id: vdev id on which arp offload needed
|
||||
* @ipv4_addr: ipv4 address for the interface
|
||||
* @trigger: context from where arp offload triggered
|
||||
*/
|
||||
struct pmo_arp_req {
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
uint8_t vdev_id;
|
||||
uint32_t ipv4_addr;
|
||||
enum pmo_offload_trigger trigger;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_arp_req - pmo arp offload param for target interface
|
||||
* @enable: true when arp offload is enabled else false
|
||||
* @host_ipv4_addr: host interface ipv4 address
|
||||
* @bssid: peer ap address
|
||||
*/
|
||||
struct pmo_arp_offload_params {
|
||||
uint8_t enable;
|
||||
uint8_t host_ipv4_addr[PMO_IPV4_ADDR_LEN];
|
||||
struct qdf_mac_addr bssid;
|
||||
};
|
||||
|
||||
#endif /* end of _WLAN_PMO_ARP_PUBLIC_STRUCT_H_ */
|
||||
|
@@ -0,0 +1,298 @@
|
||||
/*
|
||||
* Copyright (c) 2017 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.
|
||||
*/
|
||||
/**
|
||||
* DOC: Declare various struct, macros which are common for
|
||||
* various pmo related features.
|
||||
*
|
||||
* Note: This file shall not contain public API's prototype/declartions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_PMO_COMMONP_PUBLIC_STRUCT_H_
|
||||
#define _WLAN_PMO_COMMONP_PUBLIC_STRUCT_H_
|
||||
|
||||
#include "wlan_cmn.h"
|
||||
#include "wlan_objmgr_cmn.h"
|
||||
#include "wlan_objmgr_global_obj.h"
|
||||
#include "wlan_objmgr_psoc_obj.h"
|
||||
#include "wlan_objmgr_pdev_obj.h"
|
||||
#include "wlan_objmgr_vdev_obj.h"
|
||||
#include "wlan_objmgr_peer_obj.h"
|
||||
#include "wmi_unified.h"
|
||||
#include "qdf_status.h"
|
||||
#include "qdf_lock.h"
|
||||
#include "qdf_event.h"
|
||||
#include "wlan_pmo_hw_filter_public_struct.h"
|
||||
|
||||
#define PMO_IPV4_ADDR_LEN 4
|
||||
|
||||
#define PMO_IPV4_ARP_REPLY_OFFLOAD 0
|
||||
#define PMO_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
|
||||
#define PMO_IPV6_NS_OFFLOAD 2
|
||||
#define PMO_OFFLOAD_DISABLE 0
|
||||
#define PMO_OFFLOAD_ENABLE 1
|
||||
|
||||
#define PMO_MAC_NS_OFFLOAD_SIZE 1
|
||||
#define PMO_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA 16
|
||||
#define PMO_MAC_IPV6_ADDR_LEN 16
|
||||
#define PMO_IPV6_ADDR_VALID 1
|
||||
#define PMO_IPV6_ADDR_UC_TYPE 0
|
||||
#define PMO_IPV6_ADDR_AC_TYPE 1
|
||||
|
||||
#define PMO_80211_ADDR_LEN 6 /* size of 802.11 address */
|
||||
|
||||
#define PMO_WOW_REQUIRED_CREDITS 1
|
||||
|
||||
/**
|
||||
* enum pmo_offload_type: tell offload type
|
||||
* @pmo_arp_offload: arp offload
|
||||
* @pmo_ns_offload: ns offload
|
||||
* @pmo_gtk_offload: gtk offload
|
||||
*/
|
||||
enum pmo_offload_type {
|
||||
pmo_arp_offload = 0,
|
||||
pmo_ns_offload,
|
||||
pmo_gtk_offload,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum pmo_vdev_param_id: tell vdev param id
|
||||
* @pmo_vdev_param_listen_interval: vdev listen interval param id
|
||||
* @pmo_vdev_param_dtim_policy: vdev param dtim policy
|
||||
* @pmo_vdev_max_param: Max vdev param id
|
||||
*/
|
||||
enum pmo_vdev_param_id {
|
||||
pmo_vdev_param_listen_interval = 0,
|
||||
pmo_vdev_param_dtim_policy,
|
||||
pmo_vdev_max_param
|
||||
};
|
||||
|
||||
/**
|
||||
* enum pmo_beacon_dtim_policy: tell vdev beacon policy
|
||||
* @pmo_ignore_dtim: fwr need to igonre dtime policy
|
||||
* @pmo_normal_dtim: fwr need to use normal dtime policy
|
||||
* @pmo_stick_dtim: fwr need to use stick dtime policy
|
||||
* @auto_dtim: fwr need to auto dtime policy
|
||||
*/
|
||||
enum pmo_beacon_dtim_policy {
|
||||
pmo_ignore_dtim = 0x01,
|
||||
pmo_normal_dtim = 0x02,
|
||||
pmo_stick_dtim = 0x03,
|
||||
pmo_auto_dtim = 0x04,
|
||||
};
|
||||
|
||||
/**
|
||||
* @pmo_sta_ps_param_rx_wake_policy: Controls how frames are retrievd from AP
|
||||
* while STA is sleeping.
|
||||
* @pmo_sta_ps_param_tx_wake_threshold: STA will go active after this many TX
|
||||
* @pmo_sta_ps_param_pspoll_count:No of PS-Poll to send before STA wakes up
|
||||
* @pmo_sta_ps_param_inactivity_time: TX/RX inactivity time in msec before
|
||||
going to sleep.
|
||||
* @pmo_sta_ps_param_uapsd: Set uapsd configuration.
|
||||
* @pmo_sta_ps_param_qpower_pspoll_count: No of PS-Poll to send before
|
||||
STA wakes up in QPower Mode.
|
||||
* @pmo_sta_ps_enable_qpower: Enable QPower
|
||||
* @pmo_sta_ps_param_qpower_max_tx_before_wake: Number of TX frames before the
|
||||
entering the Active state
|
||||
*/
|
||||
enum pmo_sta_powersave_param {
|
||||
pmo_sta_ps_param_rx_wake_policy = 0,
|
||||
pmo_sta_ps_param_tx_wake_threshold = 1,
|
||||
pmo_sta_ps_param_pspoll_count = 2,
|
||||
pmo_sta_ps_param_inactivity_time = 3,
|
||||
pmo_sta_ps_param_uapsd = 4,
|
||||
pmo_sta_ps_param_qpower_pspoll_count = 5,
|
||||
pmo_sta_ps_enable_qpower = 6,
|
||||
pmo_sta_ps_param_qpower_max_tx_before_wake = 7,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum powersave_qpower_mode: QPOWER modes
|
||||
* @pmo_qpower_disabled: Qpower is disabled
|
||||
* @pmo_qpower_enabled: Qpower is enabled
|
||||
* @pmo_qpower_duty_cycling: Qpower is enabled with duty cycling
|
||||
*/
|
||||
enum pmo_power_save_qpower_mode {
|
||||
pmo_qpower_disabled = 0,
|
||||
pmo_qpower_enabled = 1,
|
||||
pmo_qpower_duty_cycling = 2
|
||||
};
|
||||
|
||||
/**
|
||||
* enum powersave_qpower_mode: powersave_mode
|
||||
* @pmo_ps_not_supported: Power save is not supported
|
||||
* @pmo_ps_legacy_no_deep_sleep: Legacy pwr save enabled and deep sleep disabled
|
||||
* @pmo_ps_qpower_no_deep_sleep: QPOWER enabled and deep sleep disabled
|
||||
* @pmo_ps_legacy_deep_sleep: Legacy power save enabled and deep sleep enabled
|
||||
* @pmo_ps_qpower_deep_sleep: QPOWER enabled and deep sleep enabled
|
||||
* @pmo_ps_duty_cycling_qpower: QPOWER enabled in duty cycling mode
|
||||
*/
|
||||
enum pmo_powersave_mode {
|
||||
pmo_ps_not_supported = 0,
|
||||
pmo_ps_legacy_no_deep_sleep = 1,
|
||||
pmo_ps_qpower_no_deep_sleep = 2,
|
||||
pmo_ps_legacy_deep_sleep = 3,
|
||||
pmo_ps_qpower_deep_sleep = 4,
|
||||
pmo_ps_duty_cycling_qpower = 5
|
||||
};
|
||||
|
||||
/**
|
||||
* enum wow_resume_trigger - resume trigger override setting values
|
||||
* @PMO_WOW_RESUME_TRIGGER_DEFAULT: fw to use platform default resume trigger
|
||||
* @PMO_WOW_RESUME_TRIGGER_HTC_WAKEUP: force fw to use HTC Wakeup to resume
|
||||
* @PMO_WOW_RESUME_TRIGGER_GPIO: force fw to use GPIO to resume
|
||||
* @PMO_WOW_RESUME_TRIGGER_COUNT: number of resume trigger options
|
||||
*/
|
||||
enum pmo_wow_resume_trigger {
|
||||
/* always first */
|
||||
PMO_WOW_RESUME_TRIGGER_DEFAULT = 0,
|
||||
PMO_WOW_RESUME_TRIGGER_HTC_WAKEUP,
|
||||
PMO_WOW_RESUME_TRIGGER_GPIO,
|
||||
/* always last */
|
||||
PMO_WOW_RESUME_TRIGGER_COUNT
|
||||
};
|
||||
|
||||
/**
|
||||
* enum wow_interface_pause - interface pause override setting values
|
||||
* @PMO_WOW_INTERFACE_PAUSE_DEFAULT: use platform default iface pause setting
|
||||
* @PMO_WOW_INTERFACE_PAUSE_ENABLE: force interface pause setting to enabled
|
||||
* @PMO_WOW_INTERFACE_PAUSE_DISABLE: force interface pause setting to disabled
|
||||
* @PMO_WOW_INTERFACE_PAUSE_COUNT: number of interface pause options
|
||||
*/
|
||||
enum pmo_wow_interface_pause {
|
||||
/* always first */
|
||||
PMO_WOW_INTERFACE_PAUSE_DEFAULT = 0,
|
||||
PMO_WOW_INTERFACE_PAUSE_ENABLE,
|
||||
PMO_WOW_INTERFACE_PAUSE_DISABLE,
|
||||
/* always last */
|
||||
PMO_WOW_INTERFACE_PAUSE_COUNT
|
||||
};
|
||||
|
||||
#define PMO_TGT_SUSPEND_COMPLETE_TIMEOUT 6000
|
||||
#define PMO_WAKE_LOCK_TIMEOUT 1000
|
||||
#define PMO_RESUME_TIMEOUT 25000
|
||||
|
||||
/**
|
||||
* struct wow_enable_params - A collection of wow enable override parameters
|
||||
* @is_unit_test: true to notify fw this is a unit-test suspend
|
||||
* @interface_pause: used to override the interface pause indication sent to fw
|
||||
* @resume_trigger: used to force fw to use a particular resume method
|
||||
*/
|
||||
struct pmo_wow_enable_params {
|
||||
bool is_unit_test;
|
||||
enum pmo_wow_interface_pause interface_pause;
|
||||
enum pmo_wow_resume_trigger resume_trigger;
|
||||
};
|
||||
|
||||
/**
|
||||
* typedef for psoc suspend handler
|
||||
*/
|
||||
typedef QDF_STATUS(*pmo_psoc_suspend_handler)
|
||||
(struct wlan_objmgr_psoc *psoc, void *arg);
|
||||
/**
|
||||
* typedef for psoc resume handler
|
||||
*/
|
||||
typedef QDF_STATUS(*pmo_psoc_resume_handler)
|
||||
(struct wlan_objmgr_psoc *psoc, void *arg);
|
||||
|
||||
/**
|
||||
* enum pmo_offload_trigger: trigger information
|
||||
* @pmo_apps_suspend: trigger is apps suspend
|
||||
* @pmo_apps_resume: trigger is apps resume
|
||||
* @pmo_runtime_suspend: trigger is runtime suspend
|
||||
* @pmo_runtime_resume: trigger is runtime resume
|
||||
* @pmo_ipv4_change_notify: trigger is ipv4 change handler
|
||||
* @pmo_ipv6_change_notify: trigger is ipv6 change handler
|
||||
* @pmo_ns_offload_dynamic_update: enable/disable ns offload on the fly
|
||||
* @pmo_peer_disconnect: trigger is peer disconnect
|
||||
* @pmo_mcbc_setting_dynamic_update: mcbc value update on the fly
|
||||
*
|
||||
* @pmo_offload_trigger_max: Max trigger value
|
||||
*/
|
||||
enum pmo_offload_trigger {
|
||||
pmo_apps_suspend = 0,
|
||||
pmo_apps_resume,
|
||||
pmo_runtime_suspend,
|
||||
pmo_runtime_resume,
|
||||
pmo_ipv4_change_notify,
|
||||
pmo_ipv6_change_notify,
|
||||
pmo_mc_list_change_notify,
|
||||
pmo_ns_offload_dynamic_update,
|
||||
pmo_peer_disconnect,
|
||||
pmo_mcbc_setting_dynamic_update,
|
||||
|
||||
pmo_offload_trigger_max,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_psoc_cfg - user configuration required for pmo
|
||||
* @ptrn_match_enable_all_vdev: true when pattern match is enable for all vdev
|
||||
* @bpf_enable: true if psoc supports bpf else false
|
||||
* @arp_offload_enable: true if arp offload is supported for psoc else false
|
||||
* @hw_filter_mode: which mode the hardware filter should use during DTIM
|
||||
* @ns_offload_enable_static: true if psoc supports ns offload in ini else false
|
||||
* @ns_offload_enable_dynamic: to enable / disable the ns offload using
|
||||
* ioctl or vendor command.
|
||||
* @ssdp: true if psoc supports if ssdp configuration in wow mode
|
||||
* @enable_mc_list: true if psoc supports mc addr list else false
|
||||
* @active_mode_offload: true if psoc supports active mode offload else false
|
||||
* @ap_arpns_support: true if psoc supports arp ns for ap mode
|
||||
* @max_wow_filters: maximum number of wow filter supported
|
||||
* @ra_ratelimit_enable: true when ra filtering ins eanbled else false
|
||||
* @ra_ratelimit_interval: ra packets interval
|
||||
* @magic_ptrn_enable: true when magic pattern is enabled else false
|
||||
* @deauth_enable: true when wake up on deauth is enabled else false
|
||||
* @disassoc_enable: true when wake up on disassoc is enabled else false
|
||||
* @bmiss_enable: true when wake up on bmiss is enabled else false
|
||||
* @nan_enable: true when nan is enabled else false
|
||||
* @lpass_enable: true when lpass is enabled else false
|
||||
* @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
|
||||
* @power_save_mode: power save mode for psoc
|
||||
* @auto_power_save_fail_mode: auto detect power save failure
|
||||
*/
|
||||
struct pmo_psoc_cfg {
|
||||
bool ptrn_match_enable_all_vdev;
|
||||
bool bpf_enable;
|
||||
bool arp_offload_enable;
|
||||
enum pmo_hw_filter_mode hw_filter_mode;
|
||||
bool ns_offload_enable_static;
|
||||
bool ns_offload_enable_dynamic;
|
||||
bool ssdp;
|
||||
bool enable_mc_list;
|
||||
bool active_mode_offload;
|
||||
bool ap_arpns_support;
|
||||
uint8_t max_wow_filters;
|
||||
bool ra_ratelimit_enable;
|
||||
uint16_t ra_ratelimit_interval;
|
||||
bool magic_ptrn_enable;
|
||||
bool deauth_enable;
|
||||
bool disassoc_enable;
|
||||
bool bmiss_enable;
|
||||
bool nan_enable;
|
||||
bool lpass_enable;
|
||||
uint8_t sta_dynamic_dtim;
|
||||
uint8_t sta_mod_dtim;
|
||||
uint8_t sta_max_li_mod_dtim;
|
||||
uint8_t power_save_mode;
|
||||
bool auto_power_save_fail_mode;
|
||||
};
|
||||
|
||||
#endif /* end of _WLAN_PMO_COMMONP_STRUCT_H_ */
|
||||
|
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* Copyright (c) 2017 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.
|
||||
*/
|
||||
/**
|
||||
* DOC: Declare various struct, macros which shall be used in
|
||||
* pmo gtk related feature.
|
||||
*
|
||||
* Note: This file shall not contain public API's prototype/declarations.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_PMO_GTK_PUBLIC_STRUCT_H
|
||||
#define _WLAN_PMO_GTK_PUBLIC_STRUCT_H
|
||||
|
||||
#include "wlan_pmo_common_public_struct.h"
|
||||
|
||||
#define PMO_GTK_OFFLOAD_ENABLE 0
|
||||
#define PMO_GTK_OFFLOAD_DISABLE 1
|
||||
#define PMO_KEK_LEN 16
|
||||
#define PMO_KCK_LEN 16
|
||||
#define PMO_REPLAY_COUNTER_LEN 8
|
||||
#define PMO_MAC_MAX_KEY_LENGTH 32
|
||||
#define PMO_IGTK_PN_SIZE 6
|
||||
|
||||
/**
|
||||
* struct pmo_gtk_req - pmo gtk request
|
||||
* @flags: optional flags
|
||||
* @kck: Key confirmation key
|
||||
* @kek: key encryption key
|
||||
* @replay_counter: replay_counter
|
||||
* @bssid: bssid
|
||||
*/
|
||||
struct pmo_gtk_req {
|
||||
uint32_t flags;
|
||||
uint8_t kck[PMO_KCK_LEN];
|
||||
uint8_t kek[PMO_KEK_LEN];
|
||||
uint64_t replay_counter;
|
||||
struct qdf_mac_addr bssid;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_gtk_rsp_params - pmo gtk response
|
||||
* @psoc: objmgr psoc
|
||||
* @vdev_id: vdev id on which arp offload needed
|
||||
* @status_flag: status flags
|
||||
* @refresh_cnt: number of successful GTK refresh exchanges since SET operation
|
||||
* @igtk_key_index: igtk key index
|
||||
* @igtk_key_length: igtk key length
|
||||
* @igtk_key_rsc: igtk key index
|
||||
* @igtk_key: igtk key length
|
||||
*/
|
||||
struct pmo_gtk_rsp_params {
|
||||
uint8_t vdev_id;
|
||||
uint32_t status_flag;
|
||||
uint32_t refresh_cnt;
|
||||
uint64_t replay_counter;
|
||||
uint8_t igtk_key_index;
|
||||
uint8_t igtk_key_length;
|
||||
uint8_t igtk_key_rsc[PMO_IGTK_PN_SIZE];
|
||||
uint8_t igtk_key[PMO_MAC_MAX_KEY_LENGTH];
|
||||
struct qdf_mac_addr bssid;
|
||||
};
|
||||
|
||||
/**
|
||||
* typedef for gtk response callback
|
||||
*/
|
||||
typedef void (*pmo_gtk_rsp_callback)(void *callback_context,
|
||||
struct pmo_gtk_rsp_params *gtk_rsp);
|
||||
|
||||
/**
|
||||
* struct pmo_gtk_rsp_req -gtk respsonse request
|
||||
* @callback: client callback for providing gtk resposne when fwr send event
|
||||
* @callback_context: client callback response
|
||||
*/
|
||||
struct pmo_gtk_rsp_req {
|
||||
pmo_gtk_rsp_callback callback;
|
||||
void *callback_context;
|
||||
};
|
||||
|
||||
#endif /* end of _WLAN_PMO_GTK_PUBLIC_STRUCT_H */
|
||||
|
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright (c) 2017 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* DOC: This file shall contain all public parameter (struct/macro/enum)
|
||||
* definitions to support hardware filtering configuration. No APIs, or
|
||||
* implememtations of APIs, shall be contained within.
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_PMO_HW_FILTER_PUBLIC_STRUCT_H
|
||||
#define _WLAN_PMO_HW_FILTER_PUBLIC_STRUCT_H
|
||||
|
||||
/**
|
||||
* pmo_hw_filter_mode - bitmap for enabled hardware filters
|
||||
* @HW_FILTER_DISABLED: hardware filter is completely disabled
|
||||
* @HW_FILTER_NON_ARP_BC: drop all broadcast frames, except ARP
|
||||
* @HW_FILTER_NON_ICMPV6_MC: drop all multicast frames, except ICMPv6
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
enum pmo_hw_filter_mode {
|
||||
PMO_HW_FILTER_DISABLED = 0,
|
||||
PMO_HW_FILTER_NON_ARP_BC = 1,
|
||||
PMO_HW_FILTER_NON_ICMPV6_MC = 2,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_hw_filter_params - hardware filter configuration parameters
|
||||
* @vdev_id: Id of the virtual device to configure
|
||||
* @mode: the hardware filter mode to configure
|
||||
*/
|
||||
struct pmo_hw_filter_params {
|
||||
uint8_t vdev_id;
|
||||
enum pmo_hw_filter_mode mode;
|
||||
};
|
||||
|
||||
#endif /* _WLAN_PMO_HW_FILTER_PUBLIC_STRUCT_H */
|
@@ -0,0 +1,176 @@
|
||||
/*
|
||||
* Copyright (c) 2017 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.
|
||||
*/
|
||||
/**
|
||||
* DOC: Declare various struct, macros which shall be used in
|
||||
* pmo lphb offload feature.
|
||||
*
|
||||
* Note: This file shall not contain public API's prototype/declarations.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_PMO_LPHB_PUBLIC_STRUCT_H_
|
||||
#define _WLAN_PMO_LPHB_PUBLIC_STRUCT_H_
|
||||
|
||||
#include "wlan_pmo_common_public_struct.h"
|
||||
|
||||
#ifdef FEATURE_WLAN_LPHB
|
||||
#define PMO_SIR_LPHB_FILTER_LEN 64
|
||||
|
||||
/**
|
||||
* enum lphb_ind_type -Low power heart beat indication type
|
||||
* @pmo_lphb_set_en_param_indid: lphb enable indication
|
||||
* @pmo_lphb_set_tcp_pararm_indid: lphb tcp param indication
|
||||
* @pmo_lphb_set_tcp_pkt_filter_indid: lphb tcp packet filter indication
|
||||
* @pmo_lphb_set_udp_pararm_indid: lphb udp param indication
|
||||
* @pmo_lphb_set_udp_pkt_filter_indid: lphb udp packet filter indication
|
||||
* @pmo_lphb_set_network_info_indid: lphb network information indication
|
||||
*/
|
||||
enum lphb_ind_type {
|
||||
pmo_lphb_set_en_param_indid,
|
||||
pmo_lphb_set_tcp_pararm_indid,
|
||||
pmo_lphb_set_tcp_pkt_filter_indid,
|
||||
pmo_lphb_set_udp_pararm_indid,
|
||||
pmo_lphb_set_udp_pkt_filter_indid,
|
||||
pmo_lphb_set_network_info_indid,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_lphb_enable_req -Low power heart beat enable request
|
||||
* @enable: lphb enable request
|
||||
* @item: request item
|
||||
* @session: lphb session
|
||||
*/
|
||||
struct pmo_lphb_enable_req {
|
||||
uint8_t enable;
|
||||
uint8_t item;
|
||||
uint8_t session;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_lphb_tcp_params - Low power heart beat tcp params
|
||||
* @srv_ip: source ip address
|
||||
* @dev_ip: destination ip address
|
||||
* @src_port: source port
|
||||
* @dst_port: destination port
|
||||
* @timeout: tcp timeout value
|
||||
* @session: session on which lphb needs to be configured
|
||||
* @gateway_mac: gateway mac address
|
||||
* @time_period_sec: time period in seconds
|
||||
* @tcp_sn: tcp sequence number
|
||||
*/
|
||||
struct pmo_lphb_tcp_params {
|
||||
uint32_t srv_ip;
|
||||
uint32_t dev_ip;
|
||||
uint16_t src_port;
|
||||
uint16_t dst_port;
|
||||
uint16_t timeout;
|
||||
uint8_t session;
|
||||
struct qdf_mac_addr gateway_mac;
|
||||
uint16_t time_period_sec;
|
||||
uint32_t tcp_sn;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_lphb_tcp_filter_req - Low power heart beat tcp filter request
|
||||
* @length: length of filter
|
||||
* @offset: offset of filter
|
||||
* @session: session on which lphb needs to be configured
|
||||
* @filter: filter buffer
|
||||
*/
|
||||
struct pmo_lphb_tcp_filter_req {
|
||||
uint16_t length;
|
||||
uint8_t offset;
|
||||
uint8_t session;
|
||||
uint8_t filter[PMO_SIR_LPHB_FILTER_LEN];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_lphb_udp_params - Low power heart beat udp params
|
||||
* @srv_ip: source ip address
|
||||
* @dev_ip: destination ip address
|
||||
* @src_port: source port
|
||||
* @dst_port: destination port
|
||||
* @timeout: tcp timeout value
|
||||
* @session: session on which lphb needs to be configured
|
||||
* @gateway_mac: gateway mac address
|
||||
* @time_period_sec: time period in seconds
|
||||
*/
|
||||
struct pmo_lphb_udp_params {
|
||||
uint32_t srv_ip;
|
||||
uint32_t dev_ip;
|
||||
uint16_t src_port;
|
||||
uint16_t dst_port;
|
||||
uint16_t interval;
|
||||
uint16_t timeout;
|
||||
uint8_t session;
|
||||
struct qdf_mac_addr gateway_mac;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_lphb_udp_filter_req - Low power heart beat udp filter request
|
||||
* @length: length of filter
|
||||
* @offset: offset of filter
|
||||
* @session: session on which lphb needs to be configured
|
||||
* @filter: filter buffer
|
||||
*/
|
||||
struct pmo_lphb_udp_filter_req {
|
||||
uint16_t length;
|
||||
uint8_t offset;
|
||||
uint8_t session;
|
||||
uint8_t filter[PMO_SIR_LPHB_FILTER_LEN];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_lphb_req - Low power heart beat request
|
||||
* @cmd: lphb command type
|
||||
* @dummy: whether dummy or not
|
||||
* @params: based on command lphb request buffer
|
||||
*/
|
||||
struct pmo_lphb_req {
|
||||
uint16_t cmd;
|
||||
uint16_t dummy;
|
||||
union {
|
||||
struct pmo_lphb_enable_req lphb_enable_req;
|
||||
struct pmo_lphb_tcp_params lphb_tcp_params;
|
||||
struct pmo_lphb_tcp_filter_req lphb_tcp_filter_req;
|
||||
struct pmo_lphb_udp_params lphb_udp_params;
|
||||
struct pmo_lphb_udp_filter_req lphb_udp_filter_req;
|
||||
} params;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_lphb_rsp - Low power heart beat response
|
||||
* @session_idx: session id
|
||||
* @protocol_type: tell protocol type
|
||||
* @event_reason: carry reason of lphb event
|
||||
*/
|
||||
struct pmo_lphb_rsp {
|
||||
uint8_t session_idx;
|
||||
uint8_t protocol_type; /*TCP or UDP */
|
||||
uint8_t event_reason;
|
||||
};
|
||||
#endif /* FEATURE_WLAN_LPHB */
|
||||
|
||||
/*
|
||||
* Define typedef for lphb callback when fwr send response
|
||||
*/
|
||||
typedef
|
||||
void (*pmo_lphb_callback)(void *cb_ctx, struct pmo_lphb_rsp *ind_param);
|
||||
|
||||
#endif /* end of _WLAN_PMO_LPHB_PUBLIC_STRUCT_H_ */
|
||||
|
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright (c) 2017 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.
|
||||
*/
|
||||
/**
|
||||
* DOC: Declare various struct, macros which shall be used in
|
||||
* pmo mc address filterign related features.
|
||||
*
|
||||
* Note: This file shall not contain public API's prototype/declarations.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _WLAN_PMO_MC_ADDR_FILTERING_STRUCT_H_
|
||||
#define _WLAN_PMO_MC_ADDR_FILTERING_STRUCT_H_
|
||||
|
||||
#include "wlan_pmo_common_public_struct.h"
|
||||
|
||||
#define PMO_MAX_MC_ADDR_LIST 32
|
||||
|
||||
/**
|
||||
* struct pmo_mc_addr_list_params -pmo mc address list request params
|
||||
* @psoc: objmgr psoc
|
||||
* @vdev_id: vdev id on which arp offload needed
|
||||
* @count: multicast address count
|
||||
* @mc_addr: multicast address array
|
||||
*/
|
||||
struct pmo_mc_addr_list_params {
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
uint8_t vdev_id;
|
||||
uint8_t count;
|
||||
struct qdf_mac_addr mc_addr[PMO_MAX_MC_ADDR_LIST];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_mc_addr_list -pmo mc address list params for vdev
|
||||
* @is_filter_applied: is mc list filter applied on vdev
|
||||
* @mc_cnt: mc address count
|
||||
* @mc_addr:mc address list
|
||||
*/
|
||||
struct pmo_mc_addr_list {
|
||||
uint8_t is_filter_applied;
|
||||
uint8_t mc_cnt;
|
||||
struct qdf_mac_addr mc_addr[PMO_MAX_MC_ADDR_LIST];
|
||||
};
|
||||
|
||||
#endif /* end of _WLAN_PMO_MC_ADDR_FILTERING_STRUCT_H_ */
|
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright (c) 2017 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.
|
||||
*/
|
||||
/**
|
||||
* DOC: Declare various struct, macros which shall be used in
|
||||
* pmo ns offload feature.
|
||||
*
|
||||
* Note: This file shall not contain public API's prototype/declarations.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _WLAN_PMO_NS_PUBLIC_STRUCT_H_
|
||||
#define _WLAN_PMO_NS_PUBLIC_STRUCT_H_
|
||||
|
||||
#include "wlan_pmo_common_public_struct.h"
|
||||
|
||||
/**
|
||||
* struct pmo_ns_offload_params - pmo ns offload parameters
|
||||
* @enable: true when ns offload enable
|
||||
* @num_ns_offload_count: total ns entries
|
||||
* @src_ipv6_addr: in request source ipv 6 address
|
||||
* @self_ipv6_addr: self ipv6 address
|
||||
* @target_ipv6_addr: target ipv6 address
|
||||
* @self_macaddr: self mac address
|
||||
* @src_ipv6_addr_valid: true if source ipv6 address is valid else false
|
||||
* @target_ipv6_addr_valid: target ipv6 address are valid or not
|
||||
* @target_ipv6_addr_ac_type: target ipv6 address type (unicast or anycast)
|
||||
* @slot_idx: slot index
|
||||
*/
|
||||
struct pmo_ns_offload_params {
|
||||
uint8_t enable;
|
||||
uint32_t num_ns_offload_count;
|
||||
uint8_t src_ipv6_addr[PMO_MAC_IPV6_ADDR_LEN];
|
||||
uint8_t self_ipv6_addr[PMO_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA]
|
||||
[PMO_MAC_IPV6_ADDR_LEN];
|
||||
uint8_t target_ipv6_addr[PMO_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA]
|
||||
[PMO_MAC_IPV6_ADDR_LEN];
|
||||
struct qdf_mac_addr self_macaddr;
|
||||
uint8_t src_ipv6_addr_valid;
|
||||
uint8_t target_ipv6_addr_valid[PMO_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
|
||||
uint8_t target_ipv6_addr_ac_type[PMO_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
|
||||
uint8_t slot_idx;
|
||||
struct qdf_mac_addr bssid;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_ns_req - pmo ns request
|
||||
* @psoc: objmgr psoc
|
||||
* @vdev_id: vdev id on which arp offload needed
|
||||
* @trigger: context from where arp offload triggered
|
||||
* @count: ns entries count
|
||||
* @ipv6_addr: ipv6 address array
|
||||
* @ipv6_addr_type: ipv6 address type (unicast/anycast) array
|
||||
*/
|
||||
struct pmo_ns_req {
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
uint8_t vdev_id;
|
||||
enum pmo_offload_trigger trigger;
|
||||
uint32_t count;
|
||||
uint8_t ipv6_addr[PMO_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA]
|
||||
[PMO_MAC_IPV6_ADDR_LEN];
|
||||
uint8_t ipv6_addr_type[PMO_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
|
||||
};
|
||||
#endif /* end of _WLAN_PMO_NS_PUBLIC_STRUCT_H_ */
|
@@ -0,0 +1,241 @@
|
||||
/*
|
||||
* Copyright (c) 2017 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.
|
||||
*/
|
||||
/**
|
||||
* DOC: declare utility API related to the pmo component
|
||||
* called by other components
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_PMO_OBJ_MGMT_API_H_
|
||||
#define _WLAN_PMO_OBJ_MGMT_API_H_
|
||||
|
||||
#include "wlan_pmo_common_public_struct.h"
|
||||
#include "wlan_pmo_obj_mgmt_public_struct.h"
|
||||
|
||||
/**
|
||||
* pmo_init() - initialize pmo_ctx context.
|
||||
*
|
||||
* This function initializes the power manager offloads (a.k.a pmo) context.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_init(void);
|
||||
|
||||
/**
|
||||
* pmo_deinit() - De initialize pmo_ctx context.
|
||||
*
|
||||
* This function De initializes power manager offloads (a.k.a pmo) contex.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_deinit(void);
|
||||
|
||||
/**
|
||||
* pmo_psoc_object_created_notification(): pmo psoc create handler
|
||||
* @psoc: psoc which is going to created by objmgr
|
||||
* @arg: argument for vdev create handler
|
||||
*
|
||||
* PMO, register this api with objmgr to detect psoc is created in fwr
|
||||
*
|
||||
* Return QDF_STATUS status in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_psoc_object_created_notification(
|
||||
struct wlan_objmgr_psoc *psoc, void *arg);
|
||||
|
||||
/**
|
||||
* pmo_psoc_object_destroyed_notification(): pmo psoc delete handler
|
||||
* @psco: psoc which is going to delete by objmgr
|
||||
* @arg: argument for vdev delete handler
|
||||
*
|
||||
* PMO, register this api with objmgr to detect psoc is deleted in fwr
|
||||
*
|
||||
* Return QDF_STATUS status in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_psoc_object_destroyed_notification(
|
||||
struct wlan_objmgr_psoc *psoc, void *arg);
|
||||
|
||||
/**
|
||||
* pmo_vdev_object_created_notification(): pmo vdev create handler
|
||||
* @vdev: vdev which is going to created by objmgr
|
||||
* @arg: argument for vdev create handler
|
||||
*
|
||||
* PMO, register this api with objmgr to detect vdev is created in fwr
|
||||
*
|
||||
* Return QDF_STATUS status in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_vdev_object_created_notification(
|
||||
struct wlan_objmgr_vdev *vdev, void *arg);
|
||||
|
||||
/**
|
||||
* pmo_vdev_ready() - handles vdev ready in firmware event
|
||||
* @vdev: vdev which is ready in firmware
|
||||
*
|
||||
* Objmgr vdev_create event does not guarantee vdev creation in firmware.
|
||||
* Any logic that would normally go in the vdev_create event, but needs to
|
||||
* communicate with firmware, needs to go here instead.
|
||||
*
|
||||
* Return QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS pmo_vdev_ready(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* pmo_vdev_object_destroyed_notification(): pmo vdev delete handler
|
||||
* @vdev: vdev which is going to delete by objmgr
|
||||
* @arg: argument for vdev delete handler
|
||||
*
|
||||
* PMO, register this api with objmgr to detect vdev is deleted in fwr
|
||||
*
|
||||
* Return QDF_STATUS status in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_vdev_object_destroyed_notification(
|
||||
struct wlan_objmgr_vdev *vdev, void *arg);
|
||||
|
||||
/**
|
||||
* pmo_register_suspend_handler(): register suspend handler for components
|
||||
* @id: component id
|
||||
* @handler: resume handler for the mention component
|
||||
* @arg: argument to pass while calling resume handler
|
||||
*
|
||||
* Return QDF_STATUS status -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_register_suspend_handler(
|
||||
enum wlan_umac_comp_id id,
|
||||
pmo_psoc_suspend_handler handler,
|
||||
void *arg);
|
||||
|
||||
/**
|
||||
* pmo_unregister_suspend_handler():unregister suspend handler for components
|
||||
* @id: component id
|
||||
* @handler: resume handler for the mention component
|
||||
*
|
||||
* Return QDF_STATUS status -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_unregister_suspend_handler(
|
||||
enum wlan_umac_comp_id id,
|
||||
pmo_psoc_suspend_handler handler);
|
||||
|
||||
/**
|
||||
* pmo_register_resume_handler(): API to register resume handler for components
|
||||
* @id: component id
|
||||
* @handler: resume handler for the mention component
|
||||
* @arg: argument to pass while calling resume handler
|
||||
*
|
||||
* Return QDF_STATUS status - in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_register_resume_handler(
|
||||
enum wlan_umac_comp_id id,
|
||||
pmo_psoc_resume_handler handler,
|
||||
void *arg);
|
||||
|
||||
/**
|
||||
* pmo_unregister_resume_handler(): unregister resume handler for components
|
||||
* @id: component id
|
||||
* @handler: resume handler for the mention component
|
||||
*
|
||||
* Return QDF_STATUS status - in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_unregister_resume_handler(
|
||||
enum wlan_umac_comp_id id,
|
||||
pmo_psoc_resume_handler handler);
|
||||
|
||||
/**
|
||||
* pmo_suspend_all_components(): API to suspend all component
|
||||
* @psoc:objmgr psoc
|
||||
* @suspend_type: Tell suspend type (apps suspend / runtime suspend)
|
||||
*
|
||||
* Return QDF_STATUS status - in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_suspend_all_components(struct wlan_objmgr_psoc *psoc,
|
||||
enum qdf_suspend_type suspend_type);
|
||||
|
||||
/**
|
||||
* pmo_resume_all_components(): API to resume all component
|
||||
* @psoc:objmgr psoc
|
||||
* @suspend_type: Tell suspend type from which resume is required
|
||||
*
|
||||
* Return QDF_STATUS status - in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_resume_all_components(struct wlan_objmgr_psoc *psoc,
|
||||
enum qdf_suspend_type suspend_type);
|
||||
|
||||
/**
|
||||
* pmo_register_pause_bitmap_notifier(): API to register pause bitmap notifier
|
||||
* @psoc: objmgr psoc handle
|
||||
* @handler: pause bitmap updated notifier
|
||||
*
|
||||
* Return QDF_STATUS status - in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_register_pause_bitmap_notifier(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
pmo_notify_pause_bitmap handler);
|
||||
|
||||
/**
|
||||
* pmo_unregister_pause_bitmap_notifier(): API to unregister pause bitmap notifier
|
||||
* @psoc: objmgr psoc handle
|
||||
* @handler: pause bitmap updated notifier
|
||||
*
|
||||
* Return QDF_STATUS status - in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_unregister_pause_bitmap_notifier(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
pmo_notify_pause_bitmap handler);
|
||||
|
||||
/**
|
||||
* pmo_register_get_pause_bitmap(): API to get register pause bitmap notifier
|
||||
* @psoc: objmgr psoc handle
|
||||
* @handler: pause bitmap updated notifier
|
||||
*
|
||||
* Return QDF_STATUS status - in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_register_get_pause_bitmap(struct wlan_objmgr_psoc *psoc,
|
||||
pmo_get_pause_bitmap handler);
|
||||
|
||||
/**
|
||||
* pmo_unregister_get_pause_bitmap(): API to unregister get pause bitmap callback
|
||||
* @psoc: objmgr psoc handle
|
||||
* @handler: pause bitmap updated notifier
|
||||
*
|
||||
* Return QDF_STATUS status - in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_unregister_get_pause_bitmap(struct wlan_objmgr_psoc *psoc,
|
||||
pmo_get_pause_bitmap handler);
|
||||
|
||||
|
||||
/**
|
||||
* pmo_register_is_device_in_low_pwr_mode(): API to get register device power
|
||||
* save check notifier.
|
||||
* @psoc: objmgr psoc handle
|
||||
* @handler: device power save check notifier
|
||||
*
|
||||
* Return QDF_STATUS status - in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_register_is_device_in_low_pwr_mode(struct wlan_objmgr_psoc *psoc,
|
||||
pmo_is_device_in_low_pwr_mode handler);
|
||||
|
||||
/**
|
||||
* pmo_unregister_is_device_in_low_pwr_mode(): API to unregister device power
|
||||
* save check notifier.
|
||||
* @psoc: objmgr psoc handle
|
||||
* @handler: device power save check notifier
|
||||
*
|
||||
* Return QDF_STATUS status - in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_unregister_is_device_in_low_pwr_mode(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
pmo_is_device_in_low_pwr_mode handler);
|
||||
|
||||
#endif /* end of _WLAN_PMO_OBJ_MGMT_API_H_ */
|
@@ -0,0 +1,189 @@
|
||||
/*
|
||||
* Copyright (c) 2017 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.
|
||||
*/
|
||||
/**
|
||||
* DOC: Declare various struct, macros which are used for object mgmt in pmo.
|
||||
*
|
||||
* Note: This file shall not contain public API's prototype/declarations.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _WLAN_PMO_OBJ_MGMT_PUBLIC_STRUCT_H_
|
||||
#define _WLAN_PMO_OBJ_MGMT_PUBLIC_STRUCT_H_
|
||||
|
||||
#include "wlan_pmo_common_public_struct.h"
|
||||
#include "wlan_pmo_arp_public_struct.h"
|
||||
#include "wlan_pmo_ns_public_struct.h"
|
||||
#include "wlan_pmo_gtk_public_struct.h"
|
||||
#include "wlan_pmo_wow_public_struct.h"
|
||||
#include "wlan_pmo_mc_addr_filtering_public_struct.h"
|
||||
#include "wlan_pmo_hw_filter_public_struct.h"
|
||||
#include "wlan_pmo_pkt_filter_public_struct.h"
|
||||
#include "wlan_pmo_lphb_public_struct.h"
|
||||
|
||||
/**
|
||||
* typedef for vdev notifying the vdev pause bitmap new value to mlme
|
||||
*/
|
||||
typedef void (*pmo_notify_pause_bitmap)(
|
||||
uint8_t vdev_id, uint16_t value);
|
||||
|
||||
/**
|
||||
* typedef for getting vdev pause bitmap
|
||||
*/
|
||||
typedef uint16_t(*pmo_get_pause_bitmap)(uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* typedef to know is deviec is in power save mode
|
||||
*/
|
||||
typedef bool (*pmo_is_device_in_low_pwr_mode)(uint8_t vdev_id);
|
||||
|
||||
/*
|
||||
* typedef for pld auto suspend callback during runtime suspend
|
||||
*/
|
||||
typedef
|
||||
int (*pmo_pld_auto_suspend_cb)(void);
|
||||
|
||||
/*
|
||||
* typedef for pld auto resume callback during runtime resume
|
||||
*/
|
||||
typedef
|
||||
int (*pmo_pld_auto_resume_cb)(void);
|
||||
|
||||
/**
|
||||
* struct wlan_pmo_tx_ops - structure of tx function
|
||||
* pointers for pmo component
|
||||
* @send_arp_offload_req: fp to send arp offload request
|
||||
* @send_ns_offload_req: fp to send ns offload request
|
||||
* @send_non_arp_bcast_filter_req: for enable/disable broadcast filter
|
||||
* @send_set_pkt_filter: send set packet filter
|
||||
* @send_clear_pkt_filter: send clear packet filter
|
||||
* @send_enable_wakeup_event_req: fp to send enable wow wakeup events req
|
||||
* @send_disable_wakeup_event_req: fp to send disable wow wakeup events req
|
||||
* @send_add_wow_pattern: fp to send wow pattern request
|
||||
* @send_enhance_mc_offload_req: fp to send enhanced multicast offload request
|
||||
* @send_set_mc_filter_req: fp to send set mc filter request
|
||||
* @send_clear_mc_filter_req: fp to send clear mc filter request
|
||||
* @send_ra_filter_req: fp to send ra filter request
|
||||
* @send_gtk_offload_req: fp to send gtk offload request command
|
||||
* @send_get_gtk_rsp_cmd: fp to send get gtk response request cmd to firmware
|
||||
* @send_action_frame_pattern_req: fp to send wow action frame patterns request
|
||||
* @send_lphb_enable: fp to send lphb enable request command
|
||||
* @send_lphb_tcp_params: fp to send lphb tcp params request command
|
||||
* @send_lphb_tcp_filter_req: fp to send lphb tcp packet filter request command
|
||||
* @send_lphb_upd_params: fp to send lphb udp params request command
|
||||
* @send_lphb_udp_filter_req: fp to send lphb udp packet filter request command
|
||||
* @send_vdev_param_update_req: fp to send vdev param request
|
||||
* @send_vdev_set_sta_ps_param: fp to send sta vdev ps power set req
|
||||
* @psoc_update_wow_bus_suspend: fp to update bus suspend req flag at wmi
|
||||
* @psoc_get_host_credits: fp to get the host credits
|
||||
* @psoc_get_pending_cmnds: fp to get the host pending wmi commands
|
||||
* @update_target_suspend_flag: fp to update target suspend flag at wmi
|
||||
* @psoc_send_wow_enable_req: fp to send wow enable request
|
||||
* @psoc_send_supend_req: fp to send target suspend request
|
||||
* @psoc_set_runtime_pm_in_progress: fp to set runtime pm is in progress status
|
||||
* @psoc_get_runtime_pm_in_progress: fp to get runtime pm is in progress status
|
||||
* @psoc_send_host_wakeup_ind: fp tp send host wake indication to fwr
|
||||
* @psoc_send_target_resume_req: fp to send target resume request
|
||||
*/
|
||||
struct wlan_pmo_tx_ops {
|
||||
QDF_STATUS (*send_arp_offload_req)(struct wlan_objmgr_vdev *vdev,
|
||||
struct pmo_arp_offload_params *arp_offload_req,
|
||||
struct pmo_ns_offload_params *ns_offload_req);
|
||||
QDF_STATUS (*send_conf_hw_filter_req)(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_hw_filter_params *req);
|
||||
QDF_STATUS (*send_ns_offload_req)(struct wlan_objmgr_vdev *vdev,
|
||||
struct pmo_arp_offload_params *arp_offload_req,
|
||||
struct pmo_ns_offload_params *ns_offload_req);
|
||||
QDF_STATUS(*send_set_pkt_filter)(struct wlan_objmgr_vdev *vdev,
|
||||
struct pmo_rcv_pkt_fltr_cfg *pmo_set_pkt_fltr_req);
|
||||
QDF_STATUS(*send_clear_pkt_filter)(struct wlan_objmgr_vdev *vdev,
|
||||
struct pmo_rcv_pkt_fltr_clear_param
|
||||
*pmo_clr_pkt_fltr_param);
|
||||
QDF_STATUS (*send_enable_wow_wakeup_event_req)(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
uint32_t *bitmap);
|
||||
QDF_STATUS (*send_disable_wow_wakeup_event_req)(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
uint32_t *bitmap);
|
||||
QDF_STATUS (*send_add_wow_pattern)(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t ptrn_id, const uint8_t *ptrn, uint8_t ptrn_len,
|
||||
uint8_t ptrn_offset, const uint8_t *mask,
|
||||
uint8_t mask_len, bool user);
|
||||
QDF_STATUS (*send_enhance_mc_offload_req)(
|
||||
struct wlan_objmgr_vdev *vdev, bool enable);
|
||||
QDF_STATUS (*send_set_mc_filter_req)(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
struct qdf_mac_addr multicast_addr);
|
||||
QDF_STATUS (*send_clear_mc_filter_req)(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
struct qdf_mac_addr multicast_addr);
|
||||
QDF_STATUS (*send_ra_filter_req)(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t default_pattern, uint16_t rate_limit_interval);
|
||||
QDF_STATUS (*send_gtk_offload_req)(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
struct pmo_gtk_req *gtk_offload_req);
|
||||
QDF_STATUS (*send_get_gtk_rsp_cmd)(struct wlan_objmgr_vdev *vdev);
|
||||
QDF_STATUS (*send_action_frame_pattern_req)(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
struct pmo_action_wakeup_set_params *ip_cmd);
|
||||
QDF_STATUS (*send_lphb_enable)(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_lphb_enable_req *ts_lphb_enable);
|
||||
QDF_STATUS (*send_lphb_tcp_params)(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_lphb_tcp_params *ts_lphb_tcp_param);
|
||||
QDF_STATUS (*send_lphb_tcp_filter_req)(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_lphb_tcp_filter_req *ts_lphb_tcp_filter);
|
||||
QDF_STATUS (*send_lphb_upd_params)(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_lphb_udp_params *ts_lphb_udp_param);
|
||||
QDF_STATUS (*send_lphb_udp_filter_req)(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_lphb_udp_filter_req *ts_lphb_udp_filter);
|
||||
QDF_STATUS (*send_vdev_param_update_req)(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
uint32_t param_id, uint32_t param_value);
|
||||
QDF_STATUS (*send_vdev_sta_ps_param_req)(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
uint32_t ps_mode, uint32_t value);
|
||||
void (*psoc_update_wow_bus_suspend)(
|
||||
struct wlan_objmgr_psoc *psoc, uint8_t value);
|
||||
int (*psoc_get_host_credits)(
|
||||
struct wlan_objmgr_psoc *psoc);
|
||||
int (*psoc_get_pending_cmnds)(
|
||||
struct wlan_objmgr_psoc *psoc);
|
||||
void (*update_target_suspend_flag)(
|
||||
struct wlan_objmgr_psoc *psoc, uint8_t value);
|
||||
QDF_STATUS (*psoc_send_wow_enable_req)(struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_wow_cmd_params *param);
|
||||
QDF_STATUS (*psoc_send_supend_req)(struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_suspend_params *param);
|
||||
void (*psoc_set_runtime_pm_in_progress)(struct wlan_objmgr_psoc *psoc,
|
||||
bool value);
|
||||
bool (*psoc_get_runtime_pm_in_progress)(struct wlan_objmgr_psoc *psoc);
|
||||
QDF_STATUS (*psoc_send_host_wakeup_ind)(struct wlan_objmgr_psoc *psoc);
|
||||
QDF_STATUS (*psoc_send_target_resume_req)(
|
||||
struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
};
|
||||
|
||||
#endif /* end of _WLAN_PMO_OBJ_MGMT_PUBLIC_STRUCT_H_ */
|
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* Copyright (c) 2017 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.
|
||||
*/
|
||||
/**
|
||||
* DOC: Declare various struct, macros which shall be used in
|
||||
* pmo packet filter feature.
|
||||
*
|
||||
* Note: This file shall not contain public API's prototype/declarations.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_PMO_PKT_FILTER_PUBLIC_STRUCT_H_
|
||||
#define _WLAN_PMO_PKT_FILTER_PUBLIC_STRUCT_H_
|
||||
|
||||
#include "qdf_types.h"
|
||||
|
||||
#define PMO_MAX_FILTER_TEST_DATA_LEN 8
|
||||
#define PMO_MAX_NUM_TESTS_PER_FILTER 10
|
||||
|
||||
/**
|
||||
* enum pmo_rcv_pkt_fltr_type: Receive Filter Parameters
|
||||
* @PMO_RCV_FILTER_TYPE_INVALID: invalied filter type
|
||||
* @PMO_RCV_FILTER_TYPE_FILTER_PKT: packet filter
|
||||
* @PMO_RCV_FILTER_TYPE_BUFFER_PKT: buffer packet
|
||||
* @PMO_RCV_FILTER_TYPE_MAX_ENUM_SIZE: max filter
|
||||
*/
|
||||
enum pmo_rcv_pkt_fltr_type {
|
||||
PMO_RCV_FILTER_TYPE_INVALID,
|
||||
PMO_RCV_FILTER_TYPE_FILTER_PKT,
|
||||
PMO_RCV_FILTER_TYPE_BUFFER_PKT,
|
||||
PMO_RCV_FILTER_TYPE_MAX_ENUM_SIZE
|
||||
};
|
||||
|
||||
/**
|
||||
* enum pmo_rcv_pkt_fltr_flag_type: Receive Filter flags
|
||||
* @PMO_FILTER_CMP_TYPE_INVALID: invalied flag
|
||||
* @PMO_FILTER_CMP_TYPE_EQUAL: equal
|
||||
* @PMO_FILTER_CMP_TYPE_MASK_EQUAL: mask
|
||||
* @PMO_FILTER_CMP_TYPE_NOT_EQUAL: not equal
|
||||
* @PMO_FILTER_CMP_TYPE_MASK_NOT_EQUAL: mask not equal
|
||||
* @PMO_FILTER_CMP_TYPE_MAX: max size of flag
|
||||
*/
|
||||
enum pmo_rcv_pkt_fltr_flag_type {
|
||||
PMO_FILTER_CMP_TYPE_INVALID,
|
||||
PMO_FILTER_CMP_TYPE_EQUAL,
|
||||
PMO_FILTER_CMP_TYPE_MASK_EQUAL,
|
||||
PMO_FILTER_CMP_TYPE_NOT_EQUAL,
|
||||
PMO_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
|
||||
PMO_FILTER_CMP_TYPE_MAX
|
||||
};
|
||||
|
||||
/**
|
||||
* enum pmo_rcv_pkt_fltr_protocol_params: Receive Filter protocal parameters
|
||||
* @PMO_FILTER_HDR_TYPE_INVALID: invalied type
|
||||
* @PMO_FILTER_HDR_TYPE_MAC: mac protocol
|
||||
* @PMO_FILTER_HDR_TYPE_ARP: arp protocol
|
||||
* @PMO_FILTER_HDR_TYPE_IPV4: ipv4 protocol
|
||||
* @PMO_FILTER_HDR_TYPE_IPV6: ipv6 protocol
|
||||
* @PMO_FILTER_HDR_TYPE_UDP: udp protocol
|
||||
* @PMO_FILTER_HDR_TYPE_MAX: max of type of protocol
|
||||
*/
|
||||
enum pmo_rcv_pkt_fltr_protocol_params {
|
||||
PMO_FILTER_HDR_TYPE_INVALID,
|
||||
PMO_FILTER_HDR_TYPE_MAC,
|
||||
PMO_FILTER_HDR_TYPE_ARP,
|
||||
PMO_FILTER_HDR_TYPE_IPV4,
|
||||
PMO_FILTER_HDR_TYPE_IPV6,
|
||||
PMO_FILTER_HDR_TYPE_UDP,
|
||||
PMO_FILTER_HDR_TYPE_MAX
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_rcv_pkt_fltr_field_params - pmo packet filter field parameters
|
||||
* @protocol_layer: Protocol layer
|
||||
* @compare_flag: Comparison flag
|
||||
* @data_length: Length of the data to compare
|
||||
* @data_offset: from start of the respective frame header
|
||||
* @reserved: Reserved field
|
||||
* @compare_data: Data to compare
|
||||
* @data_mask: Mask to be applied on the received packet data before compare
|
||||
*/
|
||||
struct pmo_rcv_pkt_fltr_field_params {
|
||||
enum pmo_rcv_pkt_fltr_protocol_params protocol_layer;
|
||||
enum pmo_rcv_pkt_fltr_flag_type compare_flag;
|
||||
uint16_t data_length;
|
||||
uint8_t data_offset;
|
||||
uint8_t reserved;
|
||||
uint8_t compare_data[PMO_MAX_FILTER_TEST_DATA_LEN];
|
||||
uint8_t data_mask[PMO_MAX_FILTER_TEST_DATA_LEN];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_rcv_pkt_fltr_cfg - pmo packet filter config
|
||||
* @filter_id: filter id
|
||||
* @filter_type: filter type
|
||||
* @num_params: number of parameters
|
||||
* @coalesce_time: time
|
||||
* @self_macaddr: mac address
|
||||
* @bssid: Bssid of the connected AP
|
||||
* @params_data: data
|
||||
*/
|
||||
struct pmo_rcv_pkt_fltr_cfg {
|
||||
uint8_t filter_id;
|
||||
enum pmo_rcv_pkt_fltr_type filter_type;
|
||||
uint32_t num_params;
|
||||
uint32_t coalesce_time;
|
||||
struct qdf_mac_addr self_macaddr;
|
||||
struct qdf_mac_addr bssid;
|
||||
struct pmo_rcv_pkt_fltr_field_params
|
||||
params_data[PMO_MAX_NUM_TESTS_PER_FILTER];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_rcv_pkt_fltr_cfg - pmo receive Filter Clear Parameters
|
||||
* @status: only valid for response message
|
||||
* @filter_id:
|
||||
* @self_macaddr:
|
||||
* @bssid: peer ap address
|
||||
*/
|
||||
struct pmo_rcv_pkt_fltr_clear_param {
|
||||
uint32_t status;
|
||||
uint8_t filter_id;
|
||||
struct qdf_mac_addr self_macaddr;
|
||||
struct qdf_mac_addr bssid;
|
||||
};
|
||||
|
||||
#endif /* end of _WLAN_PMO_PKT_FILTER_PUBLIC_STRUCT_H_ */
|
@@ -0,0 +1,406 @@
|
||||
/*
|
||||
* Copyright (c) 2017 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.
|
||||
*/
|
||||
/**
|
||||
* DOC: Declare public API for pmo to interact with target/WMI
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_PMO_TGT_API_H_
|
||||
#define _WLAN_PMO_TGT_API_H_
|
||||
|
||||
#include "wlan_pmo_common_public_struct.h"
|
||||
#include "wlan_pmo_arp_public_struct.h"
|
||||
#include "wlan_pmo_ns_public_struct.h"
|
||||
#include "wlan_pmo_gtk_public_struct.h"
|
||||
#include "wlan_pmo_wow_public_struct.h"
|
||||
#include "wlan_pmo_mc_addr_filtering_public_struct.h"
|
||||
#include "wlan_pmo_hw_filter_public_struct.h"
|
||||
#include "wlan_pmo_pkt_filter_public_struct.h"
|
||||
|
||||
#define GET_PMO_TX_OPS_FROM_PSOC(psoc) \
|
||||
(pmo_psoc_get_priv(psoc)->pmo_tx_ops)
|
||||
|
||||
/**
|
||||
* pmo_tgt_conf_hw_filter() - configure hardware filter mode in firmware
|
||||
* @psoc: the psoc to use to communicate with firmware
|
||||
* @req: the configuration request
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_conf_hw_filter(struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_hw_filter_params *req);
|
||||
|
||||
/**
|
||||
* pmo_tgt_set_pkt_filter() - Set packet filter
|
||||
* @vdev: objmgr vdev
|
||||
* @pmo_set_pkt_fltr_req:
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* API to set packet filter
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_set_pkt_filter(struct wlan_objmgr_vdev *vdev,
|
||||
struct pmo_rcv_pkt_fltr_cfg *pmo_set_pkt_fltr_req,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* pmo_tgt_clear_pkt_filter() - Clear packet filter
|
||||
* @vdev: objmgr vdev
|
||||
* @pmo_clr_pkt_fltr_param:
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* API to clear packet filter
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_clear_pkt_filter(struct wlan_objmgr_vdev *vdev,
|
||||
struct pmo_rcv_pkt_fltr_clear_param *pmo_clr_pkt_fltr_param,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* pmo_tgt_enable_arp_offload_req() - Enable arp offload req to target
|
||||
* @vdev: objmgr vdev
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_enable_arp_offload_req(struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* pmo_tgt_disable_arp_offload_req() - Disable arp offload req to target
|
||||
* @vdev: objmgr vdev
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_disable_arp_offload_req(struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* pmo_tgt_enable_ns_offload_req() - Send ns offload req to targe
|
||||
* @vdev: objmgr vdev
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_enable_ns_offload_req(struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* pmo_tgt_disable_ns_offload_req() - Disable arp offload req to target
|
||||
* @vdev: objmgr vdev
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_disable_ns_offload_req(struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* pmo_tgt_enable_wow_wakeup_event() - Send Enable wow wakeup events req to fwr
|
||||
* @vdev: objmgr vdev handle
|
||||
* @bitmap: Event bitmap
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_enable_wow_wakeup_event(struct wlan_objmgr_vdev *vdev,
|
||||
uint32_t *bitmap);
|
||||
|
||||
/**
|
||||
* pmo_tgt_disable_wow_wakeup_event() - Send Disable wow wakeup events to fwr
|
||||
* @vdev: objmgr vdev handle
|
||||
* @bitmap: Event bitmap
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_disable_wow_wakeup_event(struct wlan_objmgr_vdev *vdev,
|
||||
uint32_t *bitmap);
|
||||
|
||||
/**
|
||||
* pmo_tgt_send_wow_patterns_to_fw() - Sends WOW patterns to FW.
|
||||
* @vdev: objmgr vdev
|
||||
* @ptrn_id: pattern id
|
||||
* @ptrn: pattern
|
||||
* @ptrn_len: pattern length
|
||||
* @ptrn_offset: pattern offset
|
||||
* @mask: mask
|
||||
* @mask_len: mask length
|
||||
* @user: true for user configured pattern and false for default pattern
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_send_wow_patterns_to_fw(struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t ptrn_id, const uint8_t *ptrn, uint8_t ptrn_len,
|
||||
uint8_t ptrn_offset, const uint8_t *mask,
|
||||
uint8_t mask_len, bool user);
|
||||
|
||||
/**
|
||||
* pmo_tgt_set_mc_filter_req() - Set mcast filter command to fw
|
||||
* @vdev: objmgr vdev
|
||||
* @multicastAddr: mcast address
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_set_mc_filter_req(struct wlan_objmgr_vdev *vdev,
|
||||
struct qdf_mac_addr multicast_addr);
|
||||
|
||||
/**
|
||||
* pmo_tgt_clear_mc_filter_req() - Clear mcast filter command to fw
|
||||
* @vdev: objmgr vdev
|
||||
* @multicastAddr: mcast address
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_clear_mc_filter_req(struct wlan_objmgr_vdev *vdev,
|
||||
struct qdf_mac_addr multicast_addr);
|
||||
|
||||
/**
|
||||
* pmo_tgt_send_enhance_multicast_offload_req() - send enhance mc offload req
|
||||
* @wma_handle: wma handle
|
||||
* @vdev_id: vdev id
|
||||
* @action: enable or disable enhance multicast offload
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success else error code
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_send_enhance_multicast_offload_req(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t vdev_id,
|
||||
uint8_t action);
|
||||
|
||||
/**
|
||||
* pmo_tgt_send_ra_filter_req() - send ra filter request to target
|
||||
* @vdev: objmgr vdev handle
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success else error code
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_send_ra_filter_req(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* pmo_tgt_send_action_frame_pattern_req - send wow action frame patterns req
|
||||
* @vdev: objmgr vdev handle
|
||||
* @cmd: action frame pattern cmd
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success else error code
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_send_action_frame_pattern_req(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
struct pmo_action_wakeup_set_params *cmd);
|
||||
|
||||
/**
|
||||
* pmo_tgt_send_gtk_offload_req() - send GTK offload command to fw
|
||||
* @vdev: objmgr vdev
|
||||
* @gtk_req: pmo gtk req
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_send_gtk_offload_req(struct wlan_objmgr_vdev *vdev,
|
||||
struct pmo_gtk_req *gtk_req);
|
||||
|
||||
/**
|
||||
* pmo_tgt_get_gtk_rsp() - send get gtk rsp command to fw
|
||||
* @vdev: objmgr vdev
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_get_gtk_rsp(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* pmo_tgt_gtk_rsp_evt() - receive gtk rsp event from fwr
|
||||
* @psoc: objmgr psoc
|
||||
* @gtk_rsp_param: gtk response parameters
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_gtk_rsp_evt(struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_gtk_rsp_params *rsp_param);
|
||||
|
||||
/**
|
||||
* pmo_tgt_send_lphb_enable() - enable command of LPHB configuration requests
|
||||
* @psoc: objmgr psoc handle
|
||||
* @ts_lphb_enable: lphb enable request which needs to configure in fwr
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_send_lphb_enable(struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_lphb_enable_req *ts_lphb_enable);
|
||||
|
||||
/**
|
||||
* pmo_tgt_send_lphb_tcp_params() - set tcp params of LPHB configuration req
|
||||
* @psoc: objmgr psoc handle
|
||||
* @ts_lphb_tcp_param: lphb tcp params which needs to configure in fwr
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_send_lphb_tcp_params(struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_lphb_tcp_params *ts_lphb_tcp_param);
|
||||
|
||||
/**
|
||||
* pmo_tgt_send_lphb_tcp_pkt_filter() - send tcp packet filter command of LPHB
|
||||
* @psoc: objmgr psoc handle
|
||||
* @ts_lphb_tcp_filter: lphb tcp filter request which needs to configure in fwr
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_send_lphb_tcp_pkt_filter(struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_lphb_tcp_filter_req *ts_lphb_tcp_filter);
|
||||
|
||||
/**
|
||||
* pmo_tgt_send_lphb_udp_params() - Send udp param command of LPHB
|
||||
* @psoc: objmgr psoc handle
|
||||
* @ts_lphb_udp_param: lphb udp params which needs to configure in fwr
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_send_lphb_udp_params(struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_lphb_udp_params *ts_lphb_udp_param);
|
||||
|
||||
/**
|
||||
* pmo_tgt_send_lphb_udp_pkt_filter() - Send udp pkt filter command of LPHB
|
||||
* @psoc: objmgr psoc handle
|
||||
* @ts_lphb_udp_filter: lphb udp filter request which needs to configure in fwr
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_send_lphb_udp_pkt_filter(struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_lphb_udp_filter_req *ts_lphb_udp_filter);
|
||||
|
||||
|
||||
/**
|
||||
* pmo_tgt_lphb_rsp_evt() - receive lphb rsp event from fwr
|
||||
* @psoc: objmgr psoc
|
||||
* @rsp_param: lphb response parameters
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_lphb_rsp_evt(struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_lphb_rsp *rsp_param);
|
||||
|
||||
/**
|
||||
* pmo_tgt_vdev_update_param_req() - Update vdev param value to fwr
|
||||
* @vdev: objmgr vdev
|
||||
* @param_id: tell vdev param id which needs to be updated in fwr
|
||||
* @param_value: vdev parameter value
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_vdev_update_param_req(struct wlan_objmgr_vdev *vdev,
|
||||
enum pmo_vdev_param_id param_id, uint32_t param_value);
|
||||
|
||||
/**
|
||||
* pmo_tgt_send_vdev_sta_ps_param() - Send vdev sta power save param to fwr
|
||||
* @vdev: objmgr vdev
|
||||
* @ps_param: sta mode ps power save params type
|
||||
* @param_value: power save parameter value
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_send_vdev_sta_ps_param(struct wlan_objmgr_vdev *vdev,
|
||||
enum pmo_sta_powersave_param ps_param, uint32_t param_value);
|
||||
|
||||
/**
|
||||
* pmo_tgt_update_wow_bus_suspend_state() - update wow bus suspend state flag
|
||||
* @psoc: objmgr psoc
|
||||
* @val: true for setting wow suspend flag to set else false
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void pmo_tgt_psoc_update_wow_bus_suspend_state(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t val);
|
||||
|
||||
/**
|
||||
* pmo_tgt_get_host_credits() - Get host credits
|
||||
* @psoc: objmgr psoc
|
||||
*
|
||||
* Return: Pending WMI commands on success else EAGAIN on error
|
||||
*/
|
||||
int pmo_tgt_psoc_get_host_credits(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* pmo_tgt_get_pending_cmnds() - Get pending commands
|
||||
* @psoc: objmgr psoc
|
||||
*
|
||||
* Return: Pending WMI commands on success else EAGAIN on error
|
||||
*/
|
||||
int pmo_tgt_psoc_get_pending_cmnds(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* pmo_tgt_update_target_suspend_flag() - Set WMI target Suspend flag
|
||||
* @psoc: objmgr psoc
|
||||
* @val: true on suspend false for resume
|
||||
*
|
||||
* Return: Pending WMI commands on success else EAGAIN on error
|
||||
*/
|
||||
void pmo_tgt_update_target_suspend_flag(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t val);
|
||||
|
||||
/**
|
||||
* pmo_tgt_psoc_send_wow_enable_req() -Send wow enable request
|
||||
* @psoc: objmgr psoc
|
||||
* @param: WOW enable request buffer
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success else error code
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_psoc_send_wow_enable_req(struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_wow_cmd_params *param);
|
||||
|
||||
/**
|
||||
* pmo_tgt_psoc_send_supend_req() -Send target suspend request to fwr
|
||||
* @psoc: objmgr psoc
|
||||
* @param: suspend request buffer
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success else error code
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_psoc_send_supend_req(struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_suspend_params *param);
|
||||
|
||||
/**
|
||||
* pmo_tgt_psoc_set_runtime_pm_inprogress() -set runtime status
|
||||
* @psoc: objmgr psoc
|
||||
* @value: set runtime pm in progress true or false
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_psoc_set_runtime_pm_inprogress(struct wlan_objmgr_psoc *psoc,
|
||||
bool value);
|
||||
|
||||
/**
|
||||
* pmo_tgt_psoc_get_runtime_pm_in_progress() -get runtime status
|
||||
* @psoc: objmgr psoc
|
||||
*
|
||||
* Return: true if runtime pm is in progress else false
|
||||
*/
|
||||
bool pmo_tgt_psoc_get_runtime_pm_in_progress(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* pmo_tgt_psoc_send_host_wakeup_ind() -Send host wake up indication to fwr
|
||||
* @psoc: objmgr psoc
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success else error code
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_psoc_send_host_wakeup_ind(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* pmo_tgt_psoc_send_target_resume_req() -Send target resume request
|
||||
* @psoc: objmgr psoc
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success else error code
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_psoc_send_target_resume_req(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
#endif /* end of _WLAN_PMO_TGT_API_H_ */
|
@@ -0,0 +1,565 @@
|
||||
/*
|
||||
* Copyright (c) 2017 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.
|
||||
*/
|
||||
/**
|
||||
* DOC: Declare public API related to the pmo called by north bound HDD/OSIF
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_PMO_UCFG_API_H_
|
||||
#define _WLAN_PMO_UCFG_API_H_
|
||||
|
||||
#include "wlan_pmo_arp_public_struct.h"
|
||||
#include "wlan_pmo_ns_public_struct.h"
|
||||
#include "wlan_pmo_gtk_public_struct.h"
|
||||
#include "wlan_pmo_mc_addr_filtering_public_struct.h"
|
||||
#include "wlan_pmo_wow_public_struct.h"
|
||||
#include "wlan_pmo_common_public_struct.h"
|
||||
#include "wlan_pmo_obj_mgmt_api.h"
|
||||
#include "wlan_pmo_pkt_filter_public_struct.h"
|
||||
#include "wlan_pmo_hw_filter_public_struct.h"
|
||||
|
||||
/**
|
||||
* pmo_ucfg_is_ap_mode_supports_arp_ns() - Check ap mode support arp&ns offload
|
||||
* @psoc: objmgr psoc
|
||||
* @vdev_opmode: vdev opmode
|
||||
*
|
||||
* Return: true in case support else false
|
||||
*/
|
||||
bool pmo_ucfg_is_ap_mode_supports_arp_ns(struct wlan_objmgr_psoc *psoc,
|
||||
enum tQDF_ADAPTER_MODE vdev_opmode);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_is_vdev_connected() - to check whether peer is associated or not
|
||||
* @vdev: objmgr vdev
|
||||
*
|
||||
* Return: true in case success else false
|
||||
*/
|
||||
bool pmo_ucfg_is_vdev_connected(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_is_vdev_supports_offload() - check offload is supported on vdev
|
||||
* @vdev: objmgr vdev
|
||||
*
|
||||
* Return: true in case success else false
|
||||
*/
|
||||
bool pmo_ucfg_is_vdev_supports_offload(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_get_psoc_config(): API to get the psoc user configurations of pmo
|
||||
* @psoc: objmgr psoc handle
|
||||
* @psoc_cfg: fill the current psoc user configurations.
|
||||
*
|
||||
* Return pmo psoc configurations
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_get_psoc_config(struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_psoc_cfg *psoc_cfg);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_update_psoc_config(): API to update the psoc user configurations
|
||||
* @psoc: objmgr psoc handle
|
||||
* @psoc_cfg: pmo psoc configurations
|
||||
*
|
||||
* This api shall be used for soc config initialization as well update.
|
||||
* In case of update caller must first call pmo_get_psoc_cfg to get
|
||||
* current config and then apply changes on top of current config.
|
||||
*
|
||||
* Return QDF_STATUS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_update_psoc_config(struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_psoc_cfg *psoc_cfg);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_enable_wakeup_event() - enable wow wakeup events
|
||||
* @psoc: objmgr psoc
|
||||
* @vdev_id: vdev id
|
||||
* @bitmap: Event bitmap
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void pmo_ucfg_enable_wakeup_event(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t vdev_id, uint32_t *bitmap);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_disable_wakeup_event() - disable wow wakeup events
|
||||
* @psoc: objmgr psoc
|
||||
* @vdev_id: vdev id
|
||||
* @bitmap: Event bitmap
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void pmo_ucfg_disable_wakeup_event(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t vdev_id, uint32_t bitmap);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_cache_arp_offload_req(): API to cache arp req in pmo vdev priv ctx
|
||||
* @arp_req: pmo arp req param
|
||||
*
|
||||
* Return QDF_STATUS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_cache_arp_offload_req(struct pmo_arp_req *arp_req);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_flush_arp_offload_req(): API to flush arp req from pmo vdev priv ctx
|
||||
* @vdev: objmgr vdev param
|
||||
*
|
||||
* Return QDF_STATUS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_flush_arp_offload_req(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_enable_arp_offload_in_fwr(): API to enable arp req in fwr
|
||||
* @vdev: objmgr vdev param
|
||||
* @trigger: triger reason for enable arp offload
|
||||
*
|
||||
* API to enable cache arp req in fwr from pmo vdev priv ctx
|
||||
*
|
||||
* Return QDF_STATUS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_enable_arp_offload_in_fwr(struct wlan_objmgr_vdev *vdev,
|
||||
enum pmo_offload_trigger trigger);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_disable_arp_offload_in_fwr(): API to disable arp req in fwr
|
||||
* @vdev: objmgr vdev param
|
||||
* @trigger: triger reason for disable arp offload
|
||||
* API to disable cache arp req in fwr
|
||||
*
|
||||
* Return QDF_STATUS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_disable_arp_offload_in_fwr(struct wlan_objmgr_vdev *vdev,
|
||||
enum pmo_offload_trigger trigger);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_cache_ns_offload_req(): API to cache ns req in pmo vdev priv ctx
|
||||
* @ns_req: pmo ns req param
|
||||
*
|
||||
* Return QDF_STATUS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_cache_ns_offload_req(struct pmo_ns_req *ns_req);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_flush_ns_offload_req(): API to flush ns req from pmo vdev priv ctx
|
||||
* @vdev: vdev ojbmgr handle
|
||||
*
|
||||
* Return QDF_STATUS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_flush_ns_offload_req(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_enable_ns_offload_in_fwr(): API to enable ns req in fwr
|
||||
* @arp_req: pmo arp req param
|
||||
* @trigger: trigger reason to enable ns offload
|
||||
*
|
||||
* API to enable cache ns req in fwr from pmo vdev priv ctx
|
||||
*
|
||||
* Return QDF_STATUS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_enable_ns_offload_in_fwr(struct wlan_objmgr_vdev *vdev,
|
||||
enum pmo_offload_trigger trigger);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_disable_ns_offload_in_fwr(): API to disable ns req in fwr
|
||||
* @arp_req: pmo arp req param
|
||||
* @trigger: trigger reason to disable ns offload
|
||||
*
|
||||
* API to disable ns req in fwr
|
||||
*
|
||||
* Return QDF_STATUS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_disable_ns_offload_in_fwr(struct wlan_objmgr_vdev *vdev,
|
||||
enum pmo_offload_trigger trigger);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_enable_hw_filter_in_fwr() - enable previously configured hw filter
|
||||
* @vdev: objmgr vdev to configure
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_enable_hw_filter_in_fwr(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_disable_hw_filter_in_fwr() - disable previously configured hw filter
|
||||
* @vdev: objmgr vdev to configure
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_disable_hw_filter_in_fwr(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_max_mc_addr_supported() - to get max support mc address
|
||||
* @psoc: objmgr psoc
|
||||
*
|
||||
* Return: max mc addr supported count for all vdev in corresponding psoc
|
||||
*/
|
||||
uint8_t pmo_ucfg_max_mc_addr_supported(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_cache_mc_addr_list(): API to cache mc addr list in pmo vdev priv obj
|
||||
* @psoc: objmgr psoc handle
|
||||
* @vdev_id: vdev id
|
||||
* @gtk_req: pmo gtk req param
|
||||
*
|
||||
* Return QDF_STATUS_SUCCESS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_cache_mc_addr_list(
|
||||
struct pmo_mc_addr_list_params *mc_list_config);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_flush_mc_addr_list(): API to flush mc addr list in pmo vdev priv obj
|
||||
* @psoc: objmgr psoc handle
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return QDF_STATUS_SUCCESS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_flush_mc_addr_list(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_enable_mc_addr_filtering_in_fwr(): Enable cached mc add list in fwr
|
||||
* @psoc: objmgr psoc handle
|
||||
* @vdev_id: vdev id
|
||||
* @gtk_req: pmo gtk req param
|
||||
* @action: true for enable els false
|
||||
*
|
||||
* API to enable cached mc add list in fwr
|
||||
*
|
||||
* Return QDF_STATUS_SUCCESS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_enable_mc_addr_filtering_in_fwr(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id,
|
||||
enum pmo_offload_trigger trigger);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_disable_mc_addr_filtering_in_fwr(): Disable cached mc addr list
|
||||
* @psoc: objmgr psoc handle
|
||||
* @vdev_id: vdev id
|
||||
* @gtk_req: pmo gtk req param
|
||||
* @action: true for enable els false
|
||||
*
|
||||
* API to disable cached mc add list in fwr
|
||||
*
|
||||
* Return QDF_STATUS_SUCCESS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_disable_mc_addr_filtering_in_fwr(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id,
|
||||
enum pmo_offload_trigger trigger);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_cache_gtk_offload_req(): API to cache gtk req in pmo vdev priv obj
|
||||
* @vdev: objmgr vdev handle
|
||||
* @gtk_req: pmo gtk req param
|
||||
*
|
||||
* Return QDF_STATUS_SUCCESS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_cache_gtk_offload_req(struct wlan_objmgr_vdev *vdev,
|
||||
struct pmo_gtk_req *gtk_req);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_flush_gtk_offload_req(): Flush saved gtk req from pmo vdev priv obj
|
||||
* @vdev: objmgr vdev handle
|
||||
*
|
||||
* Return QDF_STATUS_SUCCESS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_flush_gtk_offload_req(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_enable_gtk_offload_in_fwr(): enable cached gtk request in fwr
|
||||
* @vdev: objmgr vdev handle
|
||||
*
|
||||
* Return QDF_STATUS_SUCCESS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_enable_gtk_offload_in_fwr(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_disable_gtk_offload_in_fwr(): disable cached gtk request in fwr
|
||||
* @vdev: objmgr vdev handle
|
||||
*
|
||||
* Return QDF_STATUS_SUCCESS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_disable_gtk_offload_in_fwr(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_set_pkt_filter() - Set packet filter
|
||||
* @psoc: objmgr psoc handle
|
||||
* @pmo_set_pkt_fltr_req:
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return QDF_STATUS_SUCCESS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_set_pkt_filter(struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_rcv_pkt_fltr_cfg *pmo_set_pkt_fltr_req,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_clear_pkt_filter() - Clear packet filter
|
||||
* @psoc: objmgr psoc handle
|
||||
* @pmo_clr_pkt_fltr_req:
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return QDF_STATUS_SUCCESS -in case of success else return error
|
||||
*/
|
||||
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);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_get_gtk_rsp(): API to send gtk response request to fwr
|
||||
* @vdev: objmgr vdev handle
|
||||
* @gtk_rsp: pmo gtk response request
|
||||
*
|
||||
* This api will send gtk response request to fwr
|
||||
*
|
||||
* Return QDF_STATUS_SUCCESS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_get_gtk_rsp(struct wlan_objmgr_vdev *vdev,
|
||||
struct pmo_gtk_rsp_req *gtk_rsp_req);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_update_extscan_in_progress(): update extscan is in progress flags
|
||||
* @vdev: objmgr vdev handle
|
||||
* @value:true if extscan is in progress else false
|
||||
*
|
||||
* Return: TRUE/FALSE
|
||||
*/
|
||||
void pmo_ucfg_update_extscan_in_progress(struct wlan_objmgr_vdev *vdev,
|
||||
bool value);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_update_p2plo_in_progress(): update p2plo is in progress flags
|
||||
* @vdev: objmgr vdev handle
|
||||
* @value:true if p2plo is in progress else false
|
||||
*
|
||||
* Return: TRUE/FALSE
|
||||
*/
|
||||
void pmo_ucfg_update_p2plo_in_progress(struct wlan_objmgr_vdev *vdev,
|
||||
bool value);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_lphb_config_req() - Handles lphb config request for psoc
|
||||
* @psoc: objmgr psoc handle
|
||||
* @lphb_req: low power heart beat request
|
||||
* @lphb_cb_ctx: Context which needs to pass to soif when lphb callback called
|
||||
* @callback: upon receiving of lphb indication from fwr call lphb callback
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_lphb_config_req(struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_lphb_req *lphb_req, void *lphb_cb_ctx,
|
||||
pmo_lphb_callback callback);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_update_alt_modulated_dtim_enable() - update alt modulatate dtim
|
||||
* @vdev: objmgr vdev handle
|
||||
* @value: true for alt_modulated_dtim enable else false
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
void pmo_ucfg_update_alt_modulated_dtim_enable(struct wlan_objmgr_vdev *vdev,
|
||||
bool value);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_psoc_update_power_save_mode() - update power save mode
|
||||
* @vdev: objmgr vdev handle
|
||||
* @value:vdev power save mode
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void pmo_ucfg_psoc_update_power_save_mode(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t value);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_psoc_update_dp_handle() - update psoc data path handle
|
||||
* @psoc: objmgr psoc handle
|
||||
* @dp_hdl: psoc data path handle
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void pmo_ucfg_psoc_update_dp_handle(struct wlan_objmgr_psoc *psoc,
|
||||
void *dp_hdl);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_vdev_update_dp_handle() - update vdev data path handle
|
||||
* @vdev: objmgr vdev handle
|
||||
* @dp_hdl: vdev data path handle
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void pmo_ucfg_vdev_update_dp_handle(struct wlan_objmgr_vdev *vdev,
|
||||
void *dp_hdl);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_psoc_update_htc_handle() - update psoc htc layer handle
|
||||
* @psoc: objmgr psoc handle
|
||||
* @htc_handle: psoc host-to-tagret layer (htc) handle
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void pmo_ucfg_psoc_update_htc_handle(struct wlan_objmgr_psoc *psoc,
|
||||
void *htc_handle);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_psoc_set_hif_handle() - Set psoc hif layer handle
|
||||
* @psoc: objmgr psoc handle
|
||||
* @hif_handle: hif context handle
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void pmo_ucfg_psoc_set_hif_handle(struct wlan_objmgr_psoc *psoc,
|
||||
void *hif_handle);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_psoc_set_txrx_handle() - Set psoc pdev txrx layer handle
|
||||
* @psoc: objmgr psoc handle
|
||||
* @txrx_handle: pdev txrx context handle
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void pmo_ucfg_psoc_set_txrx_handle(struct wlan_objmgr_psoc *psoc,
|
||||
void *txrx_handle);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_psoc_user_space_suspend_req() - Handles user space suspend req
|
||||
* @psoc: objmgr psoc handle
|
||||
* @type: type of suspend
|
||||
*
|
||||
* Handles user space suspend indication for psoc
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_psoc_user_space_suspend_req(struct wlan_objmgr_psoc *psoc,
|
||||
enum qdf_suspend_type type);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_psoc_user_space_resume_req() - Handles user space resume req
|
||||
* @psoc: objmgr psoc handle
|
||||
* @type: type of suspend from which resume needed
|
||||
*
|
||||
* Handles user space resume indication for psoc
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_psoc_user_space_resume_req(struct wlan_objmgr_psoc *psoc,
|
||||
enum qdf_suspend_type type);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_psoc_bus_suspend_req(): handles bus suspend for psoc
|
||||
* @psoc: objmgr psoc
|
||||
* @type: is this suspend part of runtime suspend or system suspend?
|
||||
* @wow_params: collection of wow enable override parameters
|
||||
*
|
||||
* Bails if a scan is in progress.
|
||||
* Calls the appropriate handlers based on configuration and event.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_psoc_bus_suspend_req(struct wlan_objmgr_psoc *psoc,
|
||||
enum qdf_suspend_type type,
|
||||
struct pmo_wow_enable_params *wow_params);
|
||||
|
||||
#ifdef FEATURE_RUNTIME_PM
|
||||
/**
|
||||
* pmo_ucfg_psoc_bus_runtime_suspend(): handles bus runtime suspend for psoc
|
||||
* @psoc: objmgr psoc
|
||||
* @pld_cb: callback to call link auto suspend
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_psoc_bus_runtime_suspend(struct wlan_objmgr_psoc *psoc,
|
||||
pmo_pld_auto_suspend_cb pld_cb);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_psoc_bus_runtime_resume(): handles bus runtime resume for psoc
|
||||
* @psoc: objmgr psoc
|
||||
* @pld_cb: callback to call link auto resume
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_psoc_bus_runtime_resume(struct wlan_objmgr_psoc *psoc,
|
||||
pmo_pld_auto_resume_cb pld_cb);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* pmo_ucfg_psoc_suspend_target() -Send suspend target command
|
||||
* @psoc: objmgr psoc handle
|
||||
* @disable_target_intr: disable target interrupt
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_psoc_suspend_target(struct wlan_objmgr_psoc *psoc,
|
||||
int disable_target_intr);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_psoc_bus_resume() -handle bus resume request for psoc
|
||||
* @psoc: objmgr psoc handle
|
||||
* @type: is this suspend part of runtime suspend or system suspend?
|
||||
*
|
||||
* Return:QDF_STATUS_SUCCESS on success else error code
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_psoc_bus_resume_req(struct wlan_objmgr_psoc *psoc,
|
||||
enum qdf_suspend_type type);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_get_wow_bus_suspend(): API to check if wow bus is suspended or not
|
||||
* @psoc: objmgr psoc handle
|
||||
*
|
||||
* Return: True if bus suspende else false
|
||||
*/
|
||||
bool pmo_ucfg_get_wow_bus_suspend(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_psoc_handle_initial_wake_up() - update initial wake up
|
||||
* @cb_ctx: objmgr psoc handle as void * due to htc layer is not aware psoc
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void pmo_ucfg_psoc_handle_initial_wake_up(void *cb_ctx);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_psoc_is_target_wake_up_received() - Get initial wake up status
|
||||
* @psoc: objmgr psoc handle
|
||||
*
|
||||
* Return: 0 on success else error code
|
||||
*/
|
||||
int pmo_ucfg_psoc_is_target_wake_up_received(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_psoc_is_target_wake_up_received() - Clear initial wake up status
|
||||
* @psoc: objmgr psoc handle
|
||||
*
|
||||
* Return: 0 on success else error code
|
||||
*/
|
||||
int pmo_ucfg_psoc_clear_target_wake_up(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_psoc_target_suspend_acknowledge() - Clear initial wake up status
|
||||
* @psoc: objmgr psoc handle
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void pmo_ucfg_psoc_target_suspend_acknowledge(void *context, bool wow_nack);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_psoc_wakeup_host_event_received() - got host wake up evennt from fwr
|
||||
* @psoc: objmgr psoc handle
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void pmo_ucfg_psoc_wakeup_host_event_received(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
#endif /* end of _WLAN_PMO_UCFG_API_H_ */
|
@@ -0,0 +1,241 @@
|
||||
/*
|
||||
* Copyright (c) 2017 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.
|
||||
*/
|
||||
/**
|
||||
* DOC: Declare various struct, macros which shall be used in
|
||||
* pmo wow related features.
|
||||
*
|
||||
* Note: This file shall not contain public API's prototype/declarations.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_PMO_WOW_PUBLIC_STRUCT_H_
|
||||
#include "wlan_pmo_lphb_public_struct.h"
|
||||
|
||||
#define _WLAN_PMO_WOW_PUBLIC_STRUCT_H_
|
||||
|
||||
#define PMO_WOWL_PTRN_MAX_SIZE 146
|
||||
#define PMO_WOWL_PTRN_MASK_MAX_SIZE 19
|
||||
#define PMO_WOWL_MAX_PTRNS_ALLOWED CFG_MAX_WOW_FILTERS_MAX
|
||||
#define PMO_WOWL_BCAST_PATTERN_MAX_SIZE 146
|
||||
|
||||
#define PMO_WOW_INTER_PTRN_TOKENIZER ';'
|
||||
#define PMO_WOW_INTRA_PTRN_TOKENIZER ':'
|
||||
|
||||
|
||||
/* Action frame categories */
|
||||
|
||||
#define PMO_MAC_ACTION_SPECTRUM_MGMT 0
|
||||
#define PMO_MAC_ACTION_QOS_MGMT 1
|
||||
#define PMO_MAC_ACTION_DLP 2
|
||||
#define PMO_MAC_ACTION_BLKACK 3
|
||||
#define PMO_MAC_ACTION_PUBLIC_USAGE 4
|
||||
#define PMO_MAC_ACTION_RRM 5
|
||||
#define PMO_MAC_ACTION_FAST_BSS_TRNST 6
|
||||
#define PMO_MAC_ACTION_HT 7
|
||||
#define PMO_MAC_ACTION_SA_QUERY 8
|
||||
#define PMO_MAC_ACTION_PROT_DUAL_PUB 9
|
||||
#define PMO_MAC_ACTION_WNM 10
|
||||
#define PMO_MAC_ACTION_UNPROT_WNM 11
|
||||
#define PMO_MAC_ACTION_TDLS 12
|
||||
#define PMO_MAC_ACITON_MESH 13
|
||||
#define PMO_MAC_ACTION_MHF 14
|
||||
#define PMO_MAC_SELF_PROTECTED 15
|
||||
#define PMO_MAC_ACTION_WME 17
|
||||
#define PMO_MAC_ACTION_FST 18
|
||||
#define PMO_MAC_ACTION_VHT 21
|
||||
#define PMO_MAC_ACTION_MAX 256
|
||||
|
||||
/*
|
||||
* ALLOWED_ACTION_FRAMES_BITMAP
|
||||
*
|
||||
* Bitmask is based on the below. The frames with 0's
|
||||
* set to their corresponding bit can be dropped in FW.
|
||||
*
|
||||
* -----------------------------+-----+-------+
|
||||
* Type | Bit | Allow |
|
||||
* -----------------------------+-----+-------+
|
||||
* PMO_ACTION_SPECTRUM_MGMT 0 1
|
||||
* PMO_ACTION_QOS_MGMT 1 1
|
||||
* PMO_ACTION_DLP 2 0
|
||||
* PMO_ACTION_BLKACK 3 0
|
||||
* PMO_ACTION_PUBLIC_USAGE 4 1
|
||||
* PMO_ACTION_RRM 5 1
|
||||
* PMO_ACTION_FAST_BSS_TRNST 6 0
|
||||
* PMO_ACTION_HT 7 0
|
||||
* PMO_ACTION_SA_QUERY 8 1
|
||||
* PMO_ACTION_PROT_DUAL_PUB 9 1
|
||||
* PMO_ACTION_WNM 10 1
|
||||
* PMO_ACTION_UNPROT_WNM 11 0
|
||||
* PMO_ACTION_TDLS 12 0
|
||||
* PMO_ACITON_MESH 13 0
|
||||
* PMO_ACTION_MHF 14 0
|
||||
* PMO_SELF_PROTECTED 15 0
|
||||
* PMO_ACTION_WME 17 1
|
||||
* PMO_ACTION_FST 18 1
|
||||
* PMO_ACTION_VHT 21 1
|
||||
* ----------------------------+------+-------+
|
||||
*/
|
||||
#define ALLOWED_ACTION_FRAMES_BITMAP0 \
|
||||
((1 << PMO_MAC_ACTION_SPECTRUM_MGMT) | \
|
||||
(1 << PMO_MAC_ACTION_QOS_MGMT) | \
|
||||
(1 << PMO_MAC_ACTION_PUBLIC_USAGE) | \
|
||||
(1 << PMO_MAC_ACTION_RRM) | \
|
||||
(1 << PMO_MAC_ACTION_SA_QUERY) | \
|
||||
(1 << PMO_MAC_ACTION_PROT_DUAL_PUB) | \
|
||||
(1 << PMO_MAC_ACTION_WNM) | \
|
||||
(1 << PMO_MAC_ACTION_WME) | \
|
||||
(1 << PMO_MAC_ACTION_FST) | \
|
||||
(1 << PMO_MAC_ACTION_VHT))
|
||||
|
||||
#define ALLOWED_ACTION_FRAMES_BITMAP1 0x0
|
||||
#define ALLOWED_ACTION_FRAMES_BITMAP2 0x0
|
||||
#define ALLOWED_ACTION_FRAMES_BITMAP3 0x0
|
||||
#define ALLOWED_ACTION_FRAMES_BITMAP4 0x0
|
||||
#define ALLOWED_ACTION_FRAMES_BITMAP5 0x0
|
||||
#define ALLOWED_ACTION_FRAMES_BITMAP6 0x0
|
||||
#define ALLOWED_ACTION_FRAMES_BITMAP7 0x0
|
||||
|
||||
#define ALLOWED_ACTION_FRAME_MAP_WORDS (PMO_MAC_ACTION_MAX / 32)
|
||||
|
||||
|
||||
#define PMO_SUPPORTED_ACTION_CATE 256
|
||||
#define PMO_SUPPORTED_ACTION_CATE_ELE_LIST (PMO_SUPPORTED_ACTION_CATE/32)
|
||||
|
||||
/**
|
||||
* struct pmo_action_wakeup_set_params - action wakeup set params
|
||||
* @vdev_id: virtual device id
|
||||
* @operation: 0 reset to fw default, 1 set the bits,
|
||||
* 2 add the setting bits, 3 delete the setting bits
|
||||
* @action_category_map: bit mapping.
|
||||
*/
|
||||
struct pmo_action_wakeup_set_params {
|
||||
uint32_t vdev_id;
|
||||
uint32_t operation;
|
||||
uint32_t action_category_map[PMO_SUPPORTED_ACTION_CATE_ELE_LIST];
|
||||
};
|
||||
|
||||
/**
|
||||
* enum pmo_wow_action_wakeup_opertion: describe action wakeup operation
|
||||
* @pmo_action_wakeup_reset: reset
|
||||
* @pmo_action_wakeup_set: set
|
||||
* @pmo_action_wakeup_add_set: add and set
|
||||
* @pmo_action_wakeup_del_set: delete and set
|
||||
*/
|
||||
enum pmo_wow_action_wakeup_opertion {
|
||||
pmo_action_wakeup_reset = 0,
|
||||
pmo_action_wakeup_set,
|
||||
pmo_action_wakeup_add_set,
|
||||
pmo_action_wakeup_del_set,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_wow - store wow patterns
|
||||
* @wow_enable: wow enable/disable
|
||||
* @wow_enable_cmd_sent: is wow enable command sent to fw
|
||||
* @is_wow_bus_suspended: true if bus is suspended
|
||||
* @target_suspend: target suspend event
|
||||
* @target_resume: target resume event
|
||||
* @wow_nack: wow negative ack flag
|
||||
* @wow_initial_wake_up: target initial wake up is received
|
||||
* @wow_wake_lock: wow wake lock
|
||||
* @lphb_cache: lphb cache
|
||||
* @lphb_cb_ctx: callback context for lphb, kept as void* as
|
||||
* osif structures are opaque to pmo.
|
||||
* @pmo_lphb_callback: registered os if calllback function
|
||||
*
|
||||
* This structure stores wow patterns and
|
||||
* wow related parameters in host.
|
||||
*/
|
||||
struct pmo_wow {
|
||||
bool wow_enable;
|
||||
bool wow_enable_cmd_sent;
|
||||
bool is_wow_bus_suspended;
|
||||
qdf_event_t target_suspend;
|
||||
qdf_event_t target_resume;
|
||||
int wow_nack;
|
||||
bool wow_initial_wake_up;
|
||||
qdf_wake_lock_t wow_wake_lock;
|
||||
/*
|
||||
* currently supports only vdev 0.
|
||||
* cache has two entries: one for TCP and one for UDP.
|
||||
*/
|
||||
struct pmo_lphb_req lphb_cache[2];
|
||||
void *lphb_cb_ctx;
|
||||
pmo_lphb_callback lphb_cb;
|
||||
};
|
||||
|
||||
/* WOW related structures */
|
||||
/**
|
||||
* struct pmo_wow_add_pattern - wow pattern add structure
|
||||
* @pattern_id: pattern id
|
||||
* @pattern_byte_offset: pattern byte offset from beginning of the 802.11
|
||||
* packet to start of the wake-up pattern
|
||||
* @pattern_size: pattern size
|
||||
* @pattern: pattern byte stream
|
||||
* @pattern_mask_size: pattern mask size
|
||||
* @pattern_mask: pattern mask
|
||||
* @session_id: session id
|
||||
*/
|
||||
struct pmo_wow_add_pattern {
|
||||
uint8_t pattern_id;
|
||||
uint8_t pattern_byte_offset;
|
||||
uint8_t pattern_size;
|
||||
uint8_t pattern[PMO_WOWL_BCAST_PATTERN_MAX_SIZE];
|
||||
uint8_t pattern_mask_size;
|
||||
uint8_t pattern_mask[PMO_WOWL_BCAST_PATTERN_MAX_SIZE];
|
||||
uint8_t session_id;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_wow_add_pattern - wow pattern add structure
|
||||
* @magic_pkt_enable: enables or disables magic packet filtering
|
||||
* @wow_deauth_rcv: This configuration is valid only when magicPktEnable=1,
|
||||
* It requests hardware to wake up when it receives the
|
||||
* Deauthentication Frame.
|
||||
* @pattern_filtering_enable: Enables/disables packet pattern filtering
|
||||
* @wow_bss_conn_loss: wake up host when bss connection lost
|
||||
*/
|
||||
struct pmo_wow_enter_params {
|
||||
uint8_t magic_pkt_enable;
|
||||
uint8_t wow_deauth_rcv;
|
||||
uint8_t pattern_filtering_enable;
|
||||
uint8_t wow_bss_conn_loss;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_wow_cmd_params - wow cmd parameter
|
||||
* @enable: wow enable or disable flag
|
||||
* @can_suspend_link: flag to indicate if link can be suspended
|
||||
* @pause_iface_config: interface config
|
||||
*/
|
||||
struct pmo_wow_cmd_params {
|
||||
bool enable;
|
||||
bool can_suspend_link;
|
||||
uint8_t pause_iface_config;
|
||||
uint32_t flags;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_suspend_params - suspend cmd parameter
|
||||
* @disable_target_intr: disable target interrupt
|
||||
*/
|
||||
struct pmo_suspend_params {
|
||||
uint8_t disable_target_intr;
|
||||
};
|
||||
|
||||
#endif /* end of _WLAN_PMO_WOW_PUBLIC_STRUCT_H_ */
|
在新工单中引用
屏蔽一个用户