• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright (c) 2013-2020, The Linux Foundation. All rights reserved.
2  *
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License version 2 and
5  * only version 2 as published by the Free Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  */
12 
13 /*
14  * This header file defines the types and structures that were defined in
15  * ipa. It contains the constant values defined, enums, structures,
16  * messages, and service message IDs (in that order) Structures that were
17  * defined in the IDL as messages contain mandatory elements, optional
18  * elements, a combination of mandatory and optional elements (mandatory
19  * always come before optionals in the structure), or nothing (null message)
20 
21  * An optional element in a message is preceded by a uint8_t value that must be
22  * set to true if the element is going to be included. When decoding a received
23  * message, the uint8_t values will be set to true or false by the decode
24  * routine, and should be checked before accessing the values that they
25  * correspond to.
26 
27  * Variable sized arrays are defined as static sized arrays with an unsigned
28  * integer (32 bit) preceding it that must be set to the number of elements
29  * in the array that are valid. For Example:
30 
31  * uint32_t test_opaque_len;
32  * uint8_t test_opaque[16];
33 
34  * If only 4 elements are added to test_opaque[] then test_opaque_len must be
35  * set to 4 before sending the message.  When decoding, the _len value is set
36  * by the decode routine and should be checked so that the correct number of
37  * elements in the array will be accessed.
38  */
39 #ifndef IPA_QMI_SERVICE_V01_H
40 #define IPA_QMI_SERVICE_V01_H
41 
42 #include <linux/types.h>
43 
44 #define QMI_IPA_REMOTE_MHI_CHANNELS_NUM_MAX_V01 6
45 #define QMI_IPA_MAX_FILTERS_EX_V01 128
46 #define QMI_IPA_MAX_FILTERS_EX2_V01 256
47 #define QMI_IPA_IPFLTR_NUM_IHL_RANGE_16_EQNS_V01 2
48 #define QMI_IPA_MAX_FILTERS_V01 64
49 #define QMI_IPA_IPFLTR_NUM_MEQ_128_EQNS_V01 2
50 #define QMI_IPA_ENDP_DESC_NUM_MAX_V01 31
51 #define QMI_IPA_MAX_APN_V01 8
52 /* Currently max we can use is only 1. But for scalability purpose
53  * we are having max value as 8.
54  */
55 #define QMI_IPA_MAX_CLIENT_DST_PIPES_V01 8
56 #define QMI_IPA_IPFLTR_NUM_IHL_MEQ_32_EQNS_V01 2
57 #define QMI_IPA_MAX_UL_FIREWALL_RULES_V01 64
58 #define QMI_IPA_REMOTE_MHI_MEMORY_MAPPING_NUM_MAX_V01 6
59 #define QMI_IPA_IPFLTR_NUM_MEQ_32_EQNS_V01 2
60 #define QMI_IPA_MAX_PIPES_V01 20
61 #define QMI_IPA_MAX_PER_CLIENTS_V01 64
62 
63 /*
64  * Indicates presence of newly added member to support HW stats.
65  */
66 #define IPA_QMI_SUPPORTS_STATS
67 #define IPA_QMI_SUPPORT_MHI_DEFAULT
68 
69 #define IPA_INT_MAX	((int)(~0U>>1))
70 #define IPA_INT_MIN	(-IPA_INT_MAX - 1)
71 
72 /* IPA definition as msm_qmi_interface.h */
73 
74 enum ipa_qmi_result_type_v01 {
75 	/* To force a 32 bit signed enum. Do not change or use*/
76 	IPA_QMI_RESULT_TYPE_MIN_ENUM_VAL_V01 = IPA_INT_MIN,
77 	IPA_QMI_RESULT_SUCCESS_V01 = 0,
78 	IPA_QMI_RESULT_FAILURE_V01 = 1,
79 	IPA_QMI_RESULT_TYPE_MAX_ENUM_VAL_V01 = IPA_INT_MAX,
80 };
81 
82 enum ipa_qmi_error_type_v01 {
83 	/* To force a 32 bit signed enum. Do not change or use*/
84 	IPA_QMI_ERROR_TYPE_MIN_ENUM_VAL_V01 = IPA_INT_MIN,
85 	IPA_QMI_ERR_NONE_V01 = 0x0000,
86 	IPA_QMI_ERR_MALFORMED_MSG_V01 = 0x0001,
87 	IPA_QMI_ERR_NO_MEMORY_V01 = 0x0002,
88 	IPA_QMI_ERR_INTERNAL_V01 = 0x0003,
89 	IPA_QMI_ERR_CLIENT_IDS_EXHAUSTED_V01 = 0x0005,
90 	IPA_QMI_ERR_INVALID_ID_V01 = 0x0029,
91 	IPA_QMI_ERR_ENCODING_V01 = 0x003A,
92 	IPA_QMI_ERR_INCOMPATIBLE_STATE_V01 = 0x005A,
93 	IPA_QMI_ERR_NOT_SUPPORTED_V01 = 0x005E,
94 	IPA_QMI_ERROR_TYPE_MAX_ENUM_VAL_V01 = IPA_INT_MAX,
95 };
96 
97 struct ipa_qmi_response_type_v01 {
98 	uint16_t result;
99 	uint16_t error;
100 };
101 
102 enum ipa_platform_type_enum_v01 {
103 	IPA_PLATFORM_TYPE_ENUM_MIN_ENUM_VAL_V01 =
104 	-2147483647, /* To force a 32 bit signed enum.  Do not change or use */
105 	QMI_IPA_PLATFORM_TYPE_INVALID_V01 = 0,
106 	/*  Invalid platform identifier */
107 	QMI_IPA_PLATFORM_TYPE_TN_V01 = 1,
108 	/*  Platform identifier -	Data card device */
109 	QMI_IPA_PLATFORM_TYPE_LE_V01 = 2,
110 	/*  Platform identifier -	Data router device */
111 	QMI_IPA_PLATFORM_TYPE_MSM_ANDROID_V01 = 3,
112 	/*  Platform identifier -	MSM device with Android HLOS */
113 	QMI_IPA_PLATFORM_TYPE_MSM_WINDOWS_V01 = 4,
114 	/*  Platform identifier -	MSM device with Windows HLOS */
115 	QMI_IPA_PLATFORM_TYPE_MSM_QNX_V01 = 5,
116 	/* Platform identifier - MDM device with LE HLOS, MHI data router */
117 	QMI_IPA_PLATFORM_TYPE_LE_MHI_V01 = 6,
118 	/*  Platform identifier -	MSM device with QNX HLOS */
119 	IPA_PLATFORM_TYPE_ENUM_MAX_ENUM_VAL_V01 = 2147483647
120 	/* To force a 32 bit signed enum.  Do not change or use */
121 };
122 
123 #define QMI_IPA_PLATFORM_TYPE_LE_MHI_V01 \
124 			QMI_IPA_PLATFORM_TYPE_LE_MHI_V01
125 
126 struct ipa_hdr_tbl_info_type_v01 {
127 	uint32_t modem_offset_start;
128 	/*	Offset from the start of IPA Shared memory from which
129 	 *	modem driver may insert header table entries.
130 	 */
131 	uint32_t modem_offset_end;
132 	/*	Offset from the start of IPA shared mem beyond which modem
133 	 *	driver shall not insert header table entries. The space
134 	 *	available for the modem driver shall include the
135 	 *	modem_offset_start and modem_offset_end.
136 	 */
137 };  /* Type */
138 
139 struct ipa_route_tbl_info_type_v01 {
140 	uint32_t route_tbl_start_addr;
141 	/*	Identifies the start of the routing table. Denotes the offset
142 	 *	from the start of the IPA Shared Mem
143 	 */
144 
145 	uint32_t num_indices;
146 	/*	Number of indices (starting from 0) that is being allocated to
147 	 *	the modem. The number indicated here is also included in the
148 	 *	allocation. The value of num_indices shall not exceed 31
149 	 *	(5 bits used to specify the routing table index), unless there
150 	 *	is a change in the hardware.
151 	 */
152 };  /* Type */
153 
154 struct ipa_modem_mem_info_type_v01 {
155 
156 	uint32_t block_start_addr;
157 	/*	Identifies the start of the memory block allocated for the
158 	 *	modem. Denotes the offset from the start of the IPA Shared Mem
159 	 */
160 
161 	uint32_t size;
162 	/*	Size of the block allocated for the modem driver */
163 };  /* Type */
164 
165 struct ipa_hdr_proc_ctx_tbl_info_type_v01 {
166 
167 	uint32_t modem_offset_start;
168 	/*  Offset from the start of IPA shared memory from which the modem
169 	 *	driver may insert header processing context table entries.
170 	 */
171 
172 	uint32_t modem_offset_end;
173 	/*  Offset from the start of IPA shared memory beyond which the modem
174 	 *	driver may not insert header proc table entries. The space
175 	 *	available for the modem driver includes modem_offset_start and
176 	 *	modem_offset_end.
177 	 */
178 };  /* Type */
179 
180 struct ipa_zip_tbl_info_type_v01 {
181 
182 	uint32_t modem_offset_start;
183 	/*  Offset from the start of IPA shared memory from which the modem
184 	 *	driver may insert compression/decompression command entries.
185 	 */
186 
187 	uint32_t modem_offset_end;
188 	/*  Offset from the start of IPA shared memory beyond which the modem
189 	 *	driver may not insert compression/decompression command entries.
190 	 *	The space available for the modem driver includes
191 	 *  modem_offset_start and modem_offset_end.
192 	 */
193 };  /* Type */
194 
195 /**
196  * Request Message; Requests the modem IPA driver
197  * to perform initialization
198  */
199 struct ipa_init_modem_driver_req_msg_v01 {
200 
201 	/* Optional */
202 	/*  Platform info */
203 	uint8_t platform_type_valid;
204 	/* Must be set to true if platform_type is being passed */
205 	enum ipa_platform_type_enum_v01 platform_type;
206 	/*   Provides information about the platform (ex. TN/MN/LE/MSM,etc) */
207 
208 	/* Optional */
209 	/*  Header table info */
210 	uint8_t hdr_tbl_info_valid;
211 	/* Must be set to true if hdr_tbl_info is being passed */
212 	struct ipa_hdr_tbl_info_type_v01 hdr_tbl_info;
213 	/*	Provides information about the header table */
214 
215 	/* Optional */
216 	/*  IPV4 Routing table info */
217 	uint8_t v4_route_tbl_info_valid;
218 	/* Must be set to true if v4_route_tbl_info is being passed */
219 	struct ipa_route_tbl_info_type_v01 v4_route_tbl_info;
220 	/*	Provides information about the IPV4 routing table */
221 
222 	/* Optional */
223 	/*  IPV6 Routing table info */
224 	uint8_t v6_route_tbl_info_valid;
225 	/* Must be set to true if v6_route_tbl_info is being passed */
226 	struct ipa_route_tbl_info_type_v01 v6_route_tbl_info;
227 	/*	Provides information about the IPV6 routing table */
228 
229 	/* Optional */
230 	/*  IPV4 Filter table start address */
231 	uint8_t v4_filter_tbl_start_addr_valid;
232 	/* Must be set to true if v4_filter_tbl_start_addr is being passed */
233 	uint32_t v4_filter_tbl_start_addr;
234 	/*	Provides information about the starting address of IPV4 filter
235 	 *	table in IPAv2 or non-hashable IPv4 filter table in IPAv3.
236 	 *	Denotes the offset from the start of the IPA Shared Mem
237 	 */
238 
239 	/* Optional */
240 	/* IPV6 Filter table start address */
241 	uint8_t v6_filter_tbl_start_addr_valid;
242 	/* Must be set to true if v6_filter_tbl_start_addr is being passed */
243 	uint32_t v6_filter_tbl_start_addr;
244 	/*	Provides information about the starting address of IPV6 filter
245 	 *	table in IPAv2 or non-hashable IPv6 filter table in IPAv3.
246 	 *	Denotes the offset from the start of the IPA Shared Mem
247 	 */
248 
249 	/* Optional */
250 	/*  Modem memory block */
251 	uint8_t modem_mem_info_valid;
252 	/* Must be set to true if modem_mem_info is being passed */
253 	struct ipa_modem_mem_info_type_v01 modem_mem_info;
254 	/*  Provides information about the start address and the size of
255 	 *	the memory block that is being allocated to the modem driver.
256 	 *	Denotes the physical address
257 	 */
258 
259 	/* Optional */
260 	/*  Destination end point for control commands from modem */
261 	uint8_t ctrl_comm_dest_end_pt_valid;
262 	/* Must be set to true if ctrl_comm_dest_end_pt is being passed */
263 	uint32_t ctrl_comm_dest_end_pt;
264 	/*  Provides information about the destination end point on the
265 	 *	application processor to which the modem driver can send
266 	 *	control commands. The value of this parameter cannot exceed
267 	 *	19 since IPA only supports 20 end points.
268 	 */
269 
270 	/* Optional */
271 	/*  Modem Bootup Information */
272 	uint8_t is_ssr_bootup_valid;
273 	/* Must be set to true if is_ssr_bootup is being passed */
274 	uint8_t is_ssr_bootup;
275 	/*	Specifies whether the modem is booting up after a modem only
276 	 *	sub-system restart or not. This will let the modem driver
277 	 *	know that it doesn't have to reinitialize some of the HW
278 	 *	blocks because IPA has not been reset since the previous
279 	 *	initialization.
280 	 */
281 
282 	/* Optional */
283 	/*  Header Processing Context Table Information */
284 	uint8_t hdr_proc_ctx_tbl_info_valid;
285 	/* Must be set to true if hdr_proc_ctx_tbl_info is being passed */
286 	struct ipa_hdr_proc_ctx_tbl_info_type_v01 hdr_proc_ctx_tbl_info;
287 	/* Provides information about the header processing context table.
288 	 */
289 
290 	/* Optional */
291 	/*  Compression Decompression Table Information */
292 	uint8_t zip_tbl_info_valid;
293 	/* Must be set to true if zip_tbl_info is being passed */
294 	struct ipa_zip_tbl_info_type_v01 zip_tbl_info;
295 	/* Provides information about the zip table.
296 	 */
297 
298 	/* Optional */
299 	/*  IPv4 Hashable Routing Table Information */
300 	/** Must be set to true if v4_hash_route_tbl_info is being passed */
301 	uint8_t v4_hash_route_tbl_info_valid;
302 	struct ipa_route_tbl_info_type_v01 v4_hash_route_tbl_info;
303 
304 	/* Optional */
305 	/*  IPv6 Hashable Routing Table Information */
306 	/** Must be set to true if v6_hash_route_tbl_info is being passed */
307 	uint8_t v6_hash_route_tbl_info_valid;
308 	struct ipa_route_tbl_info_type_v01 v6_hash_route_tbl_info;
309 
310 	/*
311 	 * Optional
312 	 * IPv4 Hashable Filter Table Start Address
313 	 * Must be set to true if v4_hash_filter_tbl_start_addr
314 	 * is being passed
315 	 */
316 	uint8_t v4_hash_filter_tbl_start_addr_valid;
317 	uint32_t v4_hash_filter_tbl_start_addr;
318 	/* Identifies the starting address of the IPv4 hashable filter
319 	 * table in IPAv3 onwards. Denotes the offset from the start of
320 	 * the IPA shared memory.
321 	 */
322 
323 	/* Optional
324 	 * IPv6 Hashable Filter Table Start Address
325 	 * Must be set to true if v6_hash_filter_tbl_start_addr
326 	 * is being passed
327 	 */
328 	uint8_t v6_hash_filter_tbl_start_addr_valid;
329 	uint32_t v6_hash_filter_tbl_start_addr;
330 	/* Identifies the starting address of the IPv6 hashable filter
331 	 * table in IPAv3 onwards. Denotes the offset from the start of
332 	 * the IPA shared memory.
333 	 */
334 
335 	/* Optional
336 	 * Modem HW Stats Quota Base address
337 	 * Must be set to true if hw_stats_quota_base_addr
338 	 * is being passed
339 	 */
340 	uint8_t hw_stats_quota_base_addr_valid;
341 	uint32_t hw_stats_quota_base_addr;
342 
343 	/* Optional
344 	 * Modem HW Stats Quota Size
345 	 * Must be set to true if hw_stats_quota_size
346 	 * is being passed
347 	 */
348 	uint8_t hw_stats_quota_size_valid;
349 	uint32_t hw_stats_quota_size;
350 
351 	/* Optional
352 	 * Modem HW Drop Stats Table Start Address
353 	 * Must be set to true if hw_drop_stats_base_addr
354 	 * is being passed
355 	 */
356 	uint8_t hw_drop_stats_base_addr_valid;
357 	uint32_t hw_drop_stats_base_addr;
358 
359 	/* Optional
360 	 * Modem HW Drop Stats Table size
361 	 * Must be set to true if hw_drop_stats_table_size
362 	 * is being passed
363 	 */
364 	uint8_t hw_drop_stats_table_size_valid;
365 	uint32_t hw_drop_stats_table_size;
366 };  /* Message */
367 
368 /* Response Message; Requests the modem IPA driver about initialization */
369 struct ipa_init_modem_driver_resp_msg_v01 {
370 	/* Mandatory */
371 	/*  Result Code */
372 	struct ipa_qmi_response_type_v01 resp;
373 	/* Standard response type.*/
374 
375 	/* Optional */
376 	/* Destination end point for control commands from master driver */
377 	uint8_t ctrl_comm_dest_end_pt_valid;
378 	/* Must be set to true if ctrl_comm_dest_ep is being passed */
379 	uint32_t ctrl_comm_dest_end_pt;
380 	/*	Provides information about the destination end point on the
381 	 *	modem processor to which the master driver can send control
382 	 *	commands. The value of this parameter cannot exceed 19 since
383 	 *	IPA only supports 20 end points. This field is looked at only
384 	 *	if the result in TLV RESULT_CODE is	QMI_RESULT_SUCCESS
385 	 */
386 
387 	/* Optional */
388 	/*  Default end point */
389 	uint8_t default_end_pt_valid;
390 	/* Must be set to true if default_end_pt is being passed */
391 	uint32_t default_end_pt;
392 	/*  Provides information about the default end point. The master
393 	 *	driver may or may not set the register in the hardware with
394 	 *	this value. The value of this parameter cannot exceed 19
395 	 *	since IPA only supports 20 end points. This field is looked
396 	 *	at only if the result in TLV RESULT_CODE is QMI_RESULT_SUCCESS
397 	 */
398 
399 	/* Optional */
400 	/*  Modem Driver Initialization Pending */
401 	uint8_t modem_driver_init_pending_valid;
402 	/* Must be set to true if modem_driver_init_pending is being passed */
403 	uint8_t modem_driver_init_pending;
404 	/*
405 	 * Identifies if second level message handshake is needed
406 	 *	between drivers to indicate when IPA HWP loading is completed.
407 	 *	If this is set by modem driver, AP driver will need to wait
408 	 *	for a INIT_MODEM_DRIVER_CMPLT message before communicating with
409 	 *	IPA HWP.
410 	 */
411 };  /* Message */
412 
413 /*
414  * Request Message; Request from Modem IPA driver to indicate
415  *	modem driver init completion
416  */
417 struct ipa_init_modem_driver_cmplt_req_msg_v01 {
418 	/* Mandatory */
419 	/*  Modem Driver init complete status; */
420 	uint8_t status;
421 	/*
422 	 * Specifies whether the modem driver initialization is complete
423 	 *	including the micro controller image loading.
424 	 */
425 };  /* Message */
426 
427 /*
428  * Response Message; Request from Modem IPA driver to indicate
429  *	modem driver init completion
430  */
431 struct ipa_init_modem_driver_cmplt_resp_msg_v01 {
432 	/* Mandatory */
433 	/*  Result Code */
434 	struct ipa_qmi_response_type_v01 resp;
435 	/**<   Standard response type.*/
436 };  /* Message */
437 
438 /*	Request Message; This is the message that is exchanged between the
439  *	control point and the service in order to register for indications.
440  */
441 struct ipa_indication_reg_req_msg_v01 {
442 	/* Optional */
443 	/*  Master driver initialization completion */
444 	uint8_t master_driver_init_complete_valid;
445 	/* Must be set to true if master_driver_init_complete is being passed */
446 	uint8_t master_driver_init_complete;
447 	/*  If set to TRUE, this field indicates that the client is
448 	 *	interested in getting indications about the completion
449 	 *	of the initialization sequence of the master driver.
450 	 *	Setting this field in the request message makes sense
451 	 *	only when the QMI_IPA_INDICATION_REGISTER_REQ is being
452 	 *	originated from the modem driver
453 	 */
454 
455 	/* Optional */
456 	/*  Data Usage Quota Reached */
457 	uint8_t data_usage_quota_reached_valid;
458 	/*  Must be set to true if data_usage_quota_reached is being passed */
459 	uint8_t data_usage_quota_reached;
460 	/*  If set to TRUE, this field indicates that the client wants to
461 	 *  receive indications about reaching the data usage quota that
462 	 *  previously set via QMI_IPA_SET_DATA_USAGE_QUOTA. Setting this field
463 	 *  in the request message makes sense only when the
464 	 *  QMI_IPA_INDICATION_REGISTER_REQ is being originated from the Master
465 	 *  driver
466 	 */
467 
468 	/* Optional */
469 	/* IPA MHI Ready Indication */
470 	uint8_t ipa_mhi_ready_ind_valid;
471 	/*  Must be set to true if ipa_mhi_ready_ind is being passed */
472 	uint8_t ipa_mhi_ready_ind;
473 	/*
474 	 * If set to TRUE, this field indicates that the client wants to
475 	 * receive indications about MHI ready for Channel allocations.
476 	 */
477 
478 	/* Optional */
479 	/*  Endpoint Desc Info Indication */
480 	uint8_t endpoint_desc_ind_valid;
481 	/* Must be set to true if endpoint_desc_ind is being passed */
482 	uint8_t endpoint_desc_ind;
483 	/*
484 	 * If set to TRUE, this field indicates that the client wants to
485 	 * receive indications for Endpoint descriptor information via
486 	 * QMI_IPA_ENDP_DESC_INDICATION. Setting this field in the request
487 	 * message makes sense only when the  QMI_IPA_INDICATION_REGISTER_REQ
488 	 * is being originated from the master driver.
489 	 */
490 
491 	/* Optional */
492 	/* BW CHANGE Indication */
493 	uint8_t bw_change_ind_valid;
494 	/* Must be set to true if bw_change_ind is being passed */
495 	uint8_t bw_change_ind;
496 	/*
497 	 * If set to TRUE, this field indicates that the client wants to
498 	 * receive indications for BW change information via
499 	 * QMI_IPA_BW_CHANGE_INDICATION. Setting this field in the request
500 	 * message makes sense only when the QMI_IPA_INDICATION_REGISTER_REQ
501 	 * is being originated from the master driver.
502 	 */
503 };  /* Message */
504 
505 
506 /* Response Message; This is the message that is exchanged between the
507  *	control point and the service in order to register for indications.
508  */
509 struct ipa_indication_reg_resp_msg_v01 {
510 	/* Mandatory */
511 	/*  Result Code */
512 	struct ipa_qmi_response_type_v01 resp;
513 	/**<   Standard response type.*/
514 };  /* Message */
515 
516 
517 /*	Indication Message; Indication sent to the Modem IPA driver from
518  *	master IPA driver about initialization being complete.
519  */
520 struct ipa_master_driver_init_complt_ind_msg_v01 {
521 	/* Mandatory */
522 	/*  Master driver initialization completion status */
523 	struct ipa_qmi_response_type_v01 master_driver_init_status;
524 	/*	Indicates the status of initialization. If everything went
525 	 *	as expected, this field is set to SUCCESS. ERROR is set
526 	 *	otherwise. Extended error info may be used to convey
527 	 *	additional information about the error
528 	 */
529 };  /* Message */
530 
531 struct ipa_ipfltr_range_eq_16_type_v01 {
532 	uint8_t offset;
533 	/*	Specifies the offset from the IHL (Internet Header length) */
534 
535 	uint16_t range_low;
536 	/*	Specifies the lower bound of the range */
537 
538 	uint16_t range_high;
539 	/*	Specifies the upper bound of the range */
540 };  /* Type */
541 
542 struct ipa_ipfltr_mask_eq_32_type_v01 {
543 	uint8_t offset;
544 	/*	Specifies the offset either from IHL or from the start of
545 	 *	the IP packet. This depends on the equation that this structure
546 	 *	is used in.
547 	 */
548 
549 	uint32_t mask;
550 	/*	Specifies the mask that has to be used in the comparison.
551 	 *	The field is ANDed with the mask and compared against the value.
552 	 */
553 
554 	uint32_t value;
555 	/*	Specifies the 32 bit value that used in the comparison. */
556 };  /* Type */
557 
558 struct ipa_ipfltr_eq_16_type_v01 {
559 	uint8_t offset;
560 	/*  Specifies the offset into the packet */
561 
562 	uint16_t value;
563 	/* Specifies the 16 bit value that should be used in the comparison. */
564 };  /* Type */
565 
566 struct ipa_ipfltr_eq_32_type_v01 {
567 	uint8_t offset;
568 	/* Specifies the offset into the packet */
569 
570 	uint32_t value;
571 	/* Specifies the 32 bit value that should be used in the comparison. */
572 };  /* Type */
573 
574 struct ipa_ipfltr_mask_eq_128_type_v01 {
575 	uint8_t offset;
576 	/* Specifies the offset into the packet */
577 
578 	uint8_t mask[16];
579 	/*  Specifies the mask that has to be used in the comparison.
580 	 *	The field is ANDed with the mask and compared against the value.
581 	 */
582 
583 	uint8_t value[16];
584 	/* Specifies the 128 bit value that should be used in the comparison. */
585 };  /* Type */
586 
587 
588 struct ipa_filter_rule_type_v01 {
589 	uint16_t rule_eq_bitmap;
590 	/* 16-bit Bitmask to indicate how many eqs are valid in this rule */
591 
592 	uint8_t tos_eq_present;
593 	/*
594 	 * tos_eq_present field has two meanings:
595 	 * IPA ver < 4.5:
596 	 *  specifies if a type of service check rule is present
597 	 *  (as the field name reveals).
598 	 * IPA ver >= 4.5:
599 	 *  specifies if a tcp pure ack check rule is present
600 	 */
601 
602 	uint8_t tos_eq;
603 	/* The value to check against the type of service (ipv4) field */
604 
605 	uint8_t protocol_eq_present;
606 	/* Specifies if a protocol check rule is present */
607 
608 	uint8_t protocol_eq;
609 	/* The value to check against the protocol field */
610 
611 	uint8_t num_ihl_offset_range_16;
612 	/*  The number of 16 bit range check rules at the location
613 	 *	determined by IP header length plus a given offset offset
614 	 *	in this rule. See the definition of the ipa_filter_range_eq_16
615 	 *	for better understanding. The value of this field cannot exceed
616 	 *	IPA_IPFLTR_NUM_IHL_RANGE_16_EQNS which is set as 2
617 	 */
618 
619 	struct ipa_ipfltr_range_eq_16_type_v01
620 		ihl_offset_range_16[QMI_IPA_IPFLTR_NUM_IHL_RANGE_16_EQNS_V01];
621 	/*	Array of the registered IP header length offset 16 bit range
622 	 *	check rules.
623 	 */
624 
625 	uint8_t num_offset_meq_32;
626 	/*  The number of 32 bit masked comparison rules present
627 	 *  in this rule
628 	 */
629 
630 	struct ipa_ipfltr_mask_eq_32_type_v01
631 		offset_meq_32[QMI_IPA_IPFLTR_NUM_MEQ_32_EQNS_V01];
632 	/*  An array of all the possible 32bit masked comparison rules
633 	 *	in this rule
634 	 */
635 
636 	uint8_t tc_eq_present;
637 	/*  Specifies if the traffic class rule is present in this rule */
638 
639 	uint8_t tc_eq;
640 	/* The value against which the IPV4 traffic class field has to
641 	 * be checked
642 	 */
643 
644 	uint8_t flow_eq_present;
645 	/* Specifies if the "flow equals" rule is present in this rule */
646 
647 	uint32_t flow_eq;
648 	/* The value against which the IPV6 flow field has to be checked */
649 
650 	uint8_t ihl_offset_eq_16_present;
651 	/*	Specifies if there is a 16 bit comparison required at the
652 	 *	location in	the packet determined by "Intenet Header length
653 	 *	+ specified offset"
654 	 */
655 
656 	struct ipa_ipfltr_eq_16_type_v01 ihl_offset_eq_16;
657 	/* The 16 bit comparison equation */
658 
659 	uint8_t ihl_offset_eq_32_present;
660 	/*	Specifies if there is a 32 bit comparison required at the
661 	 *	location in the packet determined by "Intenet Header length
662 	 *	+ specified offset"
663 	 */
664 
665 	struct ipa_ipfltr_eq_32_type_v01 ihl_offset_eq_32;
666 	/*	The 32 bit comparison equation */
667 
668 	uint8_t num_ihl_offset_meq_32;
669 	/*	The number of 32 bit masked comparison equations in this
670 	 *	rule. The location of the packet to be compared is
671 	 *	determined by the IP Header length + the give offset
672 	 */
673 
674 	struct ipa_ipfltr_mask_eq_32_type_v01
675 		ihl_offset_meq_32[QMI_IPA_IPFLTR_NUM_IHL_MEQ_32_EQNS_V01];
676 	/*	Array of 32 bit masked comparison equations.
677 	 */
678 
679 	uint8_t num_offset_meq_128;
680 	/*	The number of 128 bit comparison equations in this rule */
681 
682 	struct ipa_ipfltr_mask_eq_128_type_v01
683 		offset_meq_128[QMI_IPA_IPFLTR_NUM_MEQ_128_EQNS_V01];
684 	/*	Array of 128 bit comparison equations. The location in the
685 	 *	packet is determined by the specified offset
686 	 */
687 
688 	uint8_t metadata_meq32_present;
689 	/*  Boolean indicating if the 32 bit masked comparison equation
690 	 *	is present or not. Comparison is done against the metadata
691 	 *	in IPA. Metadata can either be extracted from the packet
692 	 *	header or from the "metadata" register.
693 	 */
694 
695 	struct ipa_ipfltr_mask_eq_32_type_v01
696 			metadata_meq32;
697 	/* The metadata  32 bit masked comparison equation */
698 
699 	uint8_t ipv4_frag_eq_present;
700 	/* Specifies if the IPv4 Fragment equation is present in this rule */
701 };  /* Type */
702 
703 
704 struct ipa_filter_rule_req2_type_v01 {
705 	uint16_t rule_eq_bitmap;
706 	/* 16-bit Bitmask to indicate how many eqs are valid in this rule */
707 
708 	uint8_t pure_ack_eq_present;
709 	/*
710 	 *  specifies if a tcp pure ack check rule is present
711 	 */
712 
713 	uint8_t pure_ack_eq;
714 	/* The value to check against the type of service (ipv4) field */
715 
716 	uint8_t protocol_eq_present;
717 	/* Specifies if a protocol check rule is present */
718 
719 	uint8_t protocol_eq;
720 	/* The value to check against the protocol field */
721 
722 	uint8_t num_ihl_offset_range_16;
723 	/*  The number of 16 bit range check rules at the location
724 	 *	determined by IP header length plus a given offset offset
725 	 *	in this rule. See the definition of the ipa_filter_range_eq_16
726 	 *	for better understanding. The value of this field cannot exceed
727 	 *	IPA_IPFLTR_NUM_IHL_RANGE_16_EQNS which is set as 2
728 	 */
729 
730 	struct ipa_ipfltr_range_eq_16_type_v01
731 		ihl_offset_range_16[QMI_IPA_IPFLTR_NUM_IHL_RANGE_16_EQNS_V01];
732 	/*	Array of the registered IP header length offset 16 bit range
733 	 *	check rules.
734 	 */
735 
736 	uint8_t num_offset_meq_32;
737 	/*  The number of 32 bit masked comparison rules present
738 	 *  in this rule
739 	 */
740 
741 	struct ipa_ipfltr_mask_eq_32_type_v01
742 		offset_meq_32[QMI_IPA_IPFLTR_NUM_MEQ_32_EQNS_V01];
743 	/*  An array of all the possible 32bit masked comparison rules
744 	 *	in this rule
745 	 */
746 
747 	uint8_t tc_eq_present;
748 	/*  Specifies if the traffic class rule is present in this rule */
749 
750 	uint8_t tc_eq;
751 	/* The value against which the IPV4 traffic class field has to
752 	 * be checked
753 	 */
754 
755 	uint8_t flow_eq_present;
756 	/* Specifies if the "flow equals" rule is present in this rule */
757 
758 	uint32_t flow_eq;
759 	/* The value against which the IPV6 flow field has to be checked */
760 
761 	uint8_t ihl_offset_eq_16_present;
762 	/*	Specifies if there is a 16 bit comparison required at the
763 	 *	location in	the packet determined by "Intenet Header length
764 	 *	+ specified offset"
765 	 */
766 
767 	struct ipa_ipfltr_eq_16_type_v01 ihl_offset_eq_16;
768 	/* The 16 bit comparison equation */
769 
770 	uint8_t ihl_offset_eq_32_present;
771 	/*	Specifies if there is a 32 bit comparison required at the
772 	 *	location in the packet determined by "Intenet Header length
773 	 *	+ specified offset"
774 	 */
775 
776 	struct ipa_ipfltr_eq_32_type_v01 ihl_offset_eq_32;
777 	/*	The 32 bit comparison equation */
778 
779 	uint8_t num_ihl_offset_meq_32;
780 	/*	The number of 32 bit masked comparison equations in this
781 	 *	rule. The location of the packet to be compared is
782 	 *	determined by the IP Header length + the give offset
783 	 */
784 
785 	struct ipa_ipfltr_mask_eq_32_type_v01
786 		ihl_offset_meq_32[QMI_IPA_IPFLTR_NUM_IHL_MEQ_32_EQNS_V01];
787 	/*	Array of 32 bit masked comparison equations.
788 	 */
789 
790 	uint8_t num_offset_meq_128;
791 	/*	The number of 128 bit comparison equations in this rule */
792 
793 	struct ipa_ipfltr_mask_eq_128_type_v01
794 		offset_meq_128[QMI_IPA_IPFLTR_NUM_MEQ_128_EQNS_V01];
795 	/*	Array of 128 bit comparison equations. The location in the
796 	 *	packet is determined by the specified offset
797 	 */
798 
799 	uint8_t metadata_meq32_present;
800 	/*  Boolean indicating if the 32 bit masked comparison equation
801 	 *	is present or not. Comparison is done against the metadata
802 	 *	in IPA. Metadata can either be extracted from the packet
803 	 *	header or from the "metadata" register.
804 	 */
805 
806 	struct ipa_ipfltr_mask_eq_32_type_v01
807 			metadata_meq32;
808 	/* The metadata  32 bit masked comparison equation */
809 
810 	uint8_t ipv4_frag_eq_present;
811 	/* Specifies if the IPv4 Fragment equation is present in this rule */
812 };  /* Type */
813 
814 enum ipa_ip_type_enum_v01 {
815 	IPA_IP_TYPE_ENUM_MIN_ENUM_VAL_V01 = -2147483647,
816 	/* To force a 32 bit signed enum.  Do not change or use*/
817 	QMI_IPA_IP_TYPE_INVALID_V01 = 0,
818 	/*  Invalid IP type identifier */
819 	QMI_IPA_IP_TYPE_V4_V01 = 1,
820 	/*  IP V4 type */
821 	QMI_IPA_IP_TYPE_V6_V01 = 2,
822 	/*  IP V6 type */
823 	QMI_IPA_IP_TYPE_V4V6_V01 = 3,
824 	/*  Applies to both IP types */
825 	IPA_IP_TYPE_ENUM_MAX_ENUM_VAL_V01 = 2147483647
826 	/* To force a 32 bit signed enum.  Do not change or use*/
827 };
828 
829 
830 enum ipa_filter_action_enum_v01 {
831 	IPA_FILTER_ACTION_ENUM_MIN_ENUM_VAL_V01 = -2147483647,
832 	/* To force a 32 bit signed enum. Do not change or use */
833 	QMI_IPA_FILTER_ACTION_INVALID_V01 = 0,
834 	/*  Invalid action on filter hit */
835 	QMI_IPA_FILTER_ACTION_SRC_NAT_V01 = 1,
836 	/*  Pass packet to NAT block for Source NAT */
837 	QMI_IPA_FILTER_ACTION_DST_NAT_V01 = 2,
838 	/*  Pass packet to NAT block for Destination NAT */
839 	QMI_IPA_FILTER_ACTION_ROUTING_V01 = 3,
840 	/*  Pass packet to Routing block */
841 	QMI_IPA_FILTER_ACTION_EXCEPTION_V01 = 4,
842 	/*  Treat packet as exception and send to exception pipe */
843 	IPA_FILTER_ACTION_ENUM_MAX_ENUM_VAL_V01 = 2147483647
844 	/* To force a 32 bit signed enum.  Do not change or use*/
845 };
846 
847 struct ipa_filter_spec_type_v01 {
848 	uint32_t filter_spec_identifier;
849 	/*	This field is used to identify a filter spec in the list
850 	 *	of filter specs being sent from the client. This field
851 	 *	is applicable only in the filter install request and response.
852 	 */
853 
854 	enum ipa_ip_type_enum_v01 ip_type;
855 	/*	This field identifies the IP type for which this rule is
856 	 *	applicable. The driver needs to identify the filter table
857 	 *	(V6 or V4) and this field is essential for that
858 	 */
859 
860 	struct ipa_filter_rule_type_v01 filter_rule;
861 	/*	This field specifies the rules in the filter spec. These rules
862 	 *	are the ones that are matched against fields in the packet.
863 	 */
864 
865 	enum ipa_filter_action_enum_v01 filter_action;
866 	/*	This field specifies the action to be taken when a filter match
867 	 *	occurs. The remote side should install this information into the
868 	 *	hardware along with the filter equations.
869 	 */
870 
871 	uint8_t is_routing_table_index_valid;
872 	/*	Specifies whether the routing table index is present or not.
873 	 *	If the action is "QMI_IPA_FILTER_ACTION_EXCEPTION", this
874 	 *	parameter need not be provided.
875 	 */
876 
877 	uint32_t route_table_index;
878 	/*	This is the index in the routing table that should be used
879 	 *	to route the packets if the filter rule is hit
880 	 */
881 
882 	uint8_t is_mux_id_valid;
883 	/*	Specifies whether the mux_id is valid */
884 
885 	uint32_t mux_id;
886 	/*	This field identifies the QMAP MUX ID. As a part of QMAP
887 	 *	protocol, several data calls may be multiplexed over the
888 	 *	same physical transport channel. This identifier is used to
889 	 *	identify one such data call. The maximum value for this
890 	 *	identifier is 255.
891 	 */
892 };  /* Type */
893 
894 struct ipa_filter_spec_ex_type_v01 {
895 	enum ipa_ip_type_enum_v01 ip_type;
896 	/*	This field identifies the IP type for which this rule is
897 	 *	applicable. The driver needs to identify the filter table
898 	 *	(V6 or V4) and this field is essential for that
899 	 */
900 
901 	struct ipa_filter_rule_type_v01 filter_rule;
902 	/*	This field specifies the rules in the filter spec. These rules
903 	 *	are the ones that are matched against fields in the packet.
904 	 */
905 
906 	enum ipa_filter_action_enum_v01 filter_action;
907 	/*	This field specifies the action to be taken when a filter match
908 	 *	occurs. The remote side should install this information into the
909 	 *	hardware along with the filter equations.
910 	 */
911 
912 	uint8_t is_routing_table_index_valid;
913 	/*	Specifies whether the routing table index is present or not.
914 	 *	If the action is "QMI_IPA_FILTER_ACTION_EXCEPTION", this
915 	 *	parameter need not be provided.
916 	 */
917 
918 	uint32_t route_table_index;
919 	/*	This is the index in the routing table that should be used
920 	 *	to route the packets if the filter rule is hit
921 	 */
922 
923 	uint8_t is_mux_id_valid;
924 	/*	Specifies whether the mux_id is valid */
925 
926 	uint32_t mux_id;
927 	/*	This field identifies the QMAP MUX ID. As a part of QMAP
928 	 *	protocol, several data calls may be multiplexed over the
929 	 *	same physical transport channel. This identifier is used to
930 	 *	identify one such data call. The maximum value for this
931 	 *	identifier is 255.
932 	 */
933 
934 	uint32_t rule_id;
935 	/* Rule Id of the given filter. The Rule Id is populated in the rule
936 	 * header when installing the rule in IPA.
937 	 */
938 
939 	uint8_t is_rule_hashable;
940 	/** Specifies whether the given rule is hashable.
941 	 */
942 };  /* Type */
943 
944 struct ipa_filter_spec_ex2_type_v01 {
945 	enum ipa_ip_type_enum_v01 ip_type;
946 	/*	This field identifies the IP type for which this rule is
947 	 *	applicable. The driver needs to identify the filter table
948 	 *	(V6 or V4) and this field is essential for that
949 	 */
950 
951 	struct ipa_filter_rule_req2_type_v01 filter_rule;
952 	/*	This field specifies the rules in the filter spec. These rules
953 	 *	are the ones that are matched against fields in the packet.
954 	 */
955 
956 	enum ipa_filter_action_enum_v01 filter_action;
957 	/*	This field specifies the action to be taken when a filter match
958 	 *	occurs. The remote side should install this information into the
959 	 *	hardware along with the filter equations.
960 	 */
961 
962 	uint8_t is_routing_table_index_valid;
963 	/*	Specifies whether the routing table index is present or not.
964 	 *	If the action is "QMI_IPA_FILTER_ACTION_EXCEPTION", this
965 	 *	parameter need not be provided.
966 	 */
967 
968 	uint32_t route_table_index;
969 	/*	This is the index in the routing table that should be used
970 	 *	to route the packets if the filter rule is hit
971 	 */
972 
973 	uint8_t is_mux_id_valid;
974 	/*	Specifies whether the mux_id is valid */
975 
976 	uint32_t mux_id;
977 	/*	This field identifies the QMAP MUX ID. As a part of QMAP
978 	 *	protocol, several data calls may be multiplexed over the
979 	 *	same physical transport channel. This identifier is used to
980 	 *	identify one such data call. The maximum value for this
981 	 *	identifier is 255.
982 	 */
983 
984 	uint32_t rule_id;
985 	/* Rule Id of the given filter. The Rule Id is populated in the rule
986 	 * header when installing the rule in IPA.
987 	 */
988 
989 	uint8_t is_rule_hashable;
990 	/** Specifies whether the given rule is hashable.
991 	 */
992 };  /* Type */
993 
994 /*  Request Message; This is the message that is exchanged between the
995  *	control point and the service in order to request the installation
996  *	of filtering rules in the hardware block by the remote side.
997  */
998 struct ipa_install_fltr_rule_req_msg_v01 {
999 	/* Optional
1000 	 * IP type that this rule applies to
1001 	 * Filter specification to be installed in the hardware
1002 	 */
1003 	uint8_t filter_spec_list_valid;
1004 	/* Must be set to true if filter_spec_list is being passed */
1005 	uint32_t filter_spec_list_len;
1006 	/* Must be set to # of elements in filter_spec_list */
1007 	struct ipa_filter_spec_type_v01
1008 		filter_spec_list[QMI_IPA_MAX_FILTERS_V01];
1009 	/*	This structure defines the list of filters that have
1010 	 *		to be installed in the hardware. The driver installing
1011 	 *		these rules shall do so in the same order as specified
1012 	 *		in this list.
1013 	 */
1014 
1015 	/* Optional */
1016 	/*  Pipe index to intall rule */
1017 	uint8_t source_pipe_index_valid;
1018 	/* Must be set to true if source_pipe_index is being passed */
1019 	uint32_t source_pipe_index;
1020 	/*	This is the source pipe on which the filter rule is to be
1021 	 *	installed. The requestor may always not know the pipe
1022 	 *	indices. If not specified, the receiver shall install
1023 	 *	this rule on all the pipes that it controls through
1024 	 *	which data may be fed into IPA.
1025 	 */
1026 
1027 	/* Optional */
1028 	/*  Total number of IPv4 filters in the filter spec list */
1029 	uint8_t num_ipv4_filters_valid;
1030 	/* Must be set to true if num_ipv4_filters is being passed */
1031 	uint32_t num_ipv4_filters;
1032 	/*   Number of IPv4 rules included in filter spec list */
1033 
1034 	/* Optional */
1035 	/*  Total number of IPv6 filters in the filter spec list */
1036 	uint8_t num_ipv6_filters_valid;
1037 	/* Must be set to true if num_ipv6_filters is being passed */
1038 	uint32_t num_ipv6_filters;
1039 	/* Number of IPv6 rules included in filter spec list */
1040 
1041 	/* Optional */
1042 	/*  List of XLAT filter indices in the filter spec list */
1043 	uint8_t xlat_filter_indices_list_valid;
1044 	/* Must be set to true if xlat_filter_indices_list
1045 	 * is being passed
1046 	 */
1047 	uint32_t xlat_filter_indices_list_len;
1048 	/* Must be set to # of elements in xlat_filter_indices_list */
1049 	uint32_t xlat_filter_indices_list[QMI_IPA_MAX_FILTERS_V01];
1050 	/* List of XLAT filter indices. Filter rules at specified indices
1051 	 * will need to be modified by the receiver if the PDN is XLAT
1052 	 * before installing them on the associated IPA consumer pipe.
1053 	 */
1054 
1055 	/* Optional */
1056 	/*  Extended Filter Specification */
1057 	uint8_t filter_spec_ex_list_valid;
1058 	/* Must be set to true if filter_spec_ex_list is being passed */
1059 	uint32_t filter_spec_ex_list_len;
1060 	/* Must be set to # of elements in filter_spec_ex_list */
1061 	struct ipa_filter_spec_ex_type_v01
1062 		filter_spec_ex_list[QMI_IPA_MAX_FILTERS_V01];
1063 	/*
1064 	 * List of filter specifications of filters that must be installed in
1065 	 *	the IPAv3.x hardware.
1066 	 *	The driver installing these rules must do so in the same
1067 	 *	order as specified in this list.
1068 	 */
1069 
1070 	/* Optional */
1071 	/*  Extended Type 2 Filter Specification */
1072 	uint8_t filter_spec_ex2_list_valid;
1073 	/* Must be set to true if filter_spec_ex2_list is being passed */
1074 	uint32_t filter_spec_ex2_list_len;
1075 	/* Must be set to # of elements in filter_spec_ex2_list */
1076 	struct ipa_filter_spec_ex2_type_v01
1077 		filter_spec_ex2_list[QMI_IPA_MAX_FILTERS_V01];
1078 
1079 	/* Optional */
1080 	/* List of modem UL Filters in the Spec List which need be to
1081 	 * replicated with AP UL firewall filters
1082 	 */
1083 	uint8_t ul_firewall_indices_list_valid;
1084 	/* Must be set to # of elements in ul_firewall_indices_list */
1085 	uint32_t ul_firewall_indices_list_len;
1086 	uint32_t ul_firewall_indices_list[QMI_IPA_MAX_FILTERS_V01];
1087 	/* List of UL firewall filter indices.
1088 	 * Filter rules at specified indices must be replicated across
1089 	 * the firewall filters by the receiver and installed on the
1090 	 * associated IPA consumer pipe.
1091 	 */
1092 };  /* Message */
1093 
1094 struct ipa_filter_rule_identifier_to_handle_map_v01 {
1095 	uint32_t filter_spec_identifier;
1096 	/*	This field is used to identify a filter spec in the list of
1097 	 *	filter specs being sent from the client. This field is
1098 	 *	applicable only in the filter install request and response.
1099 	 */
1100 	uint32_t filter_handle;
1101 	/*  This field is used to identify a rule in any subsequent message.
1102 	 *	This is a value that is provided by the server to the control
1103 	 *	point
1104 	 */
1105 };  /* Type */
1106 
1107 /* Response Message; This is the message that is exchanged between the
1108  * control point and the service in order to request the
1109  * installation of filtering rules in the hardware block by
1110  * the remote side.
1111  */
1112 struct ipa_install_fltr_rule_resp_msg_v01 {
1113 	/* Mandatory */
1114 	/*  Result Code */
1115 	struct ipa_qmi_response_type_v01 resp;
1116 	/*	Standard response type.
1117 	 *	Standard response type. Contains the following data members:
1118 	 *	- qmi_result_type -- QMI_RESULT_SUCCESS or QMI_RESULT_FAILURE
1119 	 *	- qmi_error_type  -- Error code. Possible error code values are
1120 	 *	described in the error codes section of each message definition.
1121 	 */
1122 
1123 	/* Optional */
1124 	/*  Filter Handle List */
1125 	uint8_t filter_handle_list_valid;
1126 	/* Must be set to true if filter_handle_list is being passed */
1127 	uint32_t filter_handle_list_len;
1128 	/* Must be set to # of elements in filter_handle_list */
1129 	struct ipa_filter_rule_identifier_to_handle_map_v01
1130 		filter_handle_list[QMI_IPA_MAX_FILTERS_V01];
1131 	/*
1132 	 * List of handles returned to the control point. Each handle is
1133 	 *	mapped to the rule identifier that was specified in the
1134 	 *	request message. Any further reference to the rule is done
1135 	 *	using the filter handle.
1136 	 */
1137 
1138 	/* Optional */
1139 	/*  Rule id List */
1140 	uint8_t rule_id_valid;
1141 	/* Must be set to true if rule_id is being passed */
1142 	uint32_t rule_id_len;
1143 	/* Must be set to # of elements in rule_id */
1144 	uint32_t rule_id[QMI_IPA_MAX_FILTERS_V01];
1145 	/*
1146 	 * List of rule ids returned to the control point.
1147 	 *	Any further reference to the rule is done using the
1148 	 *	filter rule id specified in this list.
1149 	 */
1150 };  /* Message */
1151 
1152 struct ipa_filter_handle_to_index_map_v01 {
1153 	uint32_t filter_handle;
1154 	/*	This is a handle that was given to the remote client that
1155 	 *	requested the rule addition.
1156 	 */
1157 	uint32_t filter_index;
1158 	/*	This index denotes the location in a filter table, where the
1159 	 *	filter rule has been installed. The maximum value of this
1160 	 *	field is 64.
1161 	 */
1162 };  /* Type */
1163 
1164 /* Request Message; This is the message that is exchanged between the
1165  * control point and the service in order to notify the remote driver
1166  * of the installation of the filter rule supplied earlier by the
1167  * remote driver.
1168  */
1169 struct ipa_fltr_installed_notif_req_msg_v01 {
1170 	/*	Mandatory	*/
1171 	/*  Pipe index	*/
1172 	uint32_t source_pipe_index;
1173 	/*	This is the source pipe on which the filter rule has been
1174 	 *	installed or was attempted to be installed
1175 	 */
1176 
1177 	/* Mandatory */
1178 	/*  Installation Status */
1179 	enum ipa_qmi_result_type_v01 install_status;
1180 	/*	This is the status of installation. If this indicates
1181 	 *	SUCCESS, other optional fields carry additional
1182 	 *	information
1183 	 */
1184 
1185 	/* Mandatory */
1186 	/*  List of Filter Indices */
1187 	uint32_t filter_index_list_len;
1188 	/* Must be set to # of elements in filter_index_list */
1189 	struct ipa_filter_handle_to_index_map_v01
1190 		filter_index_list[QMI_IPA_MAX_FILTERS_V01];
1191 	/*
1192 	 * Provides the list of filter indices and the corresponding
1193 	 *	filter handle. If the installation_status indicates a
1194 	 *	failure, the filter indices must be set to a reserve
1195 	 *	index (255).
1196 	 */
1197 
1198 	/* Optional */
1199 	/*  Embedded pipe index */
1200 	uint8_t embedded_pipe_index_valid;
1201 	/* Must be set to true if embedded_pipe_index is being passed */
1202 	uint32_t embedded_pipe_index;
1203 	/*	This index denotes the embedded pipe number on which a call to
1204 	 *	the same PDN has been made. If this field is set, it denotes
1205 	 *	that this is a use case where PDN sharing is happening. The
1206 	 *	embedded pipe is used to send data from the embedded client
1207 	 *	in the device
1208 	 */
1209 
1210 	/* Optional */
1211 	/*  Retain Header Configuration */
1212 	uint8_t retain_header_valid;
1213 	/* Must be set to true if retain_header is being passed */
1214 	uint8_t retain_header;
1215 	/*	This field indicates if the driver installing the rule has
1216 	 *	turned on the "retain header" bit. If this is true, the
1217 	 *	header that is removed by IPA is reinserted after the
1218 	 *	packet processing is completed.
1219 	 */
1220 
1221 	/* Optional */
1222 	/*  Embedded call Mux Id */
1223 	uint8_t embedded_call_mux_id_valid;
1224 	/**< Must be set to true if embedded_call_mux_id is being passed */
1225 	uint32_t embedded_call_mux_id;
1226 	/*	This identifies one of the many calls that have been originated
1227 	 *	on the embedded pipe. This is how we identify the PDN gateway
1228 	 *	to which traffic from the source pipe has to flow.
1229 	 */
1230 
1231 	/* Optional */
1232 	/*  Total number of IPv4 filters in the filter index list */
1233 	uint8_t num_ipv4_filters_valid;
1234 	/* Must be set to true if num_ipv4_filters is being passed */
1235 	uint32_t num_ipv4_filters;
1236 	/* Number of IPv4 rules included in filter index list */
1237 
1238 	/* Optional */
1239 	/*  Total number of IPv6 filters in the filter index list */
1240 	uint8_t num_ipv6_filters_valid;
1241 	/* Must be set to true if num_ipv6_filters is being passed */
1242 	uint32_t num_ipv6_filters;
1243 	/* Number of IPv6 rules included in filter index list */
1244 
1245 	/* Optional */
1246 	/*  Start index on IPv4 filters installed on source pipe */
1247 	uint8_t start_ipv4_filter_idx_valid;
1248 	/* Must be set to true if start_ipv4_filter_idx is being passed */
1249 	uint32_t start_ipv4_filter_idx;
1250 	/* Start index of IPv4 rules in filter index list */
1251 
1252 	/* Optional */
1253 	/*  Start index on IPv6 filters installed on source pipe */
1254 	uint8_t start_ipv6_filter_idx_valid;
1255 	/* Must be set to true if start_ipv6_filter_idx is being passed */
1256 	uint32_t start_ipv6_filter_idx;
1257 	/* Start index of IPv6 rules in filter index list */
1258 
1259 	/* Optional */
1260 	/*  List of Rule Ids */
1261 	uint8_t rule_id_valid;
1262 	/* Must be set to true if rule_id is being passed */
1263 	uint32_t rule_id_len;
1264 	/* Must be set to # of elements in rule_id */
1265 	uint32_t rule_id[QMI_IPA_MAX_FILTERS_V01];
1266 	/*
1267 	 * Provides the list of Rule Ids of rules added in IPA on the given
1268 	 *	source pipe index. If the install_status TLV indicates a
1269 	 *	failure, the Rule Ids in this list must be set to a reserved
1270 	 *	index (255).
1271 	 */
1272 
1273 	/* Optional */
1274 	/*	List of destination pipe IDs. */
1275 	uint8_t dst_pipe_id_valid;
1276 	/* Must be set to true if dst_pipe_id is being passed. */
1277 	uint32_t dst_pipe_id_len;
1278 	/* Must be set to # of elements in dst_pipe_id. */
1279 	uint32_t dst_pipe_id[QMI_IPA_MAX_CLIENT_DST_PIPES_V01];
1280 	/* Provides the list of destination pipe IDs for a source pipe. */
1281 
1282 	/* Optional */
1283 	/*  List of Rule IDs extended */
1284 	uint8_t rule_id_ex_valid;
1285 	/* Must be set to true if rule_id_ex is being passed. */
1286 	uint32_t rule_id_ex_len;
1287 	/* Must be set to # of elements in rule_id_ex */
1288 	uint32_t rule_id_ex[QMI_IPA_MAX_FILTERS_EX2_V01];
1289 	/* Provides the list of Rule IDs of rules added in IPA on the
1290 	 * given source pipe index. If the install_status TLV indicates
1291 	 * a failure, the Rule IDs in this list must be set to a
1292 	 * reserved index (255).
1293 	 */
1294 };  /* Message */
1295 
1296 /* Response Message; This is the message that is exchanged between the
1297  * control point and the service in order to notify the remote driver
1298  * of the installation of the filter rule supplied earlier by the
1299  * remote driver.
1300  */
1301 struct ipa_fltr_installed_notif_resp_msg_v01 {
1302 	/* Mandatory */
1303 	/*  Result Code */
1304 	struct ipa_qmi_response_type_v01 resp;
1305 	/*	Standard response type */
1306 };  /* Message */
1307 
1308 /* Request Message; Notifies the remote driver of the need to clear the data
1309  * path to prevent the IPA from being blocked at the head of the processing
1310  * pipeline
1311  */
1312 struct ipa_enable_force_clear_datapath_req_msg_v01 {
1313 	/* Mandatory */
1314 	/*  Pipe Mask */
1315 	uint32_t source_pipe_bitmask;
1316 	/* Set of consumer (source) pipes that must be clear of
1317 	 * active data transfers.
1318 	 */
1319 
1320 	/* Mandatory */
1321 	/* Request ID */
1322 	uint32_t request_id;
1323 	/* Identifies the ID of the request that is sent to the server
1324 	 * The same request ID is used in the message to remove the force_clear
1325 	 * request. The server is expected to keep track of the request ID and
1326 	 * the source_pipe_bitmask so that it can revert as needed
1327 	 */
1328 
1329 	/* Optional */
1330 	/*  Source Throttle State */
1331 	uint8_t throttle_source_valid;
1332 	/* Must be set to true if throttle_source is being passed */
1333 	uint8_t throttle_source;
1334 	/*  Specifies whether the server is to throttle the data from
1335 	 *	these consumer (source) pipes after clearing the exisiting
1336 	 *	data present in the IPA that were pulled from these pipes
1337 	 *	The server is expected to put all the source pipes in the
1338 	 *	source_pipe_bitmask in the same state
1339 	 */
1340 };  /* Message */
1341 
1342 /* Response Message; Notifies the remote driver of the need to clear the
1343  * data path to prevent the IPA from being blocked at the head of the
1344  * processing pipeline
1345  */
1346 struct ipa_enable_force_clear_datapath_resp_msg_v01 {
1347 	/* Mandatory */
1348 	/*  Result Code */
1349 	struct ipa_qmi_response_type_v01 resp;
1350 	/* Standard response type */
1351 };  /* Message */
1352 
1353 /* Request Message; Notifies the remote driver that the forceful clearing
1354  * of the data path can be lifted
1355  */
1356 struct ipa_disable_force_clear_datapath_req_msg_v01 {
1357 	/* Mandatory */
1358 	/* Request ID */
1359 	uint32_t request_id;
1360 	/* Identifies the request that was sent to the server to
1361 	 * forcibly clear the data path. This request simply undoes
1362 	 * the operation done in that request
1363 	 */
1364 };  /* Message */
1365 
1366 /* Response Message; Notifies the remote driver that the forceful clearing
1367  * of the data path can be lifted
1368  */
1369 struct ipa_disable_force_clear_datapath_resp_msg_v01 {
1370 	/* Mandatory */
1371 	/*  Result Code */
1372 	struct ipa_qmi_response_type_v01 resp;
1373 	/* Standard response type */
1374 };  /* Message */
1375 
1376 enum ipa_peripheral_speed_enum_v01 {
1377 	IPA_PERIPHERAL_SPEED_ENUM_MIN_ENUM_VAL_V01 = -2147483647,
1378 	/* To force a 32 bit signed enum.  Do not change or use */
1379 	QMI_IPA_PER_USB_FS_V01 = 1,
1380 	/*  Full-speed USB connection */
1381 	QMI_IPA_PER_USB_HS_V01 = 2,
1382 	/*  High-speed USB connection */
1383 	QMI_IPA_PER_USB_SS_V01 = 3,
1384 	/*  Super-speed USB connection */
1385 	QMI_IPA_PER_WLAN_V01 = 4,
1386 	/*  WLAN connection */
1387 	IPA_PERIPHERAL_SPEED_ENUM_MAX_ENUM_VAL_V01 = 2147483647
1388 	/* To force a 32 bit signed enum.  Do not change or use*/
1389 };
1390 
1391 enum ipa_pipe_mode_enum_v01 {
1392 	IPA_PIPE_MODE_ENUM_MIN_ENUM_VAL_V01 = -2147483647,
1393 	/* To force a 32 bit signed enum.  Do not change or use */
1394 	QMI_IPA_PIPE_MODE_HW_V01 = 1,
1395 	/*  Pipe is connected with a hardware block */
1396 	QMI_IPA_PIPE_MODE_SW_V01 = 2,
1397 	/*  Pipe is controlled by the software */
1398 	IPA_PIPE_MODE_ENUM_MAX_ENUM_VAL_V01 = 2147483647
1399 	/* To force a 32 bit signed enum.  Do not change or use */
1400 };
1401 
1402 enum ipa_peripheral_type_enum_v01 {
1403 	IPA_PERIPHERAL_TYPE_ENUM_MIN_ENUM_VAL_V01 = -2147483647,
1404 	/* To force a 32 bit signed enum.  Do not change or use */
1405 	QMI_IPA_PERIPHERAL_USB_V01 = 1,
1406 	/*  Specifies a USB peripheral */
1407 	QMI_IPA_PERIPHERAL_HSIC_V01 = 2,
1408 	/*  Specifies an HSIC peripheral */
1409 	QMI_IPA_PERIPHERAL_PCIE_V01 = 3,
1410 	/*  Specifies a PCIe	peripheral */
1411 	IPA_PERIPHERAL_TYPE_ENUM_MAX_ENUM_VAL_V01 = 2147483647
1412 	/* To force a 32 bit signed enum.  Do not change or use */
1413 };
1414 
1415 struct ipa_config_req_msg_v01 {
1416 	/* Optional */
1417 	/*  Peripheral Type */
1418 	uint8_t peripheral_type_valid;
1419 	/* Must be set to true if peripheral_type is being passed */
1420 	enum ipa_peripheral_type_enum_v01 peripheral_type;
1421 	/* Informs the remote driver about the perhipheral for
1422 	 * which this configuration information is relevant. Values:
1423 	 *	- QMI_IPA_PERIPHERAL_USB (1) -- Specifies a USB peripheral
1424 	 *	- QMI_IPA_PERIPHERAL_HSIC(2) -- Specifies an HSIC peripheral
1425 	 *	- QMI_IPA_PERIPHERAL_PCIE(3) -- Specifies a PCIe peripheral
1426 	 */
1427 
1428 	/* Optional */
1429 	/*  HW Deaggregation Support */
1430 	uint8_t hw_deaggr_supported_valid;
1431 	/* Must be set to true if hw_deaggr_supported is being passed */
1432 	uint8_t hw_deaggr_supported;
1433 	/* Informs the remote driver whether the local IPA driver
1434 	 * allows de-aggregation to be performed in the hardware
1435 	 */
1436 
1437 	/* Optional */
1438 	/*  Maximum Aggregation Frame Size */
1439 	uint8_t max_aggr_frame_size_valid;
1440 	/* Must be set to true if max_aggr_frame_size is being passed */
1441 	uint32_t max_aggr_frame_size;
1442 	/* Specifies the maximum size of the aggregated frame that
1443 	 * the remote driver can expect from this execution environment
1444 	 *	- Valid range: 128 bytes to 32768 bytes
1445 	 */
1446 
1447 	/* Optional */
1448 	/*  IPA Ingress Pipe Mode */
1449 	uint8_t ipa_ingress_pipe_mode_valid;
1450 	/* Must be set to true if ipa_ingress_pipe_mode is being passed */
1451 
1452 	enum ipa_pipe_mode_enum_v01 ipa_ingress_pipe_mode;
1453 	/* Indicates to the remote driver if the ingress pipe into the
1454 	 *	IPA is in direct connection with another hardware block or
1455 	 *	if the producer of data to this ingress pipe is a software
1456 	 *  module. Values:
1457 	 *	-QMI_IPA_PIPE_MODE_HW(1) --Pipe is connected with hardware block
1458 	 *	-QMI_IPA_PIPE_MODE_SW(2) --Pipe is controlled by the software
1459 	 */
1460 
1461 	/* Optional */
1462 	/*  Peripheral Speed Info */
1463 	uint8_t peripheral_speed_info_valid;
1464 	/* Must be set to true if peripheral_speed_info is being passed */
1465 
1466 	enum ipa_peripheral_speed_enum_v01 peripheral_speed_info;
1467 	/* Indicates the speed that the peripheral connected to the IPA supports
1468 	 * Values:
1469 	 *	- QMI_IPA_PER_USB_FS (1) --  Full-speed USB connection
1470 	 *	- QMI_IPA_PER_USB_HS (2) --  High-speed USB connection
1471 	 *	- QMI_IPA_PER_USB_SS (3) --  Super-speed USB connection
1472 	 *  - QMI_IPA_PER_WLAN   (4) --  WLAN connection
1473 	 */
1474 
1475 	/* Optional */
1476 	/*  Downlink Accumulation Time limit */
1477 	uint8_t dl_accumulation_time_limit_valid;
1478 	/* Must be set to true if dl_accumulation_time_limit is being passed */
1479 	uint32_t dl_accumulation_time_limit;
1480 	/* Informs the remote driver about the time for which data
1481 	 * is accumulated in the downlink direction before it is pushed into the
1482 	 * IPA (downlink is with respect to the WWAN air interface)
1483 	 * - Units: milliseconds
1484 	 * - Maximum value: 255
1485 	 */
1486 
1487 	/* Optional */
1488 	/*  Downlink Accumulation Packet limit */
1489 	uint8_t dl_accumulation_pkt_limit_valid;
1490 	/* Must be set to true if dl_accumulation_pkt_limit is being passed */
1491 	uint32_t dl_accumulation_pkt_limit;
1492 	/* Informs the remote driver about the number of packets
1493 	 * that are to be accumulated in the downlink direction before it is
1494 	 * pushed into the IPA - Maximum value: 1023
1495 	 */
1496 
1497 	/* Optional */
1498 	/*  Downlink Accumulation Byte Limit */
1499 	uint8_t dl_accumulation_byte_limit_valid;
1500 	/* Must be set to true if dl_accumulation_byte_limit is being passed */
1501 	uint32_t dl_accumulation_byte_limit;
1502 	/* Inform the remote driver about the number of bytes
1503 	 * that are to be accumulated in the downlink direction before it
1504 	 * is pushed into the IPA - Maximum value: TBD
1505 	 */
1506 
1507 	/* Optional */
1508 	/*  Uplink Accumulation Time Limit */
1509 	uint8_t ul_accumulation_time_limit_valid;
1510 	/* Must be set to true if ul_accumulation_time_limit is being passed */
1511 	uint32_t ul_accumulation_time_limit;
1512 	/* Inform thes remote driver about the time for which data
1513 	 * is to be accumulated in the uplink direction before it is pushed into
1514 	 * the IPA (downlink is with respect to the WWAN air interface).
1515 	 * - Units: milliseconds
1516 	 * - Maximum value: 255
1517 	 */
1518 
1519 	/* Optional */
1520 	/*  HW Control Flags */
1521 	uint8_t hw_control_flags_valid;
1522 	/* Must be set to true if hw_control_flags is being passed */
1523 	uint32_t hw_control_flags;
1524 	/* Informs the remote driver about the hardware control flags:
1525 	 *	- Bit 0: IPA_HW_FLAG_HALT_SYSTEM_ON_NON_TERMINAL_FAILURE --
1526 	 *	Indicates to the hardware that it must not continue with
1527 	 *	any subsequent operation even if the failure is not terminal
1528 	 *	- Bit 1: IPA_HW_FLAG_NO_REPORT_MHI_CHANNEL_ERORR --
1529 	 *	Indicates to the hardware that it is not required to report
1530 	 *	channel errors to the host.
1531 	 *	- Bit 2: IPA_HW_FLAG_NO_REPORT_MHI_CHANNEL_WAKE_UP --
1532 	 *	Indicates to the hardware that it is not required to generate
1533 	 *	wake-up events to the host.
1534 	 *	- Bit 4: IPA_HW_FLAG_WORK_OVER_DDR --
1535 	 *	Indicates to the hardware that it is accessing addresses in
1536 	 *  the DDR and not over PCIe
1537 	 *	- Bit 5: IPA_HW_FLAG_INTERRUPT_MODE_CTRL_FLAG --
1538 	 *	Indicates whether the device must
1539 	 *	raise an event to let the host know that it is going into an
1540 	 *	interrupt mode (no longer polling for data/buffer availability)
1541 	 */
1542 
1543 	/* Optional */
1544 	/*  Uplink MSI Event Threshold */
1545 	uint8_t ul_msi_event_threshold_valid;
1546 	/* Must be set to true if ul_msi_event_threshold is being passed */
1547 	uint32_t ul_msi_event_threshold;
1548 	/* Informs the remote driver about the threshold that will
1549 	 * cause an interrupt (MSI) to be fired to the host. This ensures
1550 	 * that the remote driver does not accumulate an excesive number of
1551 	 * events before firing an interrupt.
1552 	 * This threshold is applicable for data moved in the UL direction.
1553 	 * - Maximum value: 65535
1554 	 */
1555 
1556 	/* Optional */
1557 	/*  Downlink MSI Event Threshold */
1558 	uint8_t dl_msi_event_threshold_valid;
1559 	/* Must be set to true if dl_msi_event_threshold is being passed */
1560 	uint32_t dl_msi_event_threshold;
1561 	/* Informs the remote driver about the threshold that will
1562 	 * cause an interrupt (MSI) to be fired to the host. This ensures
1563 	 * that the remote driver does not accumulate an excesive number of
1564 	 * events before firing an interrupt
1565 	 * This threshold is applicable for data that is moved in the
1566 	 * DL direction - Maximum value: 65535
1567 	 */
1568 
1569 	/* Optional */
1570 	/*  Uplink Fifo Size */
1571 	uint8_t ul_fifo_size_valid;
1572 	/* Must be set to true if ul_fifo_size is being passed */
1573 	uint32_t ul_fifo_size;
1574 	/*
1575 	 * Informs the remote driver about the total Uplink xDCI
1576 	 *	buffer size that holds the complete aggregated frame
1577 	 *	or BAM data fifo size of the peripheral channel/pipe(in Bytes).
1578 	 *	This deprecates the max_aggr_frame_size field. This TLV
1579 	 *	deprecates max_aggr_frame_size TLV from version 1.9 onwards
1580 	 *	and the max_aggr_frame_size TLV will be ignored in the presence
1581 	 *	of this TLV.
1582 	 */
1583 
1584 	/* Optional */
1585 	/*  Downlink Fifo Size */
1586 	uint8_t dl_fifo_size_valid;
1587 	/* Must be set to true if dl_fifo_size is being passed */
1588 	uint32_t dl_fifo_size;
1589 	/*
1590 	 * Informs the remote driver about the total Downlink xDCI buffering
1591 	 *	capacity or BAM data fifo size of the peripheral channel/pipe.
1592 	 *	(In Bytes). dl_fifo_size = n * dl_buf_size. This deprecates the
1593 	 *	max_aggr_frame_size field. If this value is set
1594 	 *	max_aggr_frame_size is ignored.
1595 	 */
1596 
1597 	/* Optional */
1598 	/*  Downlink Buffer Size */
1599 	uint8_t dl_buf_size_valid;
1600 	/* Must be set to true if dl_buf_size is being passed */
1601 	uint32_t dl_buf_size;
1602 	/* Informs the remote driver about the single xDCI buffer size.
1603 	 * This is applicable only in GSI mode(in Bytes).\n
1604 	 */
1605 };  /* Message */
1606 
1607 /* Response Message; Notifies the remote driver of the configuration
1608  * information
1609  */
1610 struct ipa_config_resp_msg_v01 {
1611 	/* Mandatory */
1612 	/*  Result Code */
1613 	struct ipa_qmi_response_type_v01 resp;
1614 	/**<   Standard response type.*/
1615 }; /* Message */
1616 
1617 enum ipa_stats_type_enum_v01 {
1618 	IPA_STATS_TYPE_ENUM_MIN_ENUM_VAL_V01 = -2147483647,
1619 	/* To force a 32 bit signed enum.  Do not change or use */
1620 	QMI_IPA_STATS_TYPE_INVALID_V01 = 0,
1621 	/* Invalid stats type identifier */
1622 	QMI_IPA_STATS_TYPE_PIPE_V01 = 1,
1623 	/* Pipe stats type */
1624 	QMI_IPA_STATS_TYPE_FILTER_RULES_V01 = 2,
1625 	/* Filter rule stats type */
1626 	IPA_STATS_TYPE_ENUM_MAX_ENUM_VAL_V01 = 2147483647
1627 	/* To force a 32 bit signed enum.  Do not change or use */
1628 };
1629 
1630 struct ipa_pipe_stats_info_type_v01 {
1631 	uint32_t pipe_index;
1632 	/* Pipe index for statistics to be retrieved. */
1633 
1634 	uint64_t num_ipv4_packets;
1635 	/* Accumulated number of IPv4 packets over this pipe. */
1636 
1637 	uint64_t num_ipv4_bytes;
1638 	/* Accumulated number of IPv4 bytes over this pipe. */
1639 
1640 	uint64_t num_ipv6_packets;
1641 	/* Accumulated number of IPv6 packets over this pipe. */
1642 
1643 	uint64_t num_ipv6_bytes;
1644 	/* Accumulated number of IPv6 bytes over this pipe. */
1645 };
1646 
1647 struct ipa_stats_type_filter_rule_v01 {
1648 	uint32_t filter_rule_index;
1649 	/* Filter rule index for statistics to be retrieved. */
1650 
1651 	uint64_t num_packets;
1652 	/* Accumulated number of packets over this filter rule. */
1653 };
1654 
1655 /* Request Message; Retrieve the data statistics collected on modem
1656  * IPA driver.
1657  */
1658 struct ipa_get_data_stats_req_msg_v01 {
1659 	/* Mandatory */
1660 	/*  Stats Type  */
1661 	enum ipa_stats_type_enum_v01 ipa_stats_type;
1662 	/* Indicates the type of statistics to be retrieved. */
1663 
1664 	/* Optional */
1665 	/* Reset Statistics */
1666 	uint8_t reset_stats_valid;
1667 	/* Must be set to true if reset_stats is being passed */
1668 	uint8_t reset_stats;
1669 	/* Option to reset the specific type of data statistics
1670 	 * currently collected.
1671 	 */
1672 };  /* Message */
1673 
1674 /* Response Message; Retrieve the data statistics collected
1675  * on modem IPA driver.
1676  */
1677 struct ipa_get_data_stats_resp_msg_v01 {
1678 	/* Mandatory */
1679 	/*  Result Code */
1680 	struct ipa_qmi_response_type_v01 resp;
1681 	/* Standard response type. */
1682 
1683 	/* Optional */
1684 	/*  Stats Type  */
1685 	uint8_t ipa_stats_type_valid;
1686 	/* Must be set to true if ipa_stats_type is passed */
1687 	enum ipa_stats_type_enum_v01 ipa_stats_type;
1688 	/* Indicates the type of statistics that are retrieved. */
1689 
1690 	/* Optional */
1691 	/*  Uplink Source Pipe Statistics List */
1692 	uint8_t ul_src_pipe_stats_list_valid;
1693 	/* Must be set to true if ul_src_pipe_stats_list is being passed */
1694 	uint32_t ul_src_pipe_stats_list_len;
1695 	/* Must be set to # of elements in ul_src_pipe_stats_list */
1696 	struct ipa_pipe_stats_info_type_v01
1697 		ul_src_pipe_stats_list[QMI_IPA_MAX_PIPES_V01];
1698 	/* List of all Uplink pipe statistics that are retrieved. */
1699 
1700 	/* Optional */
1701 	/*  Downlink Destination Pipe Statistics List */
1702 	uint8_t dl_dst_pipe_stats_list_valid;
1703 	/* Must be set to true if dl_dst_pipe_stats_list is being passed */
1704 	uint32_t dl_dst_pipe_stats_list_len;
1705 	/* Must be set to # of elements in dl_dst_pipe_stats_list */
1706 	struct ipa_pipe_stats_info_type_v01
1707 		dl_dst_pipe_stats_list[QMI_IPA_MAX_PIPES_V01];
1708 	/* List of all Downlink pipe statistics that are retrieved. */
1709 
1710 	/* Optional */
1711 	/*  Downlink Filter Rule Stats List */
1712 	uint8_t dl_filter_rule_stats_list_valid;
1713 	/* Must be set to true if dl_filter_rule_stats_list is being passed */
1714 	uint32_t dl_filter_rule_stats_list_len;
1715 	/* Must be set to # of elements in dl_filter_rule_stats_list */
1716 	struct ipa_stats_type_filter_rule_v01
1717 		dl_filter_rule_stats_list[QMI_IPA_MAX_FILTERS_V01];
1718 	/* List of all Downlink filter rule statistics retrieved. */
1719 };  /* Message */
1720 
1721 struct ipa_apn_data_stats_info_type_v01 {
1722 	uint32_t mux_id;
1723 	/* Indicates the MUX ID associated with the APN for which the data
1724 	 * usage statistics is queried
1725 	 */
1726 
1727 	uint64_t num_ul_packets;
1728 	/* Accumulated number of uplink packets corresponding to
1729 	 * this Mux ID
1730 	 */
1731 
1732 	uint64_t num_ul_bytes;
1733 	/* Accumulated number of uplink bytes corresponding to
1734 	 * this Mux ID
1735 	 */
1736 
1737 	uint64_t num_dl_packets;
1738 	/* Accumulated number of downlink packets corresponding
1739 	 * to this Mux ID
1740 	 */
1741 
1742 	uint64_t num_dl_bytes;
1743 	/* Accumulated number of downlink bytes corresponding to
1744 	 * this Mux ID
1745 	 */
1746 };  /* Type */
1747 
1748 /* Request Message; Retrieve the APN data statistics collected from modem */
1749 struct ipa_get_apn_data_stats_req_msg_v01 {
1750 	/* Optional */
1751 	/*  Mux ID List */
1752 	uint8_t mux_id_list_valid;
1753 	/* Must be set to true if mux_id_list is being passed */
1754 	uint32_t mux_id_list_len;
1755 	/* Must be set to # of elements in mux_id_list */
1756 	uint32_t mux_id_list[QMI_IPA_MAX_APN_V01];
1757 	/* The list of MUX IDs associated with APNs for which the data usage
1758 	 * statistics is being retrieved
1759 	 */
1760 };  /* Message */
1761 
1762 /* Response Message; Retrieve the APN data statistics collected from modem */
1763 struct ipa_get_apn_data_stats_resp_msg_v01 {
1764 	/* Mandatory */
1765 	/*  Result Code */
1766 	struct ipa_qmi_response_type_v01 resp;
1767 	/* Standard response type.*/
1768 
1769 	/* Optional */
1770 	/* APN Data Statistics List */
1771 	uint8_t apn_data_stats_list_valid;
1772 	/* Must be set to true if apn_data_stats_list is being passed */
1773 	uint32_t apn_data_stats_list_len;
1774 	/* Must be set to # of elements in apn_data_stats_list */
1775 	struct ipa_apn_data_stats_info_type_v01
1776 		apn_data_stats_list[QMI_IPA_MAX_APN_V01];
1777 	/* List of APN data retrieved as per request on mux_id.
1778 	 * For now, only one APN monitoring is supported on modem driver.
1779 	 * Making this as list for expandability to support more APNs in future.
1780 	 */
1781 };  /* Message */
1782 
1783 struct ipa_data_usage_quota_info_type_v01 {
1784 	uint32_t mux_id;
1785 	/* Indicates the MUX ID associated with the APN for which the data usage
1786 	 * quota needs to be set
1787 	 */
1788 
1789 	uint64_t num_Mbytes;
1790 	/* Number of Mega-bytes of quota value to be set on this APN associated
1791 	 * with this Mux ID.
1792 	 */
1793 };  /* Type */
1794 
1795 /* Request Message; Master driver sets a data usage quota value on
1796  * modem driver
1797  */
1798 struct ipa_set_data_usage_quota_req_msg_v01 {
1799 	/* Optional */
1800 	/* APN Quota List */
1801 	uint8_t apn_quota_list_valid;
1802 	/* Must be set to true if apn_quota_list is being passed */
1803 	uint32_t apn_quota_list_len;
1804 	/* Must be set to # of elements in apn_quota_list */
1805 	struct ipa_data_usage_quota_info_type_v01
1806 		apn_quota_list[QMI_IPA_MAX_APN_V01];
1807 	/* The list of APNs on which a data usage quota to be set on modem
1808 	 * driver. For now, only one APN monitoring is supported on modem
1809 	 * driver. Making this as list for expandability to support more
1810 	 * APNs in future.
1811 	 */
1812 };  /* Message */
1813 
1814 /* Response Message; Master driver sets a data usage on modem driver. */
1815 struct ipa_set_data_usage_quota_resp_msg_v01 {
1816 	/* Mandatory */
1817 	/* Result Code */
1818 	struct ipa_qmi_response_type_v01 resp;
1819 	/* Standard response type.*/
1820 };  /* Message */
1821 
1822 /* Indication Message; Modem driver sends this indication to master
1823  * driver when the data usage quota is reached
1824  */
1825 struct ipa_data_usage_quota_reached_ind_msg_v01 {
1826 	/* Mandatory */
1827 	/*  APN Quota List */
1828 	struct ipa_data_usage_quota_info_type_v01 apn;
1829 	/* This message indicates which APN has the previously set quota
1830 	 * reached. For now, only one APN monitoring is supported on modem
1831 	 * driver.
1832 	 */
1833 };  /* Message */
1834 
1835 /* Request Message; Master driver request modem driver to terminate
1836  * the current data usage quota monitoring session.
1837  */
1838 struct ipa_stop_data_usage_quota_req_msg_v01 {
1839 	/* This element is a placeholder to prevent the declaration of
1840 	 *  an empty struct.  DO NOT USE THIS FIELD UNDER ANY CIRCUMSTANCE
1841 	 */
1842 	char __placeholder;
1843 };  /* Message */
1844 
1845 /* Response Message; Master driver request modem driver to terminate
1846  * the current quota monitoring session.
1847  */
1848 struct ipa_stop_data_usage_quota_resp_msg_v01 {
1849 	/* Mandatory */
1850 	/*  Result Code */
1851 	struct ipa_qmi_response_type_v01 resp;
1852 	/**<   Standard response type.*/
1853 };  /* Message */
1854 
1855 /* Request Message; Request from Modem IPA driver to set DPL peripheral pipe */
1856 struct ipa_install_fltr_rule_req_ex_msg_v01 {
1857 
1858 	/* Optional */
1859 	/*  Extended Filter Specification  */
1860 	uint8_t filter_spec_ex_list_valid;
1861 	uint32_t filter_spec_ex_list_len;
1862 	struct ipa_filter_spec_ex_type_v01
1863 		filter_spec_ex_list[QMI_IPA_MAX_FILTERS_EX_V01];
1864 	/* List of filter specifications of filters that must be installed in
1865 	 * the IPAv3.x hardware.
1866 	 * The driver installing these rules must do so in the same order as
1867 	 * specified in this list.
1868 	 */
1869 
1870 	/* Optional */
1871 	/* Pipe Index to Install Rule */
1872 	uint8_t source_pipe_index_valid;
1873 	uint32_t source_pipe_index;
1874 	/* Pipe index to install the filter rule.
1875 	 * The requester may not always know the pipe indices. If not specified,
1876 	 * the receiver must install this rule on all pipes that it controls,
1877 	 * through which data may be fed into the IPA.
1878 	 */
1879 
1880 	/* Optional */
1881 	/* Total Number of IPv4 Filters in the Filter Spec List */
1882 	uint8_t num_ipv4_filters_valid;
1883 	uint32_t num_ipv4_filters;
1884 	/* Number of IPv4 rules included in the filter specification list. */
1885 
1886 	/* Optional */
1887 	/* Total Number of IPv6 Filters in the Filter Spec List */
1888 	uint8_t num_ipv6_filters_valid;
1889 	uint32_t num_ipv6_filters;
1890 	/* Number of IPv6 rules included in the filter specification list. */
1891 
1892 	/* Optional */
1893 	/* List of XLAT Filter Indices in the Filter Spec List */
1894 	uint8_t xlat_filter_indices_list_valid;
1895 	uint32_t xlat_filter_indices_list_len;
1896 	uint32_t xlat_filter_indices_list[QMI_IPA_MAX_FILTERS_EX_V01];
1897 	/* List of XLAT filter indices.
1898 	 * Filter rules at specified indices must be modified by the
1899 	 * receiver if the PDN is XLAT before installing them on the associated
1900 	 * IPA consumer pipe.
1901 	 */
1902 
1903 	/* Optional */
1904 	/* Extended Type 2 Filter Specification */
1905 	uint8_t filter_spec_ex2_list_valid;
1906 	/* Must be set to true if filter_spec_ex2_list is being passed */
1907 	uint32_t filter_spec_ex2_list_len;
1908 	/* Must be set to # of elements in filter_spec_ex2_list */
1909 	struct ipa_filter_spec_ex2_type_v01
1910 		filter_spec_ex2_list[QMI_IPA_MAX_FILTERS_V01];
1911 	/* Optional */
1912 	/* List of modem UL Filters in the Spec List which need be to
1913 	 * replicated with AP UL firewall filters
1914 	 */
1915 	uint8_t ul_firewall_indices_list_valid;
1916 	/* Must be set to # of elements in ul_firewall_indices_list */
1917 	uint32_t ul_firewall_indices_list_len;
1918 	uint32_t ul_firewall_indices_list[QMI_IPA_MAX_FILTERS_V01];
1919 	/* List of UL firewall filter indices.
1920 	 * Filter rules at specified indices must be replicated across
1921 	 * the firewall filters by the receiver and installed on the
1922 	 * associated IPA consumer pipe.
1923 	 */
1924 };  /* Message */
1925 
1926 /* Response Message; Requests installation of filtering rules in the hardware
1927  * block on the remote side.
1928  */
1929 struct ipa_install_fltr_rule_resp_ex_msg_v01 {
1930 	/* Mandatory */
1931 	/* Result Code */
1932 	struct ipa_qmi_response_type_v01 resp;
1933 	/* Standard response type.
1934 	 * Standard response type. Contains the following data members:
1935 	 * - qmi_result_type -- QMI_RESULT_SUCCESS or QMI_RESULT_FAILURE
1936 	 * - qmi_error_type  -- Error code. Possible error code values are
1937 	 *					 described in the error codes
1938 	 *					 section of each message
1939 	 *					 definition.
1940 	 */
1941 
1942 	/* Optional */
1943 	/* Rule ID List */
1944 	uint8_t rule_id_valid;
1945 	uint32_t rule_id_len;
1946 	uint32_t rule_id[QMI_IPA_MAX_FILTERS_EX_V01];
1947 	/* List of rule IDs returned to the control point.
1948 	 * Any further reference to the rule is done using the filter rule ID
1949 	 * specified in this list.
1950 	 */
1951 };  /* Message */
1952 
1953 /*
1954  * Request Message; Requests the modem IPA driver to enable or
1955  * disable collection of per client statistics.
1956  */
1957 struct ipa_enable_per_client_stats_req_msg_v01 {
1958 
1959 	/* Mandatory */
1960 	/* Collect statistics per client; */
1961 	uint8_t enable_per_client_stats;
1962 	/*
1963 	 * Indicates whether to start or stop collecting
1964 	 * per client statistics.
1965 	 */
1966 };  /* Message */
1967 
1968 /*
1969  * Response Message; Requests the modem IPA driver to enable or disable
1970  * collection of per client statistics.
1971  */
1972 struct ipa_enable_per_client_stats_resp_msg_v01 {
1973 
1974 	/* Mandatory */
1975 	/*  Result Code */
1976 	struct ipa_qmi_response_type_v01 resp;
1977 	/* Standard response type. */
1978 };  /* Message */
1979 
1980 struct ipa_per_client_stats_info_type_v01 {
1981 
1982 	uint32_t client_id;
1983 	/*
1984 	 * Id of the client on APPS processor side for which Modem processor
1985 	 * needs to send uplink/downlink statistics.
1986 	 */
1987 
1988 	uint32_t src_pipe_id;
1989 	/*
1990 	 * IPA consumer pipe on which client on APPS side sent uplink
1991 	 * data to modem.
1992 	 */
1993 
1994 	uint64_t num_ul_ipv4_bytes;
1995 	/*
1996 	 * Accumulated number of uplink IPv4 bytes for a client.
1997 	 */
1998 
1999 	uint64_t num_ul_ipv6_bytes;
2000 	/*
2001 	 * Accumulated number of uplink IPv6 bytes for a client.
2002 	 */
2003 
2004 	uint64_t num_dl_ipv4_bytes;
2005 	/*
2006 	 * Accumulated number of downlink IPv4 bytes for a client.
2007 	 */
2008 
2009 	uint64_t num_dl_ipv6_bytes;
2010 	/*
2011 	 * Accumulated number of downlink IPv6 byes for a client.
2012 	 */
2013 
2014 
2015 	uint32_t num_ul_ipv4_pkts;
2016 	/*
2017 	 * Accumulated number of uplink IPv4 packets for a client.
2018 	 */
2019 
2020 	uint32_t num_ul_ipv6_pkts;
2021 	/*
2022 	 * Accumulated number of uplink IPv6 packets for a client.
2023 	 */
2024 
2025 	uint32_t num_dl_ipv4_pkts;
2026 	/*
2027 	 * Accumulated number of downlink IPv4 packets for a client.
2028 	 */
2029 
2030 	uint32_t num_dl_ipv6_pkts;
2031 	/*
2032 	 * Accumulated number of downlink IPv6 packets for a client.
2033 	 */
2034 };  /* Type */
2035 
2036 /*
2037  * Request Message; Requests the modem IPA driver to provide statistics
2038  * for a givenclient.
2039  */
2040 struct ipa_get_stats_per_client_req_msg_v01 {
2041 
2042 	/* Mandatory */
2043 	/*  Client id */
2044 	uint32_t client_id;
2045 	/*
2046 	 * Id of the client on APPS processor side for which Modem processor
2047 	 * needs to send uplink/downlink statistics. if client id is specified
2048 	 * as 0xffffffff, then Q6 will send the stats for all the clients of
2049 	 * the specified source pipe.
2050 	 */
2051 
2052 	/* Mandatory */
2053 	/*  Source pipe id */
2054 	uint32_t src_pipe_id;
2055 	/*
2056 	 * IPA consumer pipe on which client on APPS side sent uplink
2057 	 * data to modem. In future, this implementation can be extended
2058 	 * to provide 0xffffffff as the source pipe id, where Q6 will send
2059 	 * the stats of all the clients across all different tethered-pipes.
2060 	 */
2061 
2062 	/* Optional */
2063 	/*  Reset client statistics. */
2064 	uint8_t reset_stats_valid;
2065 	/* Must be set to true if reset_stats is being passed. */
2066 	uint8_t reset_stats;
2067 	/*
2068 	 * Option to reset the statistics currently collected by modem for this
2069 	 * particular client.
2070 	 */
2071 };  /* Message */
2072 
2073 /*
2074  * Response Message; Requests the modem IPA driver to provide statistics
2075  * for a given client.
2076  */
2077 struct ipa_get_stats_per_client_resp_msg_v01 {
2078 
2079 	/* Mandatory */
2080 	/*  Result Code */
2081 	struct ipa_qmi_response_type_v01 resp;
2082 	/* Standard response type. */
2083 
2084 	/* Optional */
2085 	/*  Per clients Statistics List */
2086 	uint8_t per_client_stats_list_valid;
2087 	/* Must be set to true if per_client_stats_list is being passed. */
2088 	uint32_t per_client_stats_list_len;
2089 	/* Must be set to # of elements in per_client_stats_list. */
2090 	struct ipa_per_client_stats_info_type_v01
2091 		per_client_stats_list[QMI_IPA_MAX_PER_CLIENTS_V01];
2092 	/*
2093 	 * List of all per client statistics that are retrieved.
2094 	 */
2095 };  /* Message */
2096 
2097 struct ipa_ul_firewall_rule_type_v01 {
2098 
2099 	enum ipa_ip_type_enum_v01 ip_type;
2100 	/*
2101 	 * IP type for which this rule is applicable.
2102 	 * The driver must identify the filter table (v6 or v4), and this
2103 	 * field is essential for that. Values:
2104 	 * - QMI_IPA_IP_TYPE_INVALID (0) --  Invalid IP type identifier
2105 	 * - QMI_IPA_IP_TYPE_V4 (1) --  IPv4 type
2106 	 * - QMI_IPA_IP_TYPE_V6 (2) --  IPv6 type
2107 	 */
2108 
2109 	struct ipa_filter_rule_type_v01 filter_rule;
2110 	/*
2111 	 * Rules in the filter specification. These rules are the
2112 	 * ones that are matched against fields in the packet.
2113 	 * Currently we only send IPv6 whitelist rules to Q6.
2114 	 */
2115 };  /* Type */
2116 
2117 /*
2118  * Request Message; Requestes remote IPA driver to install uplink
2119  * firewall rules.
2120  */
2121 struct ipa_configure_ul_firewall_rules_req_msg_v01 {
2122 
2123 	/* Optional */
2124 	/*  Uplink Firewall Specification  */
2125 	uint32_t firewall_rules_list_len;
2126 	/* Must be set to # of elements in firewall_rules_list. */
2127 	struct ipa_ul_firewall_rule_type_v01
2128 		firewall_rules_list[QMI_IPA_MAX_UL_FIREWALL_RULES_V01];
2129 	/*
2130 	 * List of uplink firewall specifications of filters that must be
2131 	 * installed.
2132 	 */
2133 
2134 	uint32_t mux_id;
2135 	/*
2136 	 * QMAP Mux ID. As a part of the QMAP protocol,
2137 	 * several data calls may be multiplexed over the same physical
2138 	 * transport channel. This identifier is used to identify one
2139 	 * such data call. The maximum value for this identifier is 255.
2140 	 */
2141 
2142 	/* Optional */
2143 	uint8_t disable_valid;
2144 	/* Must be set to true if enable is being passed. */
2145 	uint8_t disable;
2146 	/*
2147 	 * Indicates whether uplink firewall needs to be enabled or disabled.
2148 	 */
2149 
2150 	/* Optional */
2151 	uint8_t are_blacklist_filters_valid;
2152 	/* Must be set to true if are_blacklist_filters is being passed. */
2153 	uint8_t are_blacklist_filters;
2154 	/*
2155 	 * Indicates whether the filters received as part of this message are
2156 	 * blacklist filters. i.e. drop uplink packets matching these rules.
2157 	 */
2158 };  /* Message */
2159 
2160 /*
2161  * Response Message; Requestes remote IPA driver to install
2162  * uplink firewall rules.
2163  */
2164 struct ipa_configure_ul_firewall_rules_resp_msg_v01 {
2165 
2166 	/* Mandatory */
2167 	/* Result Code */
2168 	struct ipa_qmi_response_type_v01 resp;
2169 	/*
2170 	 * Standard response type.
2171 	 * Standard response type. Contains the following data members:
2172 	 * qmi_result_type -- QMI_RESULT_SUCCESS or QMI_RESULT_FAILURE
2173 	 * qmi_error_type  -- Error code. Possible error code values are
2174 	 * described in the error codes section of each message definition.
2175 	 */
2176 };  /* Message */
2177 
2178 enum ipa_ul_firewall_status_enum_v01 {
2179 	IPA_UL_FIREWALL_STATUS_ENUM_MIN_ENUM_VAL_V01 = -2147483647,
2180 	/* To force a 32 bit signed enum.  Do not change or use*/
2181 	QMI_IPA_UL_FIREWALL_STATUS_SUCCESS_V01 = 0,
2182 	/* Indicates that the uplink firewall rules
2183 	 * are configured successfully.
2184 	 */
2185 	QMI_IPA_UL_FIREWALL_STATUS_FAILURE_V01 = 1,
2186 	/* Indicates that the uplink firewall rules
2187 	 * are not configured successfully.
2188 	 */
2189 	IPA_UL_FIREWALL_STATUS_ENUM_MAX_ENUM_VAL_V01 = 2147483647
2190 	/* To force a 32 bit signed enum.  Do not change or use*/
2191 };
2192 
2193 struct ipa_ul_firewall_config_result_type_v01 {
2194 
2195 	enum ipa_ul_firewall_status_enum_v01 is_success;
2196 	/*
2197 	 * Indicates whether the uplink firewall rules are configured
2198 	 * successfully.
2199 	 */
2200 
2201 	uint32_t mux_id;
2202 	/*
2203 	 * QMAP Mux ID. As a part of the QMAP protocol,
2204 	 * several data calls may be multiplexed over the same physical
2205 	 * transport channel. This identifier is used to identify one
2206 	 * such data call. The maximum value for this identifier is 255.
2207 	 */
2208 };
2209 
2210 /*
2211  * Indication Message; Requestes remote IPA driver to install
2212  * uplink firewall rules.
2213  */
2214 struct ipa_configure_ul_firewall_rules_ind_msg_v01 {
2215 
2216 	 struct ipa_ul_firewall_config_result_type_v01 result;
2217 };  /* Message */
2218 
2219 
2220 struct ipa_mhi_ch_init_info_type_v01 {
2221 	uint8_t ch_id;
2222 	/* Remote MHI channel ID */
2223 
2224 	uint8_t er_id;
2225 	/* Remote MHI Event ring ID */
2226 
2227 	uint32_t ch_doorbell_addr;
2228 	/* TR Channel Doorbell addr */
2229 
2230 	uint32_t er_doorbell_addr;
2231 	/* Event ring Doorbell addr */
2232 
2233 	uint32_t direction_type;
2234 	/* Direction type */
2235 };
2236 
2237 struct ipa_mhi_smmu_info_type_v01 {
2238 	uint64_t iova_ctl_base_addr;
2239 	/* IOVA mapped Control Region base address */
2240 
2241 	uint64_t iova_ctl_size;
2242 	/* IOVA Control region size */
2243 
2244 	uint64_t iova_data_base_addr;
2245 	/* IOVA mapped Data Region base address */
2246 
2247 	uint64_t iova_data_size;
2248 	/* IOVA Data Region size */
2249 };
2250 
2251 struct ipa_mhi_ready_indication_msg_v01 {
2252 	/* Mandatory */
2253 	uint32_t ch_info_arr_len;
2254 	/* Must be set to # of elements in ch_info_arr. */
2255 	struct ipa_mhi_ch_init_info_type_v01
2256 		ch_info_arr[QMI_IPA_REMOTE_MHI_CHANNELS_NUM_MAX_V01];
2257 	/* Channel Information array */
2258 
2259 	/* Mandatory */
2260 	uint8_t smmu_info_valid;
2261 	/* Must be set to true if smmu_info is being passed. */
2262 	struct ipa_mhi_smmu_info_type_v01 smmu_info;
2263 	/* SMMU enabled indication */
2264 };
2265 #define IPA_MHI_READY_INDICATION_MSG_V01_MAX_MSG_LEN 123
2266 
2267 struct ipa_mhi_mem_addr_info_type_v01 {
2268 	uint64_t pa;
2269 	/* Memory region start physical addr */
2270 
2271 	uint64_t iova;
2272 	/* Memory region start iova mapped addr */
2273 
2274 	uint64_t size;
2275 	/* Memory region size */
2276 };
2277 
2278 enum ipa_mhi_brst_mode_enum_v01 {
2279 	IPA_MHI_BRST_MODE_ENUM_MIN_VAL_V01 = IPA_INT_MIN,
2280 
2281 	QMI_IPA_BURST_MODE_DEFAULT_V01 = 0,
2282 	/*
2283 	 * Default - burst mode enabled for hardware channels,
2284 	 * disabled for software channels
2285 	 */
2286 
2287 	QMI_IPA_BURST_MODE_ENABLED_V01 = 1,
2288 	/* Burst mode is enabled for this channel */
2289 
2290 	QMI_IPA_BURST_MODE_DISABLED_V01 = 2,
2291 	/* Burst mode is disabled for this channel */
2292 
2293 	IPA_MHI_BRST_MODE_ENUM_MAX_VAL_V01 = IPA_INT_MAX,
2294 };
2295 
2296 struct ipa_mhi_tr_info_type_v01 {
2297 	uint8_t ch_id;
2298 	/* TR Channel ID */
2299 
2300 	uint16_t poll_cfg;
2301 	/*
2302 	 * Poll Configuration - Default or timer to poll the
2303 	 * MHI context in milliseconds
2304 	 */
2305 
2306 	enum ipa_mhi_brst_mode_enum_v01 brst_mode_type;
2307 	/* Burst mode configuration */
2308 
2309 	uint64_t ring_iova;
2310 	/* IOVA mapped ring base address */
2311 
2312 	uint64_t ring_len;
2313 	/* Ring Length in bytes */
2314 
2315 	uint64_t rp;
2316 	/* IOVA mapped Read pointer address */
2317 
2318 	uint64_t wp;
2319 	/* IOVA mapped write pointer address */
2320 };
2321 
2322 struct ipa_mhi_er_info_type_v01 {
2323 	uint8_t er_id;
2324 	/* Event ring ID */
2325 
2326 	uint32_t intmod_cycles;
2327 	/* Interrupt moderation cycles */
2328 
2329 	uint32_t intmod_count;
2330 	/* Interrupt moderation count */
2331 
2332 	uint32_t msi_addr;
2333 	/* IOVA mapped MSI address for this ER */
2334 
2335 	uint64_t ring_iova;
2336 	/* IOVA mapped ring base address */
2337 
2338 	uint64_t ring_len;
2339 	/* Ring length in bytes */
2340 
2341 	uint64_t rp;
2342 	/* IOVA mapped Read pointer address */
2343 
2344 	uint64_t wp;
2345 	/* IOVA mapped Write pointer address */
2346 };
2347 
2348 struct ipa_mhi_alloc_channel_req_msg_v01 {
2349 	/* Mandatory */
2350 	uint32_t tr_info_arr_len;
2351 	/* Must be set to # of elements in tr_info_arr. */
2352 	struct ipa_mhi_tr_info_type_v01
2353 		tr_info_arr[QMI_IPA_REMOTE_MHI_CHANNELS_NUM_MAX_V01];
2354 	/* Array of TR context information for Remote MHI channels */
2355 
2356 	/* Mandatory */
2357 	uint32_t er_info_arr_len;
2358 	/* Must be set to # of elements in er_info_arr. */
2359 	struct ipa_mhi_er_info_type_v01
2360 		er_info_arr[QMI_IPA_REMOTE_MHI_CHANNELS_NUM_MAX_V01];
2361 	/* Array of ER context information for Remote MHI channels */
2362 
2363 	/* Mandatory */
2364 	uint32_t ctrl_addr_map_info_len;
2365 	/* Must be set to # of elements in ctrl_addr_map_info. */
2366 
2367 	struct ipa_mhi_mem_addr_info_type_v01
2368 	ctrl_addr_map_info[QMI_IPA_REMOTE_MHI_MEMORY_MAPPING_NUM_MAX_V01];
2369 	/*
2370 	 * List of PA-IOVA address mappings for control regions
2371 	 * used by Modem
2372 	 */
2373 
2374 	/* Mandatory */
2375 	uint32_t data_addr_map_info_len;
2376 	/* Must be set to # of elements in data_addr_map_info. */
2377 	struct ipa_mhi_mem_addr_info_type_v01
2378 	data_addr_map_info[QMI_IPA_REMOTE_MHI_MEMORY_MAPPING_NUM_MAX_V01];
2379 	/* List of PA-IOVA address mappings for data regions used by Modem */
2380 };
2381 #define IPA_MHI_ALLOC_CHANNEL_REQ_MSG_V01_MAX_MSG_LEN 808
2382 
2383 struct ipa_mhi_ch_alloc_resp_type_v01 {
2384 	uint8_t ch_id;
2385 	/* Remote MHI channel ID */
2386 
2387 	uint8_t is_success;
2388 	/* Channel Allocation Status */
2389 };
2390 
2391 struct ipa_mhi_alloc_channel_resp_msg_v01 {
2392 	/* Mandatory */
2393 	struct ipa_qmi_response_type_v01 resp;
2394 	/* Standard response type. Contains the following data members:
2395 	 * - qmi_result_type -- QMI_RESULT_SUCCESS or QMI_RESULT_FAILURE
2396 	 * - qmi_error_type  -- Error code. Possible error code values
2397 	 *			are described in the error codes section
2398 	 *			of each message definition.
2399 	 */
2400 
2401 	/* Optional */
2402 	uint8_t alloc_resp_arr_valid;
2403 	/* Must be set to true if alloc_resp_arr is being passed. */
2404 	uint32_t alloc_resp_arr_len;
2405 	/* Must be set to # of elements in alloc_resp_arr. */
2406 	struct ipa_mhi_ch_alloc_resp_type_v01
2407 		alloc_resp_arr[QMI_IPA_REMOTE_MHI_CHANNELS_NUM_MAX_V01];
2408 	/* MHI channel allocation response array */
2409 };
2410 #define IPA_MHI_ALLOC_CHANNEL_RESP_MSG_V01_MAX_MSG_LEN 23
2411 
2412 enum ipa_clock_rate_enum_v01 {
2413 	IPA_CLOCK_RATE_ENUM_MIN_ENUM_VAL_V01 = IPA_INT_MIN,
2414 
2415 	QMI_IPA_CLOCK_RATE_INVALID_V01 = 0,
2416 
2417 	QMI_IPA_CLOCK_RATE_LOW_SVS_V01 = 1,
2418 
2419 	QMI_IPA_CLOCK_RATE_SVS_V01 = 2,
2420 
2421 	QMI_IPA_CLOCK_RATE_NOMINAL_V01 = 3,
2422 
2423 	QMI_IPA_CLOCK_RATE_TURBO_V01 = 4,
2424 
2425 	IPA_CLOCK_RATE_ENUM_MAX_ENUM_VAL_V01 = IPA_INT_MAX,
2426 };
2427 
2428 struct ipa_mhi_clk_vote_req_msg_v01 {
2429 	/* Mandatory */
2430 	uint8_t mhi_vote;
2431 	/*
2432 	 * MHI vote request
2433 	 * TRUE  - ON
2434 	 * FALSE - OFF
2435 	 */
2436 	/* Optional */
2437 	/*  Throughput Value */
2438 	uint8_t tput_value_valid;
2439 	uint32_t tput_value;
2440 
2441 	/* Optional */
2442 	/*  IPA Clock Rate */
2443 	uint8_t clk_rate_valid;
2444 	enum ipa_clock_rate_enum_v01 clk_rate;
2445 };
2446 #define IPA_MHI_CLK_VOTE_REQ_MSG_V01_MAX_MSG_LEN 18
2447 
2448 struct ipa_mhi_clk_vote_resp_msg_v01 {
2449 	/* Mandatory */
2450 	struct ipa_qmi_response_type_v01 resp;
2451 	/* Standard response type. Contains the following data members:
2452 	 * - qmi_result_type -- QMI_RESULT_SUCCESS or QMI_RESULT_FAILURE
2453 	 * - qmi_error_type  -- Error code. Possible error code values
2454 	 *			are described in the error codes section
2455 	 *			of each message definition.
2456 	 */
2457 };
2458 #define IPA_MHI_CLK_VOTE_RESP_MSG_V01_MAX_MSG_LEN 7
2459 
2460 struct ipa_mhi_cleanup_req_msg_v01 {
2461 	/* Optional */
2462 	uint8_t cleanup_valid;
2463 	/* Must be set to true if cleanup is being passed. */
2464 	uint8_t cleanup;
2465 	/*
2466 	 * a Flag to indicate the type of action
2467 	 * 1 - Cleanup Request
2468 	 */
2469 };
2470 #define IPA_MHI_CLEANUP_REQ_MSG_V01_MAX_MSG_LEN 4
2471 
2472 struct ipa_mhi_cleanup_resp_msg_v01 {
2473 	/* Mandatory */
2474 	struct ipa_qmi_response_type_v01 resp;
2475 	/* Standard response type. Contains the following data members:
2476 	 * - qmi_result_type -- QMI_RESULT_SUCCESS or QMI_RESULT_FAILURE
2477 	 * - qmi_error_type  -- Error code. Possible error code values
2478 	 *			are described in the error codes section
2479 	 *			of each message definition.
2480 	 */
2481 };
2482 #define IPA_MHI_CLEANUP_RESP_MSG_V01_MAX_MSG_LEN 7
2483 
2484 enum ipa_ep_desc_type_enum_v01 {
2485 	/* To force a 32 bit signed enum. Do not change or use*/
2486 	IPA_EP_DESC_TYPE_ENUM_MIN_VAL_V01 = IPA_INT_MIN,
2487 	DATA_EP_DESC_TYPE_RESERVED_V01 = 0x00,
2488 	DATA_EP_DESC_TYPE_EMB_CONS_V01 = 0x01,
2489 	DATA_EP_DESC_TYPE_EMB_PROD_V01 = 0x02,
2490 	DATA_EP_DESC_TYPE_RSC_PROD_V01 = 0x03,
2491 	DATA_EP_DESC_TYPE_QDSS_PROD_V01 = 0x04,
2492 	DATA_EP_DESC_TYPE_DPL_PROD_V01 = 0x05,
2493 	DATA_EP_DESC_TYPE_TETH_CONS_V01 = 0x06,
2494 	DATA_EP_DESC_TYPE_TETH_PROD_V01 = 0x07,
2495 	DATA_EP_DESC_TYPE_TETH_RMNET_CONS_V01 = 0x08,
2496 	DATA_EP_DESC_TYPE_TETH_RMNET_PROD_V01 = 0x09,
2497 	DATA_EP_DESC_TYPE_EMB_FLOW_CTL_CONS_V01 = 0x0A,
2498 	DATA_EP_DESC_TYPE_EMB_FLOW_CTL_PROD_V01 = 0x0B,
2499 	IPA_EP_DESC_TYPE_ENUM_MAX_VAL_V01 = IPA_INT_MAX,
2500 };
2501 
2502 enum ipa_ic_type_enum_v01 {
2503 	/* To force a 32 bit signed enum. Do not change or use*/
2504 	IPA_IC_TYPE_ENUM_MIN_VAL_V01 = IPA_INT_MIN,
2505 	DATA_IC_TYPE_RESERVED_V01 = 0x00,
2506 	DATA_IC_TYPE_MHI_V01 = 0x01,
2507 	DATA_IC_TYPE_MHI_PRIME_V01 = 0x02,
2508 	DATA_IC_TYPE_USB_V01 = 0x03,
2509 	DATA_IC_TYPE_AP_V01 = 0x04,
2510 	DATA_IC_TYPE_Q6_V01 = 0x05,
2511 	DATA_IC_TYPE_UC_V01 = 0x06,
2512 	IPA_IC_TYPE_ENUM_MAX_VAL_V01 = IPA_INT_MAX,
2513 };
2514 
2515 enum ipa_ep_status_type_v01 {
2516 	/* To force a 32 bit signed enum. Do not change or use*/
2517 	IPA_EP_STATUS_TYPE_MIN_VAL_V01 = IPA_INT_MIN,
2518 	DATA_EP_STATUS_RESERVED_V01 = 0x00,
2519 	DATA_EP_STATUS_STATIC_V01 = 0x01,
2520 	DATA_EP_STATUS_CONNECTED_V01 = 0x02,
2521 	DATA_EP_STATUS_DISCONNECTED_V01 = 0x03,
2522 	IPA_EP_STATUS_TYPE_MAX_VAL_V01 = IPA_INT_MAX,
2523 };
2524 
2525 struct ipa_ep_id_type_v01 {
2526 	/* Interconnect type. See ipa_ic_desc_type_enum type */
2527 	enum ipa_ic_type_enum_v01 ic_type;
2528 	/* Peripheral end point type */
2529 	enum ipa_ep_desc_type_enum_v01 ep_type;
2530 	/* Peripheral interface number */
2531 	uint32_t ep_id;
2532 	/* Status of endpoint */
2533 	enum ipa_ep_status_type_v01 ep_status;
2534 };
2535 
2536 struct ipa_endp_desc_indication_msg_v01 {
2537 	/* Optional */
2538 	uint8_t ep_info_valid;
2539 	/* Must be set to true if type_arr is being passed */
2540 	uint32_t ep_info_len;
2541 	/* Must be set to # of elements in type_arr */
2542 	struct ipa_ep_id_type_v01 ep_info[QMI_IPA_ENDP_DESC_NUM_MAX_V01];
2543 	/* Optional */
2544 	uint8_t num_eps_valid;
2545 	/* Must be set to true if num_of_eps is being passed */
2546 	/* Must be set to # of elements of num_of_eps */
2547 	uint32_t num_eps;
2548 }; /* Message */
2549 #define IPA_ENDP_DESC_INDICATION_MSG_V01_MAX_MSG_LEN 507
2550 
2551 enum ipa_aggr_enum_type_v01 {
2552 	IPA_AGGR_ENUM_TYPE_MIN_VAL_V01 = IPA_INT_MIN,
2553 	DATA_AGGR_TYPE_RESERVED_V01 = 0x00,
2554 	DATA_AGGR_TYPE_QMAP_V01 = 0x01,
2555 	DATA_AGGR_TYPE_QMAPv5_V01 = 0x02,
2556 	DATA_AGGR_TYPE_INHERITED_V01 = 0x03,
2557 	IPA_AGGR_ENUM_TYPE_MAX_VAL_V01 = IPA_INT_MAX,
2558 };
2559 
2560 struct ipa_mhi_prime_aggr_info_type_v01 {
2561 	enum ipa_ic_type_enum_v01 ic_type;
2562 	/* Peripheral end point type */
2563 	enum ipa_ep_desc_type_enum_v01 ep_type;
2564 	/* Bytes count in KB */
2565 	uint32_t bytes_count;
2566 	/* packet count */
2567 	uint32_t pkt_count;
2568 	/* aggr_type */
2569 	enum ipa_aggr_enum_type_v01 aggr_type;
2570 }; /* Message */
2571 #define IPA_MHI_PRIME_AGGR_INFO_REQ_MSG_V01_MAX_MSG_LEN 631
2572 
2573 struct ipa_mhi_prime_aggr_info_req_msg_v01 {
2574 	/* optional */
2575 	uint8_t aggr_info_valid;
2576 	/* Aggregration info for MHI prime */
2577 	/* Must be set to true if aggr_info is being passed*/
2578 	uint32_t aggr_info_len;
2579 	/* Must be set to # of elements in aggr_info */
2580 	struct ipa_mhi_prime_aggr_info_type_v01
2581 		aggr_info[QMI_IPA_ENDP_DESC_NUM_MAX_V01];
2582 	/* optional */
2583 	/* Must be set to true if num_eps_valid is being passed*/
2584 	uint8_t num_eps_valid;
2585 	/* Must be set to # of num_eps */
2586 	uint32_t num_eps;
2587 }; /* Message */
2588 #define IPA_MHI_PRIME_AGGR_INFO_RESP_MSG_V01_MAX_MSG_LEN 7
2589 
2590 struct ipa_mhi_prime_aggr_info_resp_msg_v01 {
2591 	/*  Result Code */
2592 	struct ipa_qmi_response_type_v01 resp;
2593 }; /* Message */
2594 
2595 struct ipa_add_offload_connection_req_msg_v01 {
2596 	/* optional */
2597 	/* Must be set to true if num_ipv4_filters is being passed*/
2598 	uint8_t num_ipv4_filters_valid;
2599 	/* Must be set to # of ipv4_filters*/
2600 	uint32_t num_ipv4_filters;
2601 	/* optional */
2602 	/* Must be set to true if num_ipv6_filters is being passed*/
2603 	uint8_t num_ipv6_filters_valid;
2604 	/* Must be set to # of ipv6_filters*/
2605 	uint32_t num_ipv6_filters;
2606 	/* optional */
2607 	uint8_t xlat_filter_indices_list_valid;
2608 	/* Must be set to true if xlat_filter_indices_list is being passed*/
2609 	uint32_t xlat_filter_indices_list_len;
2610 	/* Must be set to # of  xlat_filter_indices_list*/
2611 	uint32_t xlat_filter_indices_list[QMI_IPA_MAX_FILTERS_V01];
2612 	/* optional */
2613 	/* Must be set to true if filter_spec_ex_list is being passed*/
2614 	uint8_t filter_spec_ex2_list_valid;
2615 	/* Must be set to # of  filter_spec_ex_list*/
2616 	uint32_t filter_spec_ex2_list_len;
2617 	struct ipa_filter_spec_ex2_type_v01
2618 		filter_spec_ex2_list[QMI_IPA_MAX_FILTERS_V01];
2619 	/* Optional */
2620 	/*  Mux ID for embedded call */
2621 	uint8_t embedded_call_mux_id_valid;
2622 	/* Must be set to true if embedded_call_mux_id is being passed */
2623 	uint32_t embedded_call_mux_id;
2624 	/* Mux ID for the new embedded call */
2625 	/* Optional */
2626 	/*  Default MHI path */
2627 	uint8_t default_mhi_path_valid;
2628 	/* Must be set to true if default_mhi_path is being passed */
2629 	uint8_t default_mhi_path;
2630 	/* Default MHI path */
2631 }; /* Message */
2632 #define IPA_ADD_OFFLOAD_CONNECTION_REQ_MSG_V01_MAX_MSG_LEN 11361
2633 
2634 struct ipa_add_offload_connection_resp_msg_v01 {
2635 	/*  Result Code */
2636 	struct ipa_qmi_response_type_v01 resp;
2637 	/* optional */
2638 	/* Must be set to true if filter_handle_list is being passed*/
2639 	uint8_t filter_handle_list_valid;
2640 	/* Must be set to # of  filter_handle_list*/
2641 	uint32_t filter_handle_list_len;
2642 	struct ipa_filter_rule_identifier_to_handle_map_v01
2643 		filter_handle_list[QMI_IPA_MAX_FILTERS_V01];
2644 }; /* Message */
2645 #define IPA_ADD_OFFLOAD_CONNECTION_RESP_MSG_V01_MAX_MSG_LEN 523
2646 
2647 struct ipa_remove_offload_connection_req_msg_v01 {
2648 	/* optional */
2649 	/* Must be set to true if filter_handle_list is being passed*/
2650 	uint8_t filter_handle_list_valid;
2651 	/* Must be set to # of  filter_handle_list*/
2652 	uint32_t filter_handle_list_len;
2653 	struct ipa_filter_rule_identifier_to_handle_map_v01
2654 		filter_handle_list[QMI_IPA_MAX_FILTERS_V01];
2655 	/* Optional */
2656 	/*  Clean All rules */
2657 	uint8_t clean_all_rules_valid;
2658 	/* Must be set to true if clean_all_rules is being passed */
2659 	uint8_t clean_all_rules;
2660 	/* Clean All rules */
2661 }; /* Message */
2662 #define IPA_REMOVE_OFFLOAD_CONNECTION_REQ_MSG_V01_MAX_MSG_LEN 520
2663 
2664 struct ipa_remove_offload_connection_resp_msg_v01 {
2665 	/* optional */
2666 	/* Must be set to true if filter_handle_list is being passed*/
2667 	uint8_t resp_valid;
2668 	/*  Result Code */
2669 	struct ipa_qmi_response_type_v01 resp;
2670 }; /* Message */
2671 #define IPA_REMOVE_OFFLOAD_CONNECTION_RESP_MSG_V01_MAX_MSG_LEN 7
2672 
2673 struct ipa_bw_change_ind_msg_v01 {
2674 	/* optional */
2675 	/* Must be set to true if peak_bw_ul is being passed*/
2676 	uint8_t peak_bw_ul_valid;
2677 	/* Kbps */
2678 	uint32_t peak_bw_ul;
2679 	/* Must be set to true if peak_bw_dl is being passed*/
2680 	uint8_t peak_bw_dl_valid;
2681 	/* Kbps */
2682 	uint32_t peak_bw_dl;
2683 }; /* Message */
2684 #define IPA_BW_CHANGE_IND_MSG_V01_MAX_MSG_LEN 14
2685 
2686 /*Service Message Definition*/
2687 #define QMI_IPA_INDICATION_REGISTER_REQ_V01 0x0020
2688 #define QMI_IPA_INDICATION_REGISTER_RESP_V01 0x0020
2689 #define QMI_IPA_INIT_MODEM_DRIVER_REQ_V01 0x0021
2690 #define QMI_IPA_INIT_MODEM_DRIVER_RESP_V01 0x0021
2691 #define QMI_IPA_MASTER_DRIVER_INIT_COMPLETE_IND_V01 0x0022
2692 #define QMI_IPA_INSTALL_FILTER_RULE_REQ_V01 0x0023
2693 #define QMI_IPA_INSTALL_FILTER_RULE_RESP_V01 0x0023
2694 #define QMI_IPA_FILTER_INSTALLED_NOTIF_REQ_V01 0x0024
2695 #define QMI_IPA_FILTER_INSTALLED_NOTIF_RESP_V01 0x0024
2696 #define QMI_IPA_ENABLE_FORCE_CLEAR_DATAPATH_REQ_V01 0x0025
2697 #define QMI_IPA_ENABLE_FORCE_CLEAR_DATAPATH_RESP_V01 0x0025
2698 #define QMI_IPA_DISABLE_FORCE_CLEAR_DATAPATH_REQ_V01 0x0026
2699 #define QMI_IPA_DISABLE_FORCE_CLEAR_DATAPATH_RESP_V01 0x0026
2700 #define QMI_IPA_CONFIG_REQ_V01 0x0027
2701 #define QMI_IPA_CONFIG_RESP_V01 0x0027
2702 #define QMI_IPA_DISABLE_LINK_LOW_PWR_STATE_REQ_V01 0x0028
2703 #define QMI_IPA_DISABLE_LINK_LOW_PWR_STATE_RESP_V01 0x0028
2704 #define QMI_IPA_ENABLE_LINK_LOW_PWR_STATE_REQ_V01 0x0029
2705 #define QMI_IPA_ENABLE_LINK_LOW_PWR_STATE_RESP_V01 0x0029
2706 #define QMI_IPA_GET_DATA_STATS_REQ_V01 0x0030
2707 #define QMI_IPA_GET_DATA_STATS_RESP_V01 0x0030
2708 #define QMI_IPA_GET_APN_DATA_STATS_REQ_V01 0x0031
2709 #define QMI_IPA_GET_APN_DATA_STATS_RESP_V01 0x0031
2710 #define QMI_IPA_SET_DATA_USAGE_QUOTA_REQ_V01 0x0032
2711 #define QMI_IPA_SET_DATA_USAGE_QUOTA_RESP_V01 0x0032
2712 #define QMI_IPA_DATA_USAGE_QUOTA_REACHED_IND_V01 0x0033
2713 #define QMI_IPA_STOP_DATA_USAGE_QUOTA_REQ_V01 0x0034
2714 #define QMI_IPA_STOP_DATA_USAGE_QUOTA_RESP_V01 0x0034
2715 #define QMI_IPA_INIT_MODEM_DRIVER_CMPLT_REQ_V01 0x0035
2716 #define QMI_IPA_INIT_MODEM_DRIVER_CMPLT_RESP_V01 0x0035
2717 #define QMI_IPA_INSTALL_FILTER_RULE_EX_REQ_V01 0x0037
2718 #define QMI_IPA_INSTALL_FILTER_RULE_EX_RESP_V01 0x0037
2719 #define QMI_IPA_ENABLE_PER_CLIENT_STATS_REQ_V01 0x0038
2720 #define QMI_IPA_ENABLE_PER_CLIENT_STATS_RESP_V01 0x0038
2721 #define QMI_IPA_GET_STATS_PER_CLIENT_REQ_V01 0x0039
2722 #define QMI_IPA_GET_STATS_PER_CLIENT_RESP_V01 0x0039
2723 #define QMI_IPA_INSTALL_UL_FIREWALL_RULES_REQ_V01 0x003A
2724 #define QMI_IPA_INSTALL_UL_FIREWALL_RULES_RESP_V01 0x003A
2725 #define QMI_IPA_INSTALL_UL_FIREWALL_RULES_IND_V01 0x003A
2726 #define QMI_IPA_MHI_CLK_VOTE_REQ_V01 0x003B
2727 #define QMI_IPA_MHI_CLK_VOTE_RESP_V01 0x003B
2728 #define QMI_IPA_MHI_READY_IND_V01 0x003C
2729 #define QMI_IPA_MHI_ALLOC_CHANNEL_REQ_V01 0x003D
2730 #define QMI_IPA_MHI_ALLOC_CHANNEL_RESP_V01 0x003D
2731 #define QMI_IPA_MHI_CLEANUP_REQ_V01 0x003E
2732 #define QMI_IPA_MHI_CLEANUP_RESP_V01 0x003E
2733 #define QMI_IPA_ENDP_DESC_INDICATION_V01 0x003F
2734 #define QMI_IPA_MHI_PRIME_AGGR_INFO_REQ_V01 0x0040
2735 #define QMI_IPA_MHI_PRIME_AGGR_INFO_RESP_V01 0x0040
2736 #define QMI_IPA_ADD_OFFLOAD_CONNECTION_REQ_V01 0x0041
2737 #define QMI_IPA_ADD_OFFLOAD_CONNECTION_RESP_V01 0x0041
2738 #define QMI_IPA_REMOVE_OFFLOAD_CONNECTION_REQ_V01 0x0042
2739 #define QMI_IPA_REMOVE_OFFLOAD_CONNECTION_RESP_V01 0x0042
2740 #define QMI_IPA_BW_CHANGE_INDICATION_V01 0x0044
2741 
2742 /* add for max length*/
2743 #define QMI_IPA_INIT_MODEM_DRIVER_REQ_MAX_MSG_LEN_V01 162
2744 #define QMI_IPA_INIT_MODEM_DRIVER_RESP_MAX_MSG_LEN_V01 25
2745 #define QMI_IPA_INDICATION_REGISTER_REQ_MAX_MSG_LEN_V01 20
2746 #define QMI_IPA_INDICATION_REGISTER_RESP_MAX_MSG_LEN_V01 7
2747 #define QMI_IPA_INSTALL_FILTER_RULE_REQ_MAX_MSG_LEN_V01 33705
2748 #define QMI_IPA_INSTALL_FILTER_RULE_RESP_MAX_MSG_LEN_V01 783
2749 #define QMI_IPA_FILTER_INSTALLED_NOTIF_REQ_MAX_MSG_LEN_V01 1899
2750 #define QMI_IPA_FILTER_INSTALLED_NOTIF_RESP_MAX_MSG_LEN_V01 7
2751 #define QMI_IPA_MASTER_DRIVER_INIT_COMPLETE_IND_MAX_MSG_LEN_V01 7
2752 #define QMI_IPA_DATA_USAGE_QUOTA_REACHED_IND_MAX_MSG_LEN_V01 15
2753 
2754 
2755 #define QMI_IPA_ENABLE_FORCE_CLEAR_DATAPATH_REQ_MAX_MSG_LEN_V01 18
2756 #define QMI_IPA_DISABLE_FORCE_CLEAR_DATAPATH_REQ_MAX_MSG_LEN_V01 7
2757 #define QMI_IPA_ENABLE_FORCE_CLEAR_DATAPATH_RESP_MAX_MSG_LEN_V01 7
2758 #define QMI_IPA_DISABLE_FORCE_CLEAR_DATAPATH_RESP_MAX_MSG_LEN_V01 7
2759 
2760 
2761 #define QMI_IPA_CONFIG_REQ_MAX_MSG_LEN_V01 102
2762 #define QMI_IPA_CONFIG_RESP_MAX_MSG_LEN_V01 7
2763 #define QMI_IPA_DISABLE_LINK_LOW_PWR_STATE_REQ_MAX_MSG_LEN_V01 18
2764 #define QMI_IPA_DISABLE_LINK_LOW_PWR_STATE_RESP_MAX_MSG_LEN_V01 7
2765 #define QMI_IPA_ENABLE_LINK_LOW_PWR_STATE_REQ_MAX_MSG_LEN_V01 7
2766 #define QMI_IPA_ENABLE_LINK_LOW_PWR_STATE_RESP_MAX_MSG_LEN_V01 7
2767 #define QMI_IPA_GET_DATA_STATS_REQ_MAX_MSG_LEN_V01 11
2768 #define QMI_IPA_GET_DATA_STATS_RESP_MAX_MSG_LEN_V01 2234
2769 #define QMI_IPA_GET_APN_DATA_STATS_REQ_MAX_MSG_LEN_V01 36
2770 #define QMI_IPA_GET_APN_DATA_STATS_RESP_MAX_MSG_LEN_V01 299
2771 #define QMI_IPA_SET_DATA_USAGE_QUOTA_REQ_MAX_MSG_LEN_V01 100
2772 #define QMI_IPA_SET_DATA_USAGE_QUOTA_RESP_MAX_MSG_LEN_V01 7
2773 #define QMI_IPA_STOP_DATA_USAGE_QUOTA_REQ_MAX_MSG_LEN_V01 0
2774 #define QMI_IPA_STOP_DATA_USAGE_QUOTA_RESP_MAX_MSG_LEN_V01 7
2775 
2776 #define QMI_IPA_INIT_MODEM_DRIVER_CMPLT_REQ_MAX_MSG_LEN_V01 4
2777 #define QMI_IPA_INIT_MODEM_DRIVER_CMPLT_RESP_MAX_MSG_LEN_V01 7
2778 
2779 #define QMI_IPA_INSTALL_FILTER_RULE_EX_REQ_MAX_MSG_LEN_V01 34021
2780 #define QMI_IPA_INSTALL_FILTER_RULE_EX_RESP_MAX_MSG_LEN_V01 523
2781 
2782 #define QMI_IPA_ENABLE_PER_CLIENT_STATS_REQ_MAX_MSG_LEN_V01 4
2783 #define QMI_IPA_ENABLE_PER_CLIENT_STATS_RESP_MAX_MSG_LEN_V01 7
2784 
2785 #define QMI_IPA_GET_STATS_PER_CLIENT_REQ_MAX_MSG_LEN_V01 18
2786 #define QMI_IPA_GET_STATS_PER_CLIENT_RESP_MAX_MSG_LEN_V01 3595
2787 
2788 #define QMI_IPA_INSTALL_UL_FIREWALL_RULES_REQ_MAX_MSG_LEN_V01 9875
2789 #define QMI_IPA_INSTALL_UL_FIREWALL_RULES_RESP_MAX_MSG_LEN_V01 7
2790 #define QMI_IPA_INSTALL_UL_FIREWALL_RULES_IND_MAX_MSG_LEN_V01 11
2791 /* Service Object Accessor */
2792 
2793 /* This is the largest MAX_MSG_LEN we have for all the messages
2794  * we expect to receive. This argument will be used in
2795  * qmi_handle_init to allocate a receive buffer for the socket
2796  * associated with our qmi_handle
2797  */
2798 #define QMI_IPA_MAX_MSG_LEN 22685
2799 
2800 #endif/* IPA_QMI_SERVICE_V01_H */
2801