Mukul Sharma | d75a667 | 2017-06-22 15:40:53 +0530 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2017 The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * Permission to use, copy, modify, and/or distribute this software for |
| 5 | * any purpose with or without fee is hereby granted, provided that the |
| 6 | * above copyright notice and this permission notice appear in all |
| 7 | * copies. |
| 8 | * |
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 10 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 11 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 12 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 13 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 14 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 15 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 16 | * PERFORMANCE OF THIS SOFTWARE. |
| 17 | */ |
| 18 | /** |
| 19 | * DOC: Declare various struct, macros which are used for private to PMO. |
| 20 | * |
| 21 | * Note: This file shall not contain public API's prototype/declarations. |
| 22 | * |
| 23 | */ |
| 24 | |
| 25 | #ifndef _WLAN_PMO_PRIV_STRUCT_H_ |
| 26 | #define _WLAN_PMO_PRIV_STRUCT_H_ |
| 27 | |
| 28 | #include "wlan_pmo_common_public_struct.h" |
| 29 | #include "wlan_pmo_arp_public_struct.h" |
| 30 | #include "wlan_pmo_ns_public_struct.h" |
| 31 | #include "wlan_pmo_gtk_public_struct.h" |
| 32 | #include "wlan_pmo_wow_public_struct.h" |
| 33 | #include "wlan_pmo_mc_addr_filtering_public_struct.h" |
| 34 | |
| 35 | /** |
| 36 | * struct pmo_psoc_priv_obj - psoc related data require for pmo |
| 37 | * @psoc_cfg: place holder for psoc configuration |
| 38 | * @pmo_tx_ops: transmit ops for PMO |
| 39 | * @wow: wow configuration |
| 40 | * @dp_hdl: psoc data path handle |
| 41 | * @htc_hdl: htc layer handle |
| 42 | * @hif_hdl: hif layer handle |
| 43 | * @txrx_hdl: txrx pdev handle |
| 44 | * @pause_bitmap_notifier: registered callback to update pause bitmap value |
| 45 | * @pmo_get_pause_bitmap: registered callback to get pause bitmap value |
| 46 | * @lock: spin lock for pmo psoc |
| 47 | */ |
| 48 | struct pmo_psoc_priv_obj { |
| 49 | struct pmo_psoc_cfg psoc_cfg; |
| 50 | struct wlan_pmo_tx_ops pmo_tx_ops; |
| 51 | struct pmo_wow wow; |
| 52 | void *dp_hdl; |
| 53 | void *htc_hdl; |
| 54 | void *hif_hdl; |
| 55 | void *txrx_hdl; |
| 56 | pmo_notify_pause_bitmap pause_bitmap_notifier; |
| 57 | pmo_get_pause_bitmap get_pause_bitmap; |
| 58 | pmo_is_device_in_low_pwr_mode is_device_in_low_pwr_mode; |
| 59 | qdf_spinlock_t lock; |
| 60 | }; |
| 61 | |
| 62 | /** |
| 63 | * struct wlan_pmo_ctx -offload mgr context |
| 64 | * @psoc_context: psoc context |
| 65 | * @pmo_suspend_handler: suspend handler table for all componenets |
| 66 | * @pmo_suspend_handler_arg: suspend handler argument sfor all componenets |
| 67 | * @pmo_resume_handler: resume handler table for all componenets |
| 68 | * @pmo_resume_handler_arg: resume handler argument for all componenets |
| 69 | * @lock: lock for global pmo ctx |
| 70 | */ |
| 71 | struct wlan_pmo_ctx { |
| 72 | pmo_psoc_suspend_handler |
| 73 | pmo_suspend_handler[WLAN_UMAC_MAX_COMPONENTS]; |
| 74 | void *pmo_suspend_handler_arg[WLAN_UMAC_MAX_COMPONENTS]; |
| 75 | pmo_psoc_resume_handler |
| 76 | pmo_resume_handler[WLAN_UMAC_MAX_COMPONENTS]; |
| 77 | void *pmo_resume_handler_arg[WLAN_UMAC_MAX_COMPONENTS]; |
| 78 | qdf_spinlock_t lock; |
| 79 | }; |
| 80 | |
| 81 | /** |
| 82 | * struct pmo_vdev_priv_obj -vdev specific user configuration required for pmo |
| 83 | * @pmo_psoc_ctx: pmo psoc ctx |
| 84 | * @vdev_arp_req: place holder for arp request for vdev |
| 85 | * @vdev_ns_req: place holder for ns request for vdev |
| 86 | * @vdev_mc_list_req: place holder for mc addr list for vdev |
| 87 | * @addr_filter_pattern: addr filter pattern for vdev |
| 88 | * @vdev_gtk_params: place holder for gtk request for vdev |
| 89 | * @gtk_err_enable: gtk error is enabled or not |
| 90 | * @vdev_bpf_req: place holder for apf/bpf for vdev |
| 91 | * @vdev_pkt_filter: place holder for vdev packet filter |
| 92 | * @ptrn_match_enable: true when pattern match is enabled else false |
| 93 | * @num_wow_default_patterns: number of wow default patterns for vdev |
| 94 | * @num_wow_user_patterns: number of user wow patterns for vdev |
| 95 | * @nlo_in_progress: true when pno/nlo in progress else false |
| 96 | * @nlo_match_received: true when nlo match recevied from fwr else false |
| 97 | * @extscan_in_progress: true when extscan in progress else false |
| 98 | * @p2plo_in_progress: true when p2plo_in_progress in progress else false |
| 99 | * @dtim_period: dtim period for vdev |
| 100 | * @beacon_interval: vdev beacon interval |
| 101 | * @alt_modulated_dtim_enabled:dynamic modulated dtim enabled |
| 102 | * @dtim_policy: tells vdev beacon dtim policy |
| 103 | * @vdev_dp_hdl: vdev data path handle |
| 104 | * @pmo_vdev_lock: spin lock for pmo vdev priv ctx |
| 105 | */ |
| 106 | struct pmo_vdev_priv_obj { |
| 107 | struct pmo_psoc_priv_obj *pmo_psoc_ctx; |
| 108 | struct pmo_arp_offload_params vdev_arp_req; |
| 109 | struct pmo_ns_offload_params vdev_ns_req; |
| 110 | struct pmo_mc_addr_list vdev_mc_list_req; |
| 111 | uint8_t addr_filter_pattern; |
| 112 | struct pmo_gtk_req vdev_gtk_req; |
| 113 | struct pmo_gtk_rsp_req vdev_gtk_rsp_req; |
| 114 | qdf_atomic_t gtk_err_enable; |
| 115 | bool ptrn_match_enable; |
| 116 | uint8_t num_wow_default_patterns; |
| 117 | uint8_t num_wow_user_patterns; |
| 118 | bool nlo_in_progress; |
| 119 | bool nlo_match_received; |
| 120 | bool extscan_in_progress; |
| 121 | bool p2plo_in_progress; |
| 122 | uint8_t dtim_period; |
| 123 | uint8_t beacon_interval; |
| 124 | bool alt_modulated_dtim_enable; |
| 125 | uint32_t dtim_policy; |
| 126 | void *vdev_dp_hdl; |
| 127 | qdf_spinlock_t pmo_vdev_lock; |
| 128 | }; |
| 129 | |
| 130 | #endif /* end of _WLAN_PMO_PRIV_STRUCT_H_ */ |