xref: /wlan-driver/qca-wifi-host-cmn/ipa/dispatcher/inc/wlan_ipa_public_struct.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /*
21  * DOC: contains ipa public structure definitions
22  */
23 
24 #ifndef _WLAN_IPA_PUBLIC_STRUCT_H_
25 #define _WLAN_IPA_PUBLIC_STRUCT_H_
26 
27 #include <wlan_cmn.h>
28 #include <qdf_status.h>
29 #include <wlan_objmgr_psoc_obj.h>
30 
31 /**
32  * struct wlan_ipa_config
33  * @ipa_config: IPA config
34  * @desc_size: IPA descriptor size
35  * @txbuf_count: TX buffer count
36  * @bus_bw_high: Bus bandwidth high threshold
37  * @bus_bw_medium: Bus bandwidth medium threshold
38  * @bus_bw_low: Bus bandwidth low threshold
39  * @ipa_bw_high: IPA bandwidth high threshold
40  * @ipa_bw_medium: IPA bandwidth medium threshold
41  * @ipa_bw_low: IPA bandwidth low threshold
42  * @ipa_force_voting: support force bw voting
43  * @ipa_wds: WDS support for IPA
44  * @ipa_vlan_support: support got vlan with IPA
45  */
46 struct wlan_ipa_config {
47 	uint32_t ipa_config;
48 	uint32_t desc_size;
49 	uint32_t txbuf_count;
50 	uint32_t bus_bw_high;
51 	uint32_t bus_bw_medium;
52 	uint32_t bus_bw_low;
53 	uint32_t ipa_bw_high;
54 	uint32_t ipa_bw_medium;
55 	uint32_t ipa_bw_low;
56 	bool ipa_force_voting;
57 	bool ipa_wds;
58 	bool ipa_vlan_support;
59 };
60 
61 /**
62  * enum wlan_ipa_wlan_event - WLAN IPA events
63  * @WLAN_IPA_CLIENT_CONNECT: Client Connects
64  * @WLAN_IPA_CLIENT_DISCONNECT: Client Disconnects
65  * @WLAN_IPA_AP_CONNECT: SoftAP is started
66  * @WLAN_IPA_AP_DISCONNECT: SoftAP is stopped
67  * @WLAN_IPA_STA_CONNECT: STA associates to AP
68  * @WLAN_IPA_STA_DISCONNECT: STA dissociates from AP
69  * @WLAN_IPA_CLIENT_CONNECT_EX: Peer associates/re-associates to softap
70  * @WLAN_IPA_WLAN_EVENT_MAX: Max value for the enum
71  */
72 enum wlan_ipa_wlan_event {
73 	WLAN_IPA_CLIENT_CONNECT,
74 	WLAN_IPA_CLIENT_DISCONNECT,
75 	WLAN_IPA_AP_CONNECT,
76 	WLAN_IPA_AP_DISCONNECT,
77 	WLAN_IPA_STA_CONNECT,
78 	WLAN_IPA_STA_DISCONNECT,
79 	WLAN_IPA_CLIENT_CONNECT_EX,
80 	WLAN_IPA_WLAN_EVENT_MAX
81 };
82 
83 /**
84  * enum wlan_ipa_bw_level -ipa bandwidth level
85  * @WLAN_IPA_BW_LEVEL_LOW: vote for low bandwidth
86  * @WLAN_IPA_BW_LEVEL_MEDIUM: vote for medium bandwidth
87  * @WLAN_IPA_BW_LEVEL_HIGH: vote for high bandwidth
88  */
89 enum wlan_ipa_bw_level {
90 	WLAN_IPA_BW_LEVEL_LOW,
91 	WLAN_IPA_BW_LEVEL_MEDIUM,
92 	WLAN_IPA_BW_LEVEL_HIGH,
93 };
94 
95 #ifdef IPA_OPT_WIFI_DP
96 /**
97  * enum wlan_ipa_cce_super_rule_flt_hdl - Filter hdl values for cce super rules
98  * @WLAN_HDL_FILTER1 : Handle for filter1
99  * @WLAN_HDL_FILTER2 : Handle for filter 2
100  * @WLAN_HDL_MAX_FILTER : Max value for filter handle
101  */
102 enum wlan_ipa_cce_super_rule_flt_hdl {
103 	WLAN_HDL_FILTER1 = 0xC,
104 	WLAN_HDL_FILTER2 = 0xD,
105 	WLAN_HDL_MAX_FILTER
106 };
107 #endif
108 
109 /**
110  * struct ipa_uc_offload_control_params - ipa offload control params
111  * @offload_type: ipa offload type
112  * @vdev_id: vdev id
113  * @enable: ipa offload enable/disable
114  */
115 struct ipa_uc_offload_control_params {
116 	uint32_t offload_type;
117 	uint32_t vdev_id;
118 	uint32_t enable;
119 };
120 
121 /**
122  * struct ipa_intrabss_control_params - ipa intrabss control params
123  * @vdev_id: vdev id
124  * @enable: ipa intrabss enable/disable
125  */
126 struct ipa_intrabss_control_params {
127 	uint32_t vdev_id;
128 	uint32_t enable;
129 };
130 #endif /* end  of _WLAN_IPA_PUBLIC_STRUCT_H_ */
131