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