xref: /wlan-dirver/qca-wifi-host-cmn/ipa/dispatcher/inc/wlan_ipa_public_struct.h (revision d0c05845839e5f2ba5a8dcebe0cd3e4cd4e8dfcf)
1 /*
2  * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2022 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  * struct ipa_uc_offload_control_params - ipa offload control params
85  * @offload_type: ipa offload type
86  * @vdev_id: vdev id
87  * @enable: ipa offload enable/disable
88  */
89 struct ipa_uc_offload_control_params {
90 	uint32_t offload_type;
91 	uint32_t vdev_id;
92 	uint32_t enable;
93 };
94 
95 /**
96  * struct ipa_intrabss_control_params - ipa intrabss control params
97  * @vdev_id: vdev id
98  * @enable: ipa intrabss enable/disable
99  */
100 struct ipa_intrabss_control_params {
101 	uint32_t vdev_id;
102 	uint32_t enable;
103 };
104 #endif /* end  of _WLAN_IPA_PUBLIC_STRUCT_H_ */
105