• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright (c) 2013-2018, 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 #define QMI_IPA_IPFLTR_NUM_IHL_RANGE_16_EQNS_V01 2
43 #define QMI_IPA_IPFLTR_NUM_MEQ_32_EQNS_V01 2
44 #define QMI_IPA_IPFLTR_NUM_IHL_MEQ_32_EQNS_V01 2
45 #define QMI_IPA_IPFLTR_NUM_MEQ_128_EQNS_V01 2
46 #define QMI_IPA_MAX_FILTERS_V01 64
47 #define QMI_IPA_MAX_FILTERS_EX_V01 128
48 #define QMI_IPA_MAX_PIPES_V01 20
49 #define QMI_IPA_MAX_APN_V01 8
50 #define QMI_IPA_MAX_PER_CLIENTS_V01 64
51 /* Currently max we can use is only 1. But for scalability purpose
52  * we are having max value as 8.
53  */
54 #define QMI_IPA_MAX_CLIENT_DST_PIPES_V01 8
55 #define QMI_IPA_MAX_UL_FIREWALL_RULES_V01 64
56 
57 /*
58  * Indicates presence of newly added member to support HW stats.
59  */
60 #define IPA_QMI_SUPPORTS_STATS
61 
62 #define IPA_INT_MAX	((int)(~0U>>1))
63 #define IPA_INT_MIN	(-IPA_INT_MAX - 1)
64 
65 /* IPA definition as msm_qmi_interface.h */
66 
67 enum ipa_qmi_result_type_v01 {
68 	/* To force a 32 bit signed enum. Do not change or use*/
69 	IPA_QMI_RESULT_TYPE_MIN_ENUM_VAL_V01 = IPA_INT_MIN,
70 	IPA_QMI_RESULT_SUCCESS_V01 = 0,
71 	IPA_QMI_RESULT_FAILURE_V01 = 1,
72 	IPA_QMI_RESULT_TYPE_MAX_ENUM_VAL_V01 = IPA_INT_MAX,
73 };
74 
75 enum ipa_qmi_error_type_v01 {
76 	/* To force a 32 bit signed enum. Do not change or use*/
77 	IPA_QMI_ERROR_TYPE_MIN_ENUM_VAL_V01 = IPA_INT_MIN,
78 	IPA_QMI_ERR_NONE_V01 = 0x0000,
79 	IPA_QMI_ERR_MALFORMED_MSG_V01 = 0x0001,
80 	IPA_QMI_ERR_NO_MEMORY_V01 = 0x0002,
81 	IPA_QMI_ERR_INTERNAL_V01 = 0x0003,
82 	IPA_QMI_ERR_CLIENT_IDS_EXHAUSTED_V01 = 0x0005,
83 	IPA_QMI_ERR_INVALID_ID_V01 = 0x0029,
84 	IPA_QMI_ERR_ENCODING_V01 = 0x003A,
85 	IPA_QMI_ERR_INCOMPATIBLE_STATE_V01 = 0x005A,
86 	IPA_QMI_ERR_NOT_SUPPORTED_V01 = 0x005E,
87 	IPA_QMI_ERROR_TYPE_MAX_ENUM_VAL_V01 = IPA_INT_MAX,
88 };
89 
90 struct ipa_qmi_response_type_v01 {
91 	enum ipa_qmi_result_type_v01 result;
92 	enum ipa_qmi_error_type_v01 error;
93 };
94 
95 enum ipa_platform_type_enum_v01 {
96 	IPA_PLATFORM_TYPE_ENUM_MIN_ENUM_VAL_V01 =
97 	-2147483647, /* To force a 32 bit signed enum.  Do not change or use */
98 	QMI_IPA_PLATFORM_TYPE_INVALID_V01 = 0,
99 	/*  Invalid platform identifier */
100 	QMI_IPA_PLATFORM_TYPE_TN_V01 = 1,
101 	/*  Platform identifier -	Data card device */
102 	QMI_IPA_PLATFORM_TYPE_LE_V01 = 2,
103 	/*  Platform identifier -	Data router device */
104 	QMI_IPA_PLATFORM_TYPE_MSM_ANDROID_V01 = 3,
105 	/*  Platform identifier -	MSM device with Android HLOS */
106 	QMI_IPA_PLATFORM_TYPE_MSM_WINDOWS_V01 = 4,
107 	/*  Platform identifier -	MSM device with Windows HLOS */
108 	QMI_IPA_PLATFORM_TYPE_MSM_QNX_V01 = 5,
109 	/*  Platform identifier -	MSM device with QNX HLOS */
110 	IPA_PLATFORM_TYPE_ENUM_MAX_ENUM_VAL_V01 = 2147483647
111 	/* To force a 32 bit signed enum.  Do not change or use */
112 };
113 
114 struct ipa_hdr_tbl_info_type_v01 {
115 	uint32_t modem_offset_start;
116 	/*	Offset from the start of IPA Shared memory from which
117 	 *	modem driver may insert header table entries.
118 	 */
119 	uint32_t modem_offset_end;
120 	/*	Offset from the start of IPA shared mem beyond which modem
121 	 *	driver shall not insert header table entries. The space
122 	 *	available for the modem driver shall include the
123 	 *	modem_offset_start and modem_offset_end.
124 	 */
125 };  /* Type */
126 
127 struct ipa_route_tbl_info_type_v01 {
128 	uint32_t route_tbl_start_addr;
129 	/*	Identifies the start of the routing table. Denotes the offset
130 	 *	from the start of the IPA Shared Mem
131 	 */
132 
133 	uint32_t num_indices;
134 	/*	Number of indices (starting from 0) that is being allocated to
135 	 *	the modem. The number indicated here is also included in the
136 	 *	allocation. The value of num_indices shall not exceed 31
137 	 *	(5 bits used to specify the routing table index), unless there
138 	 *	is a change in the hardware.
139 	 */
140 };  /* Type */
141 
142 struct ipa_modem_mem_info_type_v01 {
143 
144 	uint32_t block_start_addr;
145 	/*	Identifies the start of the memory block allocated for the
146 	 *	modem. Denotes the offset from the start of the IPA Shared Mem
147 	 */
148 
149 	uint32_t size;
150 	/*	Size of the block allocated for the modem driver */
151 };  /* Type */
152 
153 struct ipa_hdr_proc_ctx_tbl_info_type_v01 {
154 
155 	uint32_t modem_offset_start;
156 	/*  Offset from the start of IPA shared memory from which the modem
157 	 *	driver may insert header processing context table entries.
158 	 */
159 
160 	uint32_t modem_offset_end;
161 	/*  Offset from the start of IPA shared memory beyond which the modem
162 	 *	driver may not insert header proc table entries. The space
163 	 *	available for the modem driver includes modem_offset_start and
164 	 *	modem_offset_end.
165 	 */
166 };  /* Type */
167 
168 struct ipa_zip_tbl_info_type_v01 {
169 
170 	uint32_t modem_offset_start;
171 	/*  Offset from the start of IPA shared memory from which the modem
172 	 *	driver may insert compression/decompression command entries.
173 	 */
174 
175 	uint32_t modem_offset_end;
176 	/*  Offset from the start of IPA shared memory beyond which the modem
177 	 *	driver may not insert compression/decompression command entries.
178 	 *	The space available for the modem driver includes
179 	 *  modem_offset_start and modem_offset_end.
180 	 */
181 };  /* Type */
182 
183 /**
184  * Request Message; Requests the modem IPA driver
185  * to perform initialization
186  */
187 struct ipa_init_modem_driver_req_msg_v01 {
188 
189 	/* Optional */
190 	/*  Platform info */
191 	uint8_t platform_type_valid;
192 	/* Must be set to true if platform_type is being passed */
193 	enum ipa_platform_type_enum_v01 platform_type;
194 	/*   Provides information about the platform (ex. TN/MN/LE/MSM,etc) */
195 
196 	/* Optional */
197 	/*  Header table info */
198 	uint8_t hdr_tbl_info_valid;
199 	/* Must be set to true if hdr_tbl_info is being passed */
200 	struct ipa_hdr_tbl_info_type_v01 hdr_tbl_info;
201 	/*	Provides information about the header table */
202 
203 	/* Optional */
204 	/*  IPV4 Routing table info */
205 	uint8_t v4_route_tbl_info_valid;
206 	/* Must be set to true if v4_route_tbl_info is being passed */
207 	struct ipa_route_tbl_info_type_v01 v4_route_tbl_info;
208 	/*	Provides information about the IPV4 routing table */
209 
210 	/* Optional */
211 	/*  IPV6 Routing table info */
212 	uint8_t v6_route_tbl_info_valid;
213 	/* Must be set to true if v6_route_tbl_info is being passed */
214 	struct ipa_route_tbl_info_type_v01 v6_route_tbl_info;
215 	/*	Provides information about the IPV6 routing table */
216 
217 	/* Optional */
218 	/*  IPV4 Filter table start address */
219 	uint8_t v4_filter_tbl_start_addr_valid;
220 	/* Must be set to true if v4_filter_tbl_start_addr is being passed */
221 	uint32_t v4_filter_tbl_start_addr;
222 	/*	Provides information about the starting address of IPV4 filter
223 	 *	table in IPAv2 or non-hashable IPv4 filter table in IPAv3.
224 	 *	Denotes the offset from the start of the IPA Shared Mem
225 	 */
226 
227 	/* Optional */
228 	/* IPV6 Filter table start address */
229 	uint8_t v6_filter_tbl_start_addr_valid;
230 	/* Must be set to true if v6_filter_tbl_start_addr is being passed */
231 	uint32_t v6_filter_tbl_start_addr;
232 	/*	Provides information about the starting address of IPV6 filter
233 	 *	table in IPAv2 or non-hashable IPv6 filter table in IPAv3.
234 	 *	Denotes the offset from the start of the IPA Shared Mem
235 	 */
236 
237 	/* Optional */
238 	/*  Modem memory block */
239 	uint8_t modem_mem_info_valid;
240 	/* Must be set to true if modem_mem_info is being passed */
241 	struct ipa_modem_mem_info_type_v01 modem_mem_info;
242 	/*  Provides information about the start address and the size of
243 	 *	the memory block that is being allocated to the modem driver.
244 	 *	Denotes the physical address
245 	 */
246 
247 	/* Optional */
248 	/*  Destination end point for control commands from modem */
249 	uint8_t ctrl_comm_dest_end_pt_valid;
250 	/* Must be set to true if ctrl_comm_dest_end_pt is being passed */
251 	uint32_t ctrl_comm_dest_end_pt;
252 	/*  Provides information about the destination end point on the
253 	 *	application processor to which the modem driver can send
254 	 *	control commands. The value of this parameter cannot exceed
255 	 *	19 since IPA only supports 20 end points.
256 	 */
257 
258 	/* Optional */
259 	/*  Modem Bootup Information */
260 	uint8_t is_ssr_bootup_valid;
261 	/* Must be set to true if is_ssr_bootup is being passed */
262 	uint8_t is_ssr_bootup;
263 	/*	Specifies whether the modem is booting up after a modem only
264 	 *	sub-system restart or not. This will let the modem driver
265 	 *	know that it doesn't have to reinitialize some of the HW
266 	 *	blocks because IPA has not been reset since the previous
267 	 *	initialization.
268 	 */
269 
270 	/* Optional */
271 	/*  Header Processing Context Table Information */
272 	uint8_t hdr_proc_ctx_tbl_info_valid;
273 	/* Must be set to true if hdr_proc_ctx_tbl_info is being passed */
274 	struct ipa_hdr_proc_ctx_tbl_info_type_v01 hdr_proc_ctx_tbl_info;
275 	/* Provides information about the header processing context table.
276 	*/
277 
278 	/* Optional */
279 	/*  Compression Decompression Table Information */
280 	uint8_t zip_tbl_info_valid;
281 	/* Must be set to true if zip_tbl_info is being passed */
282 	struct ipa_zip_tbl_info_type_v01 zip_tbl_info;
283 	/* Provides information about the zip table.
284 	*/
285 
286 	/* Optional */
287 	/*  IPv4 Hashable Routing Table Information */
288 	/** Must be set to true if v4_hash_route_tbl_info is being passed */
289 	uint8_t v4_hash_route_tbl_info_valid;
290 	struct ipa_route_tbl_info_type_v01 v4_hash_route_tbl_info;
291 
292 	/* Optional */
293 	/*  IPv6 Hashable Routing Table Information */
294 	/** Must be set to true if v6_hash_route_tbl_info is being passed */
295 	uint8_t v6_hash_route_tbl_info_valid;
296 	struct ipa_route_tbl_info_type_v01 v6_hash_route_tbl_info;
297 
298 	/*
299 	* Optional
300 	* IPv4 Hashable Filter Table Start Address
301 	* Must be set to true if v4_hash_filter_tbl_start_addr
302 	* is being passed
303 	*/
304 	uint8_t v4_hash_filter_tbl_start_addr_valid;
305 	uint32_t v4_hash_filter_tbl_start_addr;
306 	/* Identifies the starting address of the IPv4 hashable filter
307 	* table in IPAv3 onwards. Denotes the offset from the start of
308 	* the IPA shared memory.
309 	*/
310 
311 	/* Optional
312 	* IPv6 Hashable Filter Table Start Address
313 	* Must be set to true if v6_hash_filter_tbl_start_addr
314 	* is being passed
315 	*/
316 	uint8_t v6_hash_filter_tbl_start_addr_valid;
317 	uint32_t v6_hash_filter_tbl_start_addr;
318 	/* Identifies the starting address of the IPv6 hashable filter
319 	* table in IPAv3 onwards. Denotes the offset from the start of
320 	* the IPA shared memory.
321 	*/
322 
323 	/* Optional
324 	 * Modem HW Stats Quota Base address
325 	 * Must be set to true if hw_stats_quota_base_addr
326 	 * is being passed
327 	 */
328 	uint8_t hw_stats_quota_base_addr_valid;
329 	uint32_t hw_stats_quota_base_addr;
330 
331 	/* Optional
332 	 * Modem HW Stats Quota Size
333 	 * Must be set to true if hw_stats_quota_size
334 	 * is being passed
335 	 */
336 	uint8_t hw_stats_quota_size_valid;
337 	uint32_t hw_stats_quota_size;
338 
339 	/* Optional
340 	 * Modem HW Drop Stats Table Start Address
341 	 * Must be set to true if hw_drop_stats_base_addr
342 	 * is being passed
343 	 */
344 	uint8_t hw_drop_stats_base_addr_valid;
345 	uint32_t hw_drop_stats_base_addr;
346 
347 	/* Optional
348 	 * Modem HW Drop Stats Table size
349 	 * Must be set to true if hw_drop_stats_table_size
350 	 * is being passed
351 	 */
352 	uint8_t hw_drop_stats_table_size_valid;
353 	uint32_t hw_drop_stats_table_size;
354 };  /* Message */
355 
356 /* Response Message; Requests the modem IPA driver about initialization */
357 struct ipa_init_modem_driver_resp_msg_v01 {
358 	/* Mandatory */
359 	/*  Result Code */
360 	struct ipa_qmi_response_type_v01 resp;
361 	/* Standard response type.*/
362 
363 	/* Optional */
364 	/* Destination end point for control commands from master driver */
365 	uint8_t ctrl_comm_dest_end_pt_valid;
366 	/* Must be set to true if ctrl_comm_dest_ep is being passed */
367 	uint32_t ctrl_comm_dest_end_pt;
368 	/*	Provides information about the destination end point on the
369 	 *	modem processor to which the master driver can send control
370 	 *	commands. The value of this parameter cannot exceed 19 since
371 	 *	IPA only supports 20 end points. This field is looked at only
372 	 *	if the result in TLV RESULT_CODE is	QMI_RESULT_SUCCESS
373 	 */
374 
375 	/* Optional */
376 	/*  Default end point */
377 	uint8_t default_end_pt_valid;
378 	/* Must be set to true if default_end_pt is being passed */
379 	uint32_t default_end_pt;
380 	/*  Provides information about the default end point. The master
381 	 *	driver may or may not set the register in the hardware with
382 	 *	this value. The value of this parameter cannot exceed 19
383 	 *	since IPA only supports 20 end points. This field is looked
384 	 *	at only if the result in TLV RESULT_CODE is QMI_RESULT_SUCCESS
385 	 */
386 
387 	/* Optional */
388 	/*  Modem Driver Initialization Pending */
389 	uint8_t modem_driver_init_pending_valid;
390 	/* Must be set to true if modem_driver_init_pending is being passed */
391 	uint8_t modem_driver_init_pending;
392 	/*
393 	 * Identifies if second level message handshake is needed
394 	 *	between drivers to indicate when IPA HWP loading is completed.
395 	 *	If this is set by modem driver, AP driver will need to wait
396 	 *	for a INIT_MODEM_DRIVER_CMPLT message before communicating with
397 	 *	IPA HWP.
398 	 */
399 };  /* Message */
400 
401 /*
402  * Request Message; Request from Modem IPA driver to indicate
403  *	modem driver init completion
404  */
405 struct ipa_init_modem_driver_cmplt_req_msg_v01 {
406 	/* Mandatory */
407 	/*  Modem Driver init complete status; */
408 	uint8_t status;
409 	/*
410 	 * Specifies whether the modem driver initialization is complete
411 	 *	including the micro controller image loading.
412 	 */
413 };  /* Message */
414 
415 /*
416  * Response Message; Request from Modem IPA driver to indicate
417  *	modem driver init completion
418  */
419 struct ipa_init_modem_driver_cmplt_resp_msg_v01 {
420 	/* Mandatory */
421 	/*  Result Code */
422 	struct ipa_qmi_response_type_v01 resp;
423 	/**<   Standard response type.*/
424 };  /* Message */
425 
426 /*	Request Message; This is the message that is exchanged between the
427  *	control point and the service in order to register for indications.
428  */
429 struct ipa_indication_reg_req_msg_v01 {
430 	/* Optional */
431 	/*  Master driver initialization completion */
432 	uint8_t master_driver_init_complete_valid;
433 	/* Must be set to true if master_driver_init_complete is being passed */
434 	uint8_t master_driver_init_complete;
435 	/*  If set to TRUE, this field indicates that the client is
436 	 *	interested in getting indications about the completion
437 	 *	of the initialization sequence of the master driver.
438 	 *	Setting this field in the request message makes sense
439 	 *	only when the QMI_IPA_INDICATION_REGISTER_REQ is being
440 	 *	originated from the modem driver
441 	 */
442 
443 	/* Optional */
444 	/*  Data Usage Quota Reached */
445 	uint8_t data_usage_quota_reached_valid;
446 	/*  Must be set to true if data_usage_quota_reached is being passed */
447 	uint8_t data_usage_quota_reached;
448 	/*  If set to TRUE, this field indicates that the client wants to
449 	 *  receive indications about reaching the data usage quota that
450 	 *  previously set via QMI_IPA_SET_DATA_USAGE_QUOTA. Setting this field
451 	 *  in the request message makes sense only when the
452 	 *  QMI_IPA_INDICATION_REGISTER_REQ is being originated from the Master
453 	 *  driver
454 	 */
455 };  /* Message */
456 
457 
458 /* Response Message; This is the message that is exchanged between the
459  *	control point and the service in order to register for indications.
460  */
461 struct ipa_indication_reg_resp_msg_v01 {
462 	/* Mandatory */
463 	/*  Result Code */
464 	struct ipa_qmi_response_type_v01 resp;
465 	/**<   Standard response type.*/
466 };  /* Message */
467 
468 
469 /*	Indication Message; Indication sent to the Modem IPA driver from
470  *	master IPA driver about initialization being complete.
471  */
472 struct ipa_master_driver_init_complt_ind_msg_v01 {
473 	/* Mandatory */
474 	/*  Master driver initialization completion status */
475 	struct ipa_qmi_response_type_v01 master_driver_init_status;
476 	/*	Indicates the status of initialization. If everything went
477 	 *	as expected, this field is set to SUCCESS. ERROR is set
478 	 *	otherwise. Extended error info may be used to convey
479 	 *	additional information about the error
480 	 */
481 };  /* Message */
482 
483 struct ipa_ipfltr_range_eq_16_type_v01 {
484 	uint8_t offset;
485 	/*	Specifies the offset from the IHL (Internet Header length) */
486 
487 	uint16_t range_low;
488 	/*	Specifies the lower bound of the range */
489 
490 	uint16_t range_high;
491 	/*	Specifies the upper bound of the range */
492 };  /* Type */
493 
494 struct ipa_ipfltr_mask_eq_32_type_v01 {
495 	uint8_t offset;
496 	/*	Specifies the offset either from IHL or from the start of
497 	 *	the IP packet. This depends on the equation that this structure
498 	 *	is used in.
499 	 */
500 
501 	uint32_t mask;
502 	/*	Specifies the mask that has to be used in the comparison.
503 	 *	The field is ANDed with the mask and compared against the value.
504 	 */
505 
506 	uint32_t value;
507 	/*	Specifies the 32 bit value that used in the comparison. */
508 };  /* Type */
509 
510 struct ipa_ipfltr_eq_16_type_v01 {
511 	uint8_t offset;
512 	/*  Specifies the offset into the packet */
513 
514 	uint16_t value;
515 	/* Specifies the 16 bit value that should be used in the comparison. */
516 };  /* Type */
517 
518 struct ipa_ipfltr_eq_32_type_v01 {
519 	uint8_t offset;
520 	/* Specifies the offset into the packet */
521 
522 	uint32_t value;
523 	/* Specifies the 32 bit value that should be used in the comparison. */
524 };  /* Type */
525 
526 struct ipa_ipfltr_mask_eq_128_type_v01 {
527 	uint8_t offset;
528 	/* Specifies the offset into the packet */
529 
530 	uint8_t mask[16];
531 	/*  Specifies the mask that has to be used in the comparison.
532 	 *	The field is ANDed with the mask and compared against the value.
533 	 */
534 
535 	uint8_t value[16];
536 	/* Specifies the 128 bit value that should be used in the comparison. */
537 };  /* Type */
538 
539 
540 struct ipa_filter_rule_type_v01 {
541 	uint16_t rule_eq_bitmap;
542 	/* 16-bit Bitmask to indicate how many eqs are valid in this rule */
543 
544 	uint8_t tos_eq_present;
545 	/* Specifies if a type of service check rule is present */
546 
547 	uint8_t tos_eq;
548 	/* The value to check against the type of service (ipv4) field */
549 
550 	uint8_t protocol_eq_present;
551 	/* Specifies if a protocol check rule is present */
552 
553 	uint8_t protocol_eq;
554 	/* The value to check against the protocol field */
555 
556 	uint8_t num_ihl_offset_range_16;
557 	/*  The number of 16 bit range check rules at the location
558 	 *	determined by IP header length plus a given offset offset
559 	 *	in this rule. See the definition of the ipa_filter_range_eq_16
560 	 *	for better understanding. The value of this field cannot exceed
561 	 *	IPA_IPFLTR_NUM_IHL_RANGE_16_EQNS which is set as 2
562 	 */
563 
564 	struct ipa_ipfltr_range_eq_16_type_v01
565 		ihl_offset_range_16[QMI_IPA_IPFLTR_NUM_IHL_RANGE_16_EQNS_V01];
566 	/*	Array of the registered IP header length offset 16 bit range
567 	 *	check rules.
568 	 */
569 
570 	uint8_t num_offset_meq_32;
571 	/*  The number of 32 bit masked comparison rules present
572 	 *  in this rule
573 	 */
574 
575 	struct ipa_ipfltr_mask_eq_32_type_v01
576 		offset_meq_32[QMI_IPA_IPFLTR_NUM_MEQ_32_EQNS_V01];
577 	/*  An array of all the possible 32bit masked comparison rules
578 	 *	in this rule
579 	 */
580 
581 	uint8_t tc_eq_present;
582 	/*  Specifies if the traffic class rule is present in this rule */
583 
584 	uint8_t tc_eq;
585 	/* The value against which the IPV4 traffic class field has to
586 	* be checked
587 	*/
588 
589 	uint8_t flow_eq_present;
590 	/* Specifies if the "flow equals" rule is present in this rule */
591 
592 	uint32_t flow_eq;
593 	/* The value against which the IPV6 flow field has to be checked */
594 
595 	uint8_t ihl_offset_eq_16_present;
596 	/*	Specifies if there is a 16 bit comparison required at the
597 	 *	location in	the packet determined by "Intenet Header length
598 	 *	+ specified offset"
599 	 */
600 
601 	struct ipa_ipfltr_eq_16_type_v01 ihl_offset_eq_16;
602 	/* The 16 bit comparison equation */
603 
604 	uint8_t ihl_offset_eq_32_present;
605 	/*	Specifies if there is a 32 bit comparison required at the
606 	 *	location in the packet determined by "Intenet Header length
607 	 *	+ specified offset"
608 	 */
609 
610 	struct ipa_ipfltr_eq_32_type_v01 ihl_offset_eq_32;
611 	/*	The 32 bit comparison equation */
612 
613 	uint8_t num_ihl_offset_meq_32;
614 	/*	The number of 32 bit masked comparison equations in this
615 	 *	rule. The location of the packet to be compared is
616 	 *	determined by the IP Header length + the give offset
617 	 */
618 
619 	struct ipa_ipfltr_mask_eq_32_type_v01
620 		ihl_offset_meq_32[QMI_IPA_IPFLTR_NUM_IHL_MEQ_32_EQNS_V01];
621 	/*	Array of 32 bit masked comparison equations.
622 	*/
623 
624 	uint8_t num_offset_meq_128;
625 	/*	The number of 128 bit comparison equations in this rule */
626 
627 	struct ipa_ipfltr_mask_eq_128_type_v01
628 		offset_meq_128[QMI_IPA_IPFLTR_NUM_MEQ_128_EQNS_V01];
629 	/*	Array of 128 bit comparison equations. The location in the
630 	 *	packet is determined by the specified offset
631 	 */
632 
633 	uint8_t metadata_meq32_present;
634 	/*  Boolean indicating if the 32 bit masked comparison equation
635 	 *	is present or not. Comparison is done against the metadata
636 	 *	in IPA. Metadata can either be extracted from the packet
637 	 *	header or from the "metadata" register.
638 	 */
639 
640 	struct ipa_ipfltr_mask_eq_32_type_v01
641 			metadata_meq32;
642 	/* The metadata  32 bit masked comparison equation */
643 
644 	uint8_t ipv4_frag_eq_present;
645 	/* Specifies if the IPv4 Fragment equation is present in this rule */
646 };  /* Type */
647 
648 
649 enum ipa_ip_type_enum_v01 {
650 	IPA_IP_TYPE_ENUM_MIN_ENUM_VAL_V01 = -2147483647,
651 	/* To force a 32 bit signed enum.  Do not change or use*/
652 	QMI_IPA_IP_TYPE_INVALID_V01 = 0,
653 	/*  Invalid IP type identifier */
654 	QMI_IPA_IP_TYPE_V4_V01 = 1,
655 	/*  IP V4 type */
656 	QMI_IPA_IP_TYPE_V6_V01 = 2,
657 	/*  IP V6 type */
658 	QMI_IPA_IP_TYPE_V4V6_V01 = 3,
659 	/*  Applies to both IP types */
660 	IPA_IP_TYPE_ENUM_MAX_ENUM_VAL_V01 = 2147483647
661 	/* To force a 32 bit signed enum.  Do not change or use*/
662 };
663 
664 
665 enum ipa_filter_action_enum_v01 {
666 	IPA_FILTER_ACTION_ENUM_MIN_ENUM_VAL_V01 = -2147483647,
667 	/* To force a 32 bit signed enum. Do not change or use */
668 	QMI_IPA_FILTER_ACTION_INVALID_V01 = 0,
669 	/*  Invalid action on filter hit */
670 	QMI_IPA_FILTER_ACTION_SRC_NAT_V01 = 1,
671 	/*  Pass packet to NAT block for Source NAT */
672 	QMI_IPA_FILTER_ACTION_DST_NAT_V01 = 2,
673 	/*  Pass packet to NAT block for Destination NAT */
674 	QMI_IPA_FILTER_ACTION_ROUTING_V01 = 3,
675 	/*  Pass packet to Routing block */
676 	QMI_IPA_FILTER_ACTION_EXCEPTION_V01 = 4,
677 	/*  Treat packet as exception and send to exception pipe */
678 	IPA_FILTER_ACTION_ENUM_MAX_ENUM_VAL_V01 = 2147483647
679 	/* To force a 32 bit signed enum.  Do not change or use*/
680 };
681 
682 struct ipa_filter_spec_type_v01 {
683 	uint32_t filter_spec_identifier;
684 	/*	This field is used to identify a filter spec in the list
685 	 *	of filter specs being sent from the client. This field
686 	 *	is applicable only in the filter install request and response.
687 	 */
688 
689 	enum ipa_ip_type_enum_v01 ip_type;
690 	/*	This field identifies the IP type for which this rule is
691 	 *	applicable. The driver needs to identify the filter table
692 	 *	(V6 or V4) and this field is essential for that
693 	 */
694 
695 	struct ipa_filter_rule_type_v01 filter_rule;
696 	/*	This field specifies the rules in the filter spec. These rules
697 	 *	are the ones that are matched against fields in the packet.
698 	 */
699 
700 	enum ipa_filter_action_enum_v01 filter_action;
701 	/*	This field specifies the action to be taken when a filter match
702 	 *	occurs. The remote side should install this information into the
703 	 *	hardware along with the filter equations.
704 	 */
705 
706 	uint8_t is_routing_table_index_valid;
707 	/*	Specifies whether the routing table index is present or not.
708 	 *	If the action is "QMI_IPA_FILTER_ACTION_EXCEPTION", this
709 	 *	parameter need not be provided.
710 	 */
711 
712 	uint32_t route_table_index;
713 	/*	This is the index in the routing table that should be used
714 	 *	to route the packets if the filter rule is hit
715 	 */
716 
717 	uint8_t is_mux_id_valid;
718 	/*	Specifies whether the mux_id is valid */
719 
720 	uint32_t mux_id;
721 	/*	This field identifies the QMAP MUX ID. As a part of QMAP
722 	 *	protocol, several data calls may be multiplexed over the
723 	 *	same physical transport channel. This identifier is used to
724 	 *	identify one such data call. The maximum value for this
725 	 *	identifier is 255.
726 	 */
727 };  /* Type */
728 
729 struct ipa_filter_spec_ex_type_v01 {
730 	enum ipa_ip_type_enum_v01 ip_type;
731 	/*	This field identifies the IP type for which this rule is
732 	 *	applicable. The driver needs to identify the filter table
733 	 *	(V6 or V4) and this field is essential for that
734 	 */
735 
736 	struct ipa_filter_rule_type_v01 filter_rule;
737 	/*	This field specifies the rules in the filter spec. These rules
738 	 *	are the ones that are matched against fields in the packet.
739 	 */
740 
741 	enum ipa_filter_action_enum_v01 filter_action;
742 	/*	This field specifies the action to be taken when a filter match
743 	 *	occurs. The remote side should install this information into the
744 	 *	hardware along with the filter equations.
745 	 */
746 
747 	uint8_t is_routing_table_index_valid;
748 	/*	Specifies whether the routing table index is present or not.
749 	 *	If the action is "QMI_IPA_FILTER_ACTION_EXCEPTION", this
750 	 *	parameter need not be provided.
751 	 */
752 
753 	uint32_t route_table_index;
754 	/*	This is the index in the routing table that should be used
755 	 *	to route the packets if the filter rule is hit
756 	 */
757 
758 	uint8_t is_mux_id_valid;
759 	/*	Specifies whether the mux_id is valid */
760 
761 	uint32_t mux_id;
762 	/*	This field identifies the QMAP MUX ID. As a part of QMAP
763 	 *	protocol, several data calls may be multiplexed over the
764 	 *	same physical transport channel. This identifier is used to
765 	 *	identify one such data call. The maximum value for this
766 	 *	identifier is 255.
767 	 */
768 
769 	uint32_t rule_id;
770 	/* Rule Id of the given filter. The Rule Id is populated in the rule
771 	* header when installing the rule in IPA.
772 	*/
773 
774 	uint8_t is_rule_hashable;
775 	/** Specifies whether the given rule is hashable.
776 	*/
777 };  /* Type */
778 
779 
780 /*  Request Message; This is the message that is exchanged between the
781  *	control point and the service in order to request the installation
782  *	of filtering rules in the hardware block by the remote side.
783  */
784 struct ipa_install_fltr_rule_req_msg_v01 {
785 	/* Optional
786 	* IP type that this rule applies to
787 	* Filter specification to be installed in the hardware
788 	*/
789 	uint8_t filter_spec_list_valid;
790 	/* Must be set to true if filter_spec_list is being passed */
791 	uint32_t filter_spec_list_len;
792 	/* Must be set to # of elements in filter_spec_list */
793 	struct ipa_filter_spec_type_v01
794 		filter_spec_list[QMI_IPA_MAX_FILTERS_V01];
795 	/*	This structure defines the list of filters that have
796 	 *		to be installed in the hardware. The driver installing
797 	 *		these rules shall do so in the same order as specified
798 	 *		in this list.
799 	 */
800 
801 	/* Optional */
802 	/*  Pipe index to intall rule */
803 	uint8_t source_pipe_index_valid;
804 	/* Must be set to true if source_pipe_index is being passed */
805 	uint32_t source_pipe_index;
806 	/*	This is the source pipe on which the filter rule is to be
807 	 *	installed. The requestor may always not know the pipe
808 	 *	indices. If not specified, the receiver shall install
809 	 *	this rule on all the pipes that it controls through
810 	 *	which data may be fed into IPA.
811 	 */
812 
813 	/* Optional */
814 	/*  Total number of IPv4 filters in the filter spec list */
815 	uint8_t num_ipv4_filters_valid;
816 	/* Must be set to true if num_ipv4_filters is being passed */
817 	uint32_t num_ipv4_filters;
818 	/*   Number of IPv4 rules included in filter spec list */
819 
820 	/* Optional */
821 	/*  Total number of IPv6 filters in the filter spec list */
822 	uint8_t num_ipv6_filters_valid;
823 	/* Must be set to true if num_ipv6_filters is being passed */
824 	uint32_t num_ipv6_filters;
825 	/* Number of IPv6 rules included in filter spec list */
826 
827 	/* Optional */
828 	/*  List of XLAT filter indices in the filter spec list */
829 	uint8_t xlat_filter_indices_list_valid;
830 	/* Must be set to true if xlat_filter_indices_list
831 	 * is being passed
832 	 */
833 	uint32_t xlat_filter_indices_list_len;
834 	/* Must be set to # of elements in xlat_filter_indices_list */
835 	uint32_t xlat_filter_indices_list[QMI_IPA_MAX_FILTERS_V01];
836 	/* List of XLAT filter indices. Filter rules at specified indices
837 	 * will need to be modified by the receiver if the PDN is XLAT
838 	 * before installing them on the associated IPA consumer pipe.
839 	 */
840 
841 	/* Optional */
842 	/*  Extended Filter Specification  */
843 	uint8_t filter_spec_ex_list_valid;
844 	/* Must be set to true if filter_spec_ex_list is being passed */
845 	uint32_t filter_spec_ex_list_len;
846 	/* Must be set to # of elements in filter_spec_ex_list */
847 	struct ipa_filter_spec_ex_type_v01
848 		filter_spec_ex_list[QMI_IPA_MAX_FILTERS_V01];
849 	/*
850 	 * List of filter specifications of filters that must be installed in
851 	 *	the IPAv3.x hardware.
852 	 *	The driver installing these rules must do so in the same
853 	 *	order as specified in this list.
854 	 */
855 };  /* Message */
856 
857 struct ipa_filter_rule_identifier_to_handle_map_v01 {
858 	uint32_t filter_spec_identifier;
859 	/*	This field is used to identify a filter spec in the list of
860 	 *	filter specs being sent from the client. This field is
861 	 *	applicable only in the filter install request and response.
862 	 */
863 	uint32_t filter_handle;
864 	/*  This field is used to identify a rule in any subsequent message.
865 	 *	This is a value that is provided by the server to the control
866 	 *	point
867 	 */
868 };  /* Type */
869 
870 /* Response Message; This is the message that is exchanged between the
871  * control point and the service in order to request the
872  * installation of filtering rules in the hardware block by
873  * the remote side.
874  */
875 struct ipa_install_fltr_rule_resp_msg_v01 {
876 	/* Mandatory */
877 	/*  Result Code */
878 	struct ipa_qmi_response_type_v01 resp;
879 	/*	Standard response type.
880 	 *	Standard response type. Contains the following data members:
881 	 *	- qmi_result_type -- QMI_RESULT_SUCCESS or QMI_RESULT_FAILURE
882 	 *	- qmi_error_type  -- Error code. Possible error code values are
883 	 *	described in the error codes section of each message definition.
884 	 */
885 
886 	/* Optional */
887 	/*  Filter Handle List */
888 	uint8_t filter_handle_list_valid;
889 	/* Must be set to true if filter_handle_list is being passed */
890 	uint32_t filter_handle_list_len;
891 	/* Must be set to # of elements in filter_handle_list */
892 	struct ipa_filter_rule_identifier_to_handle_map_v01
893 		filter_handle_list[QMI_IPA_MAX_FILTERS_V01];
894 	/*
895 	 * List of handles returned to the control point. Each handle is
896 	 *	mapped to the rule identifier that was specified in the
897 	 *	request message. Any further reference to the rule is done
898 	 *	using the filter handle.
899 	 */
900 
901 	/* Optional */
902 	/*  Rule id List */
903 	uint8_t rule_id_valid;
904 	/* Must be set to true if rule_id is being passed */
905 	uint32_t rule_id_len;
906 	/* Must be set to # of elements in rule_id */
907 	uint32_t rule_id[QMI_IPA_MAX_FILTERS_V01];
908 	/*
909 	 * List of rule ids returned to the control point.
910 	 *	Any further reference to the rule is done using the
911 	 *	filter rule id specified in this list.
912 	 */
913 };  /* Message */
914 
915 struct ipa_filter_handle_to_index_map_v01 {
916 	uint32_t filter_handle;
917 	/*	This is a handle that was given to the remote client that
918 	 *	requested the rule addition.
919 	 */
920 	uint32_t filter_index;
921 	/*	This index denotes the location in a filter table, where the
922 	 *	filter rule has been installed. The maximum value of this
923 	 *	field is 64.
924 	 */
925 };  /* Type */
926 
927 /* Request Message; This is the message that is exchanged between the
928  * control point and the service in order to notify the remote driver
929  * of the installation of the filter rule supplied earlier by the
930  * remote driver.
931  */
932 struct ipa_fltr_installed_notif_req_msg_v01 {
933 	/*	Mandatory	*/
934 	/*  Pipe index	*/
935 	uint32_t source_pipe_index;
936 	/*	This is the source pipe on which the filter rule has been
937 	 *	installed or was attempted to be installed
938 	 */
939 
940 	/* Mandatory */
941 	/*  Installation Status */
942 	enum ipa_qmi_result_type_v01 install_status;
943 	/*	This is the status of installation. If this indicates
944 	 *	SUCCESS, other optional fields carry additional
945 	 *	information
946 	 */
947 
948 	/* Mandatory */
949 	/*  List of Filter Indices */
950 	uint32_t filter_index_list_len;
951 	/* Must be set to # of elements in filter_index_list */
952 	struct ipa_filter_handle_to_index_map_v01
953 		filter_index_list[QMI_IPA_MAX_FILTERS_V01];
954 	/*
955 	 * Provides the list of filter indices and the corresponding
956 	 *	filter handle. If the installation_status indicates a
957 	 *	failure, the filter indices must be set to a reserve
958 	 *	index (255).
959 	 */
960 
961 	/* Optional */
962 	/*  Embedded pipe index */
963 	uint8_t embedded_pipe_index_valid;
964 	/* Must be set to true if embedded_pipe_index is being passed */
965 	uint32_t embedded_pipe_index;
966 	/*	This index denotes the embedded pipe number on which a call to
967 	 *	the same PDN has been made. If this field is set, it denotes
968 	 *	that this is a use case where PDN sharing is happening. The
969 	 *	embedded pipe is used to send data from the embedded client
970 	 *	in the device
971 	 */
972 
973 	/* Optional */
974 	/*  Retain Header Configuration */
975 	uint8_t retain_header_valid;
976 	/* Must be set to true if retain_header is being passed */
977 	uint8_t retain_header;
978 	/*	This field indicates if the driver installing the rule has
979 	 *	turned on the "retain header" bit. If this is true, the
980 	 *	header that is removed by IPA is reinserted after the
981 	 *	packet processing is completed.
982 	 */
983 
984 	/* Optional */
985 	/*  Embedded call Mux Id */
986 	uint8_t embedded_call_mux_id_valid;
987 	/**< Must be set to true if embedded_call_mux_id is being passed */
988 	uint32_t embedded_call_mux_id;
989 	/*	This identifies one of the many calls that have been originated
990 	 *	on the embedded pipe. This is how we identify the PDN gateway
991 	 *	to which traffic from the source pipe has to flow.
992 	 */
993 
994 	/* Optional */
995 	/*  Total number of IPv4 filters in the filter index list */
996 	uint8_t num_ipv4_filters_valid;
997 	/* Must be set to true if num_ipv4_filters is being passed */
998 	uint32_t num_ipv4_filters;
999 	/* Number of IPv4 rules included in filter index list */
1000 
1001 	/* Optional */
1002 	/*  Total number of IPv6 filters in the filter index list */
1003 	uint8_t num_ipv6_filters_valid;
1004 	/* Must be set to true if num_ipv6_filters is being passed */
1005 	uint32_t num_ipv6_filters;
1006 	/* Number of IPv6 rules included in filter index list */
1007 
1008 	/* Optional */
1009 	/*  Start index on IPv4 filters installed on source pipe */
1010 	uint8_t start_ipv4_filter_idx_valid;
1011 	/* Must be set to true if start_ipv4_filter_idx is being passed */
1012 	uint32_t start_ipv4_filter_idx;
1013 	/* Start index of IPv4 rules in filter index list */
1014 
1015 	/* Optional */
1016 	/*  Start index on IPv6 filters installed on source pipe */
1017 	uint8_t start_ipv6_filter_idx_valid;
1018 	/* Must be set to true if start_ipv6_filter_idx is being passed */
1019 	uint32_t start_ipv6_filter_idx;
1020 	/* Start index of IPv6 rules in filter index list */
1021 
1022 	/* Optional */
1023 	/*  List of Rule Ids */
1024 	uint8_t rule_id_valid;
1025 	/* Must be set to true if rule_id is being passed */
1026 	uint32_t rule_id_len;
1027 	/* Must be set to # of elements in rule_id */
1028 	uint32_t rule_id[QMI_IPA_MAX_FILTERS_V01];
1029 	/*
1030 	 * Provides the list of Rule Ids of rules added in IPA on the given
1031 	 *	source pipe index. If the install_status TLV indicates a
1032 	 *	failure, the Rule Ids in this list must be set to a reserved
1033 	 *	index (255).
1034 	 */
1035 
1036 	/* Optional */
1037 	/*	List of destination pipe IDs. */
1038 	uint8_t dst_pipe_id_valid;
1039 	/* Must be set to true if dst_pipe_id is being passed. */
1040 	uint32_t dst_pipe_id_len;
1041 	/* Must be set to # of elements in dst_pipe_id. */
1042 	uint32_t dst_pipe_id[QMI_IPA_MAX_CLIENT_DST_PIPES_V01];
1043 	/* Provides the list of destination pipe IDs for a source pipe. */
1044 
1045 };  /* Message */
1046 
1047 /* Response Message; This is the message that is exchanged between the
1048  * control point and the service in order to notify the remote driver
1049  * of the installation of the filter rule supplied earlier by the
1050  * remote driver.
1051  */
1052 struct ipa_fltr_installed_notif_resp_msg_v01 {
1053 	/* Mandatory */
1054 	/*  Result Code */
1055 	struct ipa_qmi_response_type_v01 resp;
1056 	/*	Standard response type */
1057 };  /* Message */
1058 
1059 /* Request Message; Notifies the remote driver of the need to clear the data
1060  * path to prevent the IPA from being blocked at the head of the processing
1061  * pipeline
1062  */
1063 struct ipa_enable_force_clear_datapath_req_msg_v01 {
1064 	/* Mandatory */
1065 	/*  Pipe Mask */
1066 	uint32_t source_pipe_bitmask;
1067 	/* Set of consumer (source) pipes that must be clear of
1068 	 * active data transfers.
1069 	 */
1070 
1071 	/* Mandatory */
1072 	/* Request ID */
1073 	uint32_t request_id;
1074 	/* Identifies the ID of the request that is sent to the server
1075 	 * The same request ID is used in the message to remove the force_clear
1076 	 * request. The server is expected to keep track of the request ID and
1077 	 * the source_pipe_bitmask so that it can revert as needed
1078 	 */
1079 
1080 	/* Optional */
1081 	/*  Source Throttle State */
1082 	uint8_t throttle_source_valid;
1083 	/* Must be set to true if throttle_source is being passed */
1084 	uint8_t throttle_source;
1085 	/*  Specifies whether the server is to throttle the data from
1086 	 *	these consumer (source) pipes after clearing the exisiting
1087 	 *	data present in the IPA that were pulled from these pipes
1088 	 *	The server is expected to put all the source pipes in the
1089 	 *	source_pipe_bitmask in the same state
1090 	 */
1091 };  /* Message */
1092 
1093 /* Response Message; Notifies the remote driver of the need to clear the
1094  * data path to prevent the IPA from being blocked at the head of the
1095  * processing pipeline
1096  */
1097 struct ipa_enable_force_clear_datapath_resp_msg_v01 {
1098 	/* Mandatory */
1099 	/*  Result Code */
1100 	struct ipa_qmi_response_type_v01 resp;
1101 	/* Standard response type */
1102 };  /* Message */
1103 
1104 /* Request Message; Notifies the remote driver that the forceful clearing
1105  * of the data path can be lifted
1106  */
1107 struct ipa_disable_force_clear_datapath_req_msg_v01 {
1108 	/* Mandatory */
1109 	/* Request ID */
1110 	uint32_t request_id;
1111 	/* Identifies the request that was sent to the server to
1112 	 * forcibly clear the data path. This request simply undoes
1113 	 * the operation done in that request
1114 	 */
1115 };  /* Message */
1116 
1117 /* Response Message; Notifies the remote driver that the forceful clearing
1118  * of the data path can be lifted
1119  */
1120 struct ipa_disable_force_clear_datapath_resp_msg_v01 {
1121 	/* Mandatory */
1122 	/*  Result Code */
1123 	struct ipa_qmi_response_type_v01 resp;
1124 	/* Standard response type */
1125 };  /* Message */
1126 
1127 enum ipa_peripheral_speed_enum_v01 {
1128 	IPA_PERIPHERAL_SPEED_ENUM_MIN_ENUM_VAL_V01 = -2147483647,
1129 	/* To force a 32 bit signed enum.  Do not change or use */
1130 	QMI_IPA_PER_USB_FS_V01 = 1,
1131 	/*  Full-speed USB connection */
1132 	QMI_IPA_PER_USB_HS_V01 = 2,
1133 	/*  High-speed USB connection */
1134 	QMI_IPA_PER_USB_SS_V01 = 3,
1135 	/*  Super-speed USB connection */
1136 	QMI_IPA_PER_WLAN_V01 = 4,
1137 	/*  WLAN connection */
1138 	IPA_PERIPHERAL_SPEED_ENUM_MAX_ENUM_VAL_V01 = 2147483647
1139 	/* To force a 32 bit signed enum.  Do not change or use*/
1140 };
1141 
1142 enum ipa_pipe_mode_enum_v01 {
1143 	IPA_PIPE_MODE_ENUM_MIN_ENUM_VAL_V01 = -2147483647,
1144 	/* To force a 32 bit signed enum.  Do not change or use */
1145 	QMI_IPA_PIPE_MODE_HW_V01 = 1,
1146 	/*  Pipe is connected with a hardware block */
1147 	QMI_IPA_PIPE_MODE_SW_V01 = 2,
1148 	/*  Pipe is controlled by the software */
1149 	IPA_PIPE_MODE_ENUM_MAX_ENUM_VAL_V01 = 2147483647
1150 	/* To force a 32 bit signed enum.  Do not change or use */
1151 };
1152 
1153 enum ipa_peripheral_type_enum_v01 {
1154 	IPA_PERIPHERAL_TYPE_ENUM_MIN_ENUM_VAL_V01 = -2147483647,
1155 	/* To force a 32 bit signed enum.  Do not change or use */
1156 	QMI_IPA_PERIPHERAL_USB_V01 = 1,
1157 	/*  Specifies a USB peripheral */
1158 	QMI_IPA_PERIPHERAL_HSIC_V01 = 2,
1159 	/*  Specifies an HSIC peripheral */
1160 	QMI_IPA_PERIPHERAL_PCIE_V01 = 3,
1161 	/*  Specifies a PCIe	peripheral */
1162 	IPA_PERIPHERAL_TYPE_ENUM_MAX_ENUM_VAL_V01 = 2147483647
1163 	/* To force a 32 bit signed enum.  Do not change or use */
1164 };
1165 
1166 struct ipa_config_req_msg_v01 {
1167 	/* Optional */
1168 	/*  Peripheral Type */
1169 	uint8_t peripheral_type_valid;
1170 	/* Must be set to true if peripheral_type is being passed */
1171 	enum ipa_peripheral_type_enum_v01 peripheral_type;
1172 	/* Informs the remote driver about the perhipheral for
1173 	 * which this configuration information is relevant. Values:
1174 	 *	- QMI_IPA_PERIPHERAL_USB (1) -- Specifies a USB peripheral
1175 	 *	- QMI_IPA_PERIPHERAL_HSIC(2) -- Specifies an HSIC peripheral
1176 	 *	- QMI_IPA_PERIPHERAL_PCIE(3) -- Specifies a PCIe peripheral
1177 	 */
1178 
1179 	/* Optional */
1180 	/*  HW Deaggregation Support */
1181 	uint8_t hw_deaggr_supported_valid;
1182 	/* Must be set to true if hw_deaggr_supported is being passed */
1183 	uint8_t hw_deaggr_supported;
1184 	/* Informs the remote driver whether the local IPA driver
1185 	 * allows de-aggregation to be performed in the hardware
1186 	 */
1187 
1188 	/* Optional */
1189 	/*  Maximum Aggregation Frame Size */
1190 	uint8_t max_aggr_frame_size_valid;
1191 	/* Must be set to true if max_aggr_frame_size is being passed */
1192 	uint32_t max_aggr_frame_size;
1193 	/* Specifies the maximum size of the aggregated frame that
1194 	 * the remote driver can expect from this execution environment
1195 	 *	- Valid range: 128 bytes to 32768 bytes
1196 	 */
1197 
1198 	/* Optional */
1199 	/*  IPA Ingress Pipe Mode */
1200 	uint8_t ipa_ingress_pipe_mode_valid;
1201 	/* Must be set to true if ipa_ingress_pipe_mode is being passed */
1202 
1203 	enum ipa_pipe_mode_enum_v01 ipa_ingress_pipe_mode;
1204 	/* Indicates to the remote driver if the ingress pipe into the
1205 	 *	IPA is in direct connection with another hardware block or
1206 	 *	if the producer of data to this ingress pipe is a software
1207 	 *  module. Values:
1208 	 *	-QMI_IPA_PIPE_MODE_HW(1) --Pipe is connected with hardware block
1209 	 *	-QMI_IPA_PIPE_MODE_SW(2) --Pipe is controlled by the software
1210 	 */
1211 
1212 	/* Optional */
1213 	/*  Peripheral Speed Info */
1214 	uint8_t peripheral_speed_info_valid;
1215 	/* Must be set to true if peripheral_speed_info is being passed */
1216 
1217 	enum ipa_peripheral_speed_enum_v01 peripheral_speed_info;
1218 	/* Indicates the speed that the peripheral connected to the IPA supports
1219 	 * Values:
1220 	 *	- QMI_IPA_PER_USB_FS (1) --  Full-speed USB connection
1221 	 *	- QMI_IPA_PER_USB_HS (2) --  High-speed USB connection
1222 	 *	- QMI_IPA_PER_USB_SS (3) --  Super-speed USB connection
1223 	 *  - QMI_IPA_PER_WLAN   (4) --  WLAN connection
1224 	 */
1225 
1226 	/* Optional */
1227 	/*  Downlink Accumulation Time limit */
1228 	uint8_t dl_accumulation_time_limit_valid;
1229 	/* Must be set to true if dl_accumulation_time_limit is being passed */
1230 	uint32_t dl_accumulation_time_limit;
1231 	/* Informs the remote driver about the time for which data
1232 	 * is accumulated in the downlink direction before it is pushed into the
1233 	 * IPA (downlink is with respect to the WWAN air interface)
1234 	 * - Units: milliseconds
1235 	 * - Maximum value: 255
1236 	 */
1237 
1238 	/* Optional */
1239 	/*  Downlink Accumulation Packet limit */
1240 	uint8_t dl_accumulation_pkt_limit_valid;
1241 	/* Must be set to true if dl_accumulation_pkt_limit is being passed */
1242 	uint32_t dl_accumulation_pkt_limit;
1243 	/* Informs the remote driver about the number of packets
1244 	 * that are to be accumulated in the downlink direction before it is
1245 	 * pushed into the IPA - Maximum value: 1023
1246 	 */
1247 
1248 	/* Optional */
1249 	/*  Downlink Accumulation Byte Limit */
1250 	uint8_t dl_accumulation_byte_limit_valid;
1251 	/* Must be set to true if dl_accumulation_byte_limit is being passed */
1252 	uint32_t dl_accumulation_byte_limit;
1253 	/* Inform the remote driver about the number of bytes
1254 	 * that are to be accumulated in the downlink direction before it
1255 	 * is pushed into the IPA - Maximum value: TBD
1256 	 */
1257 
1258 	/* Optional */
1259 	/*  Uplink Accumulation Time Limit */
1260 	uint8_t ul_accumulation_time_limit_valid;
1261 	/* Must be set to true if ul_accumulation_time_limit is being passed */
1262 	uint32_t ul_accumulation_time_limit;
1263 	/* Inform thes remote driver about the time for which data
1264 	 * is to be accumulated in the uplink direction before it is pushed into
1265 	 * the IPA (downlink is with respect to the WWAN air interface).
1266 	 * - Units: milliseconds
1267 	 * - Maximum value: 255
1268 	 */
1269 
1270 	/* Optional */
1271 	/*  HW Control Flags */
1272 	uint8_t hw_control_flags_valid;
1273 	/* Must be set to true if hw_control_flags is being passed */
1274 	uint32_t hw_control_flags;
1275 	/* Informs the remote driver about the hardware control flags:
1276 	 *	- Bit 0: IPA_HW_FLAG_HALT_SYSTEM_ON_NON_TERMINAL_FAILURE --
1277 	 *	Indicates to the hardware that it must not continue with
1278 	 *	any subsequent operation even if the failure is not terminal
1279 	 *	- Bit 1: IPA_HW_FLAG_NO_REPORT_MHI_CHANNEL_ERORR --
1280 	 *	Indicates to the hardware that it is not required to report
1281 	 *	channel errors to the host.
1282 	 *	- Bit 2: IPA_HW_FLAG_NO_REPORT_MHI_CHANNEL_WAKE_UP --
1283 	 *	Indicates to the hardware that it is not required to generate
1284 	 *	wake-up events to the host.
1285 	 *	- Bit 4: IPA_HW_FLAG_WORK_OVER_DDR --
1286 	 *	Indicates to the hardware that it is accessing addresses in
1287 	 *  the DDR and not over PCIe
1288 	 *	- Bit 5: IPA_HW_FLAG_INTERRUPT_MODE_CTRL_FLAG --
1289 	 *	Indicates whether the device must
1290 	 *	raise an event to let the host know that it is going into an
1291 	 *	interrupt mode (no longer polling for data/buffer availability)
1292 	 */
1293 
1294 	/* Optional */
1295 	/*  Uplink MSI Event Threshold */
1296 	uint8_t ul_msi_event_threshold_valid;
1297 	/* Must be set to true if ul_msi_event_threshold is being passed */
1298 	uint32_t ul_msi_event_threshold;
1299 	/* Informs the remote driver about the threshold that will
1300 	 * cause an interrupt (MSI) to be fired to the host. This ensures
1301 	 * that the remote driver does not accumulate an excesive number of
1302 	 * events before firing an interrupt.
1303 	 * This threshold is applicable for data moved in the UL direction.
1304 	 * - Maximum value: 65535
1305 	 */
1306 
1307 	/* Optional */
1308 	/*  Downlink MSI Event Threshold */
1309 	uint8_t dl_msi_event_threshold_valid;
1310 	/* Must be set to true if dl_msi_event_threshold is being passed */
1311 	uint32_t dl_msi_event_threshold;
1312 	/* Informs the remote driver about the threshold that will
1313 	 * cause an interrupt (MSI) to be fired to the host. This ensures
1314 	 * that the remote driver does not accumulate an excesive number of
1315 	 * events before firing an interrupt
1316 	 * This threshold is applicable for data that is moved in the
1317 	 * DL direction - Maximum value: 65535
1318 	 */
1319 
1320 	/* Optional */
1321 	/*  Uplink Fifo Size */
1322 	uint8_t ul_fifo_size_valid;
1323 	/* Must be set to true if ul_fifo_size is being passed */
1324 	uint32_t ul_fifo_size;
1325 	/*
1326 	 * Informs the remote driver about the total Uplink xDCI
1327 	 *	buffer size that holds the complete aggregated frame
1328 	 *	or BAM data fifo size of the peripheral channel/pipe(in Bytes).
1329 	 *	This deprecates the max_aggr_frame_size field. This TLV
1330 	 *	deprecates max_aggr_frame_size TLV from version 1.9 onwards
1331 	 *	and the max_aggr_frame_size TLV will be ignored in the presence
1332 	 *	of this TLV.
1333 	 */
1334 
1335 	/* Optional */
1336 	/*  Downlink Fifo Size */
1337 	uint8_t dl_fifo_size_valid;
1338 	/* Must be set to true if dl_fifo_size is being passed */
1339 	uint32_t dl_fifo_size;
1340 	/*
1341 	 * Informs the remote driver about the total Downlink xDCI buffering
1342 	 *	capacity or BAM data fifo size of the peripheral channel/pipe.
1343 	 *	(In Bytes). dl_fifo_size = n * dl_buf_size. This deprecates the
1344 	 *	max_aggr_frame_size field. If this value is set
1345 	 *	max_aggr_frame_size is ignored.
1346 	 */
1347 
1348 	/* Optional */
1349 	/*  Downlink Buffer Size */
1350 	uint8_t dl_buf_size_valid;
1351 	/* Must be set to true if dl_buf_size is being passed */
1352 	uint32_t dl_buf_size;
1353 	/* Informs the remote driver about the single xDCI buffer size.
1354 	* This is applicable only in GSI mode(in Bytes).\n
1355 	*/
1356 };  /* Message */
1357 
1358 /* Response Message; Notifies the remote driver of the configuration
1359  * information
1360  */
1361 struct ipa_config_resp_msg_v01 {
1362 	/* Mandatory */
1363 	/*  Result Code */
1364 	struct ipa_qmi_response_type_v01 resp;
1365 	/**<   Standard response type.*/
1366 }; /* Message */
1367 
1368 enum ipa_stats_type_enum_v01 {
1369 	IPA_STATS_TYPE_ENUM_MIN_ENUM_VAL_V01 = -2147483647,
1370 	/* To force a 32 bit signed enum.  Do not change or use */
1371 	QMI_IPA_STATS_TYPE_INVALID_V01 = 0,
1372 	/* Invalid stats type identifier */
1373 	QMI_IPA_STATS_TYPE_PIPE_V01 = 1,
1374 	/* Pipe stats type */
1375 	QMI_IPA_STATS_TYPE_FILTER_RULES_V01 = 2,
1376 	/* Filter rule stats type */
1377 	IPA_STATS_TYPE_ENUM_MAX_ENUM_VAL_V01 = 2147483647
1378 	/* To force a 32 bit signed enum.  Do not change or use */
1379 };
1380 
1381 struct ipa_pipe_stats_info_type_v01 {
1382 	uint32_t pipe_index;
1383 	/* Pipe index for statistics to be retrieved. */
1384 
1385 	uint64_t num_ipv4_packets;
1386 	/* Accumulated number of IPv4 packets over this pipe. */
1387 
1388 	uint64_t num_ipv4_bytes;
1389 	/* Accumulated number of IPv4 bytes over this pipe. */
1390 
1391 	uint64_t num_ipv6_packets;
1392 	/* Accumulated number of IPv6 packets over this pipe. */
1393 
1394 	uint64_t num_ipv6_bytes;
1395 	/* Accumulated number of IPv6 bytes over this pipe. */
1396 };
1397 
1398 struct ipa_stats_type_filter_rule_v01 {
1399 	uint32_t filter_rule_index;
1400 	/* Filter rule index for statistics to be retrieved. */
1401 
1402 	uint64_t num_packets;
1403 	/* Accumulated number of packets over this filter rule. */
1404 };
1405 
1406 /* Request Message; Retrieve the data statistics collected on modem
1407  * IPA driver.
1408  */
1409 struct ipa_get_data_stats_req_msg_v01 {
1410 	/* Mandatory */
1411 	/*  Stats Type  */
1412 	enum ipa_stats_type_enum_v01 ipa_stats_type;
1413 	/* Indicates the type of statistics to be retrieved. */
1414 
1415 	/* Optional */
1416 	/* Reset Statistics */
1417 	uint8_t reset_stats_valid;
1418 	/* Must be set to true if reset_stats is being passed */
1419 	uint8_t reset_stats;
1420 	/* Option to reset the specific type of data statistics
1421 	 * currently collected.
1422 	 */
1423 };  /* Message */
1424 
1425 /* Response Message; Retrieve the data statistics collected
1426  * on modem IPA driver.
1427  */
1428 struct ipa_get_data_stats_resp_msg_v01 {
1429 	/* Mandatory */
1430 	/*  Result Code */
1431 	struct ipa_qmi_response_type_v01 resp;
1432 	/* Standard response type. */
1433 
1434 	/* Optional */
1435 	/*  Stats Type  */
1436 	uint8_t ipa_stats_type_valid;
1437 	/* Must be set to true if ipa_stats_type is passed */
1438 	enum ipa_stats_type_enum_v01 ipa_stats_type;
1439 	/* Indicates the type of statistics that are retrieved. */
1440 
1441 	/* Optional */
1442 	/*  Uplink Source Pipe Statistics List */
1443 	uint8_t ul_src_pipe_stats_list_valid;
1444 	/* Must be set to true if ul_src_pipe_stats_list is being passed */
1445 	uint32_t ul_src_pipe_stats_list_len;
1446 	/* Must be set to # of elements in ul_src_pipe_stats_list */
1447 	struct ipa_pipe_stats_info_type_v01
1448 		ul_src_pipe_stats_list[QMI_IPA_MAX_PIPES_V01];
1449 	/* List of all Uplink pipe statistics that are retrieved. */
1450 
1451 	/* Optional */
1452 	/*  Downlink Destination Pipe Statistics List */
1453 	uint8_t dl_dst_pipe_stats_list_valid;
1454 	/* Must be set to true if dl_dst_pipe_stats_list is being passed */
1455 	uint32_t dl_dst_pipe_stats_list_len;
1456 	/* Must be set to # of elements in dl_dst_pipe_stats_list */
1457 	struct ipa_pipe_stats_info_type_v01
1458 		dl_dst_pipe_stats_list[QMI_IPA_MAX_PIPES_V01];
1459 	/* List of all Downlink pipe statistics that are retrieved. */
1460 
1461 	/* Optional */
1462 	/*  Downlink Filter Rule Stats List */
1463 	uint8_t dl_filter_rule_stats_list_valid;
1464 	/* Must be set to true if dl_filter_rule_stats_list is being passed */
1465 	uint32_t dl_filter_rule_stats_list_len;
1466 	/* Must be set to # of elements in dl_filter_rule_stats_list */
1467 	struct ipa_stats_type_filter_rule_v01
1468 		dl_filter_rule_stats_list[QMI_IPA_MAX_FILTERS_V01];
1469 	/* List of all Downlink filter rule statistics retrieved. */
1470 };  /* Message */
1471 
1472 struct ipa_apn_data_stats_info_type_v01 {
1473 	uint32_t mux_id;
1474 	/* Indicates the MUX ID associated with the APN for which the data
1475 	 * usage statistics is queried
1476 	 */
1477 
1478 	uint64_t num_ul_packets;
1479 	/* Accumulated number of uplink packets corresponding to
1480 	 * this Mux ID
1481 	 */
1482 
1483 	uint64_t num_ul_bytes;
1484 	/* Accumulated number of uplink bytes corresponding to
1485 	 * this Mux ID
1486 	 */
1487 
1488 	uint64_t num_dl_packets;
1489 	/* Accumulated number of downlink packets corresponding
1490 	 * to this Mux ID
1491 	 */
1492 
1493 	uint64_t num_dl_bytes;
1494 	/* Accumulated number of downlink bytes corresponding to
1495 	 * this Mux ID
1496 	 */
1497 };  /* Type */
1498 
1499 /* Request Message; Retrieve the APN data statistics collected from modem */
1500 struct ipa_get_apn_data_stats_req_msg_v01 {
1501 	/* Optional */
1502 	/*  Mux ID List */
1503 	uint8_t mux_id_list_valid;
1504 	/* Must be set to true if mux_id_list is being passed */
1505 	uint32_t mux_id_list_len;
1506 	/* Must be set to # of elements in mux_id_list */
1507 	uint32_t mux_id_list[QMI_IPA_MAX_APN_V01];
1508 	/* The list of MUX IDs associated with APNs for which the data usage
1509 	 * statistics is being retrieved
1510 	 */
1511 };  /* Message */
1512 
1513 /* Response Message; Retrieve the APN data statistics collected from modem */
1514 struct ipa_get_apn_data_stats_resp_msg_v01 {
1515 	/* Mandatory */
1516 	/*  Result Code */
1517 	struct ipa_qmi_response_type_v01 resp;
1518 	/* Standard response type.*/
1519 
1520 	/* Optional */
1521 	/* APN Data Statistics List */
1522 	uint8_t apn_data_stats_list_valid;
1523 	/* Must be set to true if apn_data_stats_list is being passed */
1524 	uint32_t apn_data_stats_list_len;
1525 	/* Must be set to # of elements in apn_data_stats_list */
1526 	struct ipa_apn_data_stats_info_type_v01
1527 		apn_data_stats_list[QMI_IPA_MAX_APN_V01];
1528 	/* List of APN data retrieved as per request on mux_id.
1529 	* For now, only one APN monitoring is supported on modem driver.
1530 	* Making this as list for expandability to support more APNs in future.
1531 	*/
1532 };  /* Message */
1533 
1534 struct ipa_data_usage_quota_info_type_v01 {
1535 	uint32_t mux_id;
1536 	/* Indicates the MUX ID associated with the APN for which the data usage
1537 	 * quota needs to be set
1538 	 */
1539 
1540 	uint64_t num_Mbytes;
1541 	/* Number of Mega-bytes of quota value to be set on this APN associated
1542 	 * with this Mux ID.
1543 	 */
1544 };  /* Type */
1545 
1546 /* Request Message; Master driver sets a data usage quota value on
1547  * modem driver
1548  */
1549 struct ipa_set_data_usage_quota_req_msg_v01 {
1550 	/* Optional */
1551 	/* APN Quota List */
1552 	uint8_t apn_quota_list_valid;
1553 	/* Must be set to true if apn_quota_list is being passed */
1554 	uint32_t apn_quota_list_len;
1555 	/* Must be set to # of elements in apn_quota_list */
1556 	struct ipa_data_usage_quota_info_type_v01
1557 		apn_quota_list[QMI_IPA_MAX_APN_V01];
1558 	/* The list of APNs on which a data usage quota to be set on modem
1559 	 * driver. For now, only one APN monitoring is supported on modem
1560 	 * driver. Making this as list for expandability to support more
1561 	 * APNs in future.
1562 	 */
1563 };  /* Message */
1564 
1565 /* Response Message; Master driver sets a data usage on modem driver. */
1566 struct ipa_set_data_usage_quota_resp_msg_v01 {
1567 	/* Mandatory */
1568 	/* Result Code */
1569 	struct ipa_qmi_response_type_v01 resp;
1570 	/* Standard response type.*/
1571 };  /* Message */
1572 
1573 /* Indication Message; Modem driver sends this indication to master
1574  * driver when the data usage quota is reached
1575  */
1576 struct ipa_data_usage_quota_reached_ind_msg_v01 {
1577 	/* Mandatory */
1578 	/*  APN Quota List */
1579 	struct ipa_data_usage_quota_info_type_v01 apn;
1580 	/* This message indicates which APN has the previously set quota
1581 	 * reached. For now, only one APN monitoring is supported on modem
1582 	 * driver.
1583 	 */
1584 };  /* Message */
1585 
1586 /* Request Message; Master driver request modem driver to terminate
1587  * the current data usage quota monitoring session.
1588  */
1589 struct ipa_stop_data_usage_quota_req_msg_v01 {
1590 	/* This element is a placeholder to prevent the declaration of
1591      *  an empty struct.  DO NOT USE THIS FIELD UNDER ANY CIRCUMSTANCE
1592 	 */
1593 	char __placeholder;
1594 };  /* Message */
1595 
1596 /* Response Message; Master driver request modem driver to terminate
1597  * the current quota monitoring session.
1598  */
1599 struct ipa_stop_data_usage_quota_resp_msg_v01 {
1600 	/* Mandatory */
1601 	/*  Result Code */
1602 	struct ipa_qmi_response_type_v01 resp;
1603 	/**<   Standard response type.*/
1604 };  /* Message */
1605 
1606 /* Request Message; Request from Modem IPA driver to set DPL peripheral pipe */
1607 struct ipa_install_fltr_rule_req_ex_msg_v01 {
1608 
1609 	/* Optional */
1610 	/*  Extended Filter Specification  */
1611 	uint8_t filter_spec_ex_list_valid;
1612 	uint32_t filter_spec_ex_list_len;
1613 	struct ipa_filter_spec_ex_type_v01
1614 		filter_spec_ex_list[QMI_IPA_MAX_FILTERS_EX_V01];
1615 	/* List of filter specifications of filters that must be installed in
1616 	 * the IPAv3.x hardware.
1617 	 * The driver installing these rules must do so in the same order as
1618 	 * specified in this list.
1619 	 */
1620 
1621 	/* Optional */
1622 	/* Pipe Index to Install Rule */
1623 	uint8_t source_pipe_index_valid;
1624 	uint32_t source_pipe_index;
1625 	/* Pipe index to install the filter rule.
1626 	 * The requester may not always know the pipe indices. If not specified,
1627 	 * the receiver must install this rule on all pipes that it controls,
1628 	 * through which data may be fed into the IPA.
1629 	 */
1630 
1631 	/* Optional */
1632 	/* Total Number of IPv4 Filters in the Filter Spec List */
1633 	uint8_t num_ipv4_filters_valid;
1634 	uint32_t num_ipv4_filters;
1635 	/* Number of IPv4 rules included in the filter specification list. */
1636 
1637 	/* Optional */
1638 	/* Total Number of IPv6 Filters in the Filter Spec List */
1639 	uint8_t num_ipv6_filters_valid;
1640 	uint32_t num_ipv6_filters;
1641 	/* Number of IPv6 rules included in the filter specification list. */
1642 
1643 	/* Optional */
1644 	/* List of XLAT Filter Indices in the Filter Spec List */
1645 	uint8_t xlat_filter_indices_list_valid;
1646 	uint32_t xlat_filter_indices_list_len;
1647 	uint32_t xlat_filter_indices_list[QMI_IPA_MAX_FILTERS_EX_V01];
1648 	/* List of XLAT filter indices.
1649 	 * Filter rules at specified indices must be modified by the
1650 	 * receiver if the PDN is XLAT before installing them on the associated
1651 	 * IPA consumer pipe.
1652 	 */
1653 };  /* Message */
1654 
1655 /* Response Message; Requests installation of filtering rules in the hardware
1656  * block on the remote side.
1657  */
1658 struct ipa_install_fltr_rule_resp_ex_msg_v01 {
1659 	/* Mandatory */
1660 	/* Result Code */
1661 	struct ipa_qmi_response_type_v01 resp;
1662 	/* Standard response type.
1663 	 * Standard response type. Contains the following data members:
1664 	 * - qmi_result_type -- QMI_RESULT_SUCCESS or QMI_RESULT_FAILURE
1665 	 * - qmi_error_type  -- Error code. Possible error code values are
1666 	 *					 described in the error codes
1667 	 *					 section of each message
1668 	 *					 definition.
1669 	 */
1670 
1671 	/* Optional */
1672 	/* Rule ID List */
1673 	uint8_t rule_id_valid;
1674 	uint32_t rule_id_len;
1675 	uint32_t rule_id[QMI_IPA_MAX_FILTERS_EX_V01];
1676 	/* List of rule IDs returned to the control point.
1677 	 * Any further reference to the rule is done using the filter rule ID
1678 	 * specified in this list.
1679 	 */
1680 };  /* Message */
1681 
1682 /*
1683  * Request Message; Requests the modem IPA driver to enable or
1684  * disable collection of per client statistics.
1685  */
1686 struct ipa_enable_per_client_stats_req_msg_v01 {
1687 
1688 	/* Mandatory */
1689 	/* Collect statistics per client; */
1690 	uint8_t enable_per_client_stats;
1691 	/*
1692 	 * Indicates whether to start or stop collecting
1693 	 * per client statistics.
1694 	 */
1695 };  /* Message */
1696 
1697 /*
1698  * Response Message; Requests the modem IPA driver to enable or disable
1699  * collection of per client statistics.
1700  */
1701 struct ipa_enable_per_client_stats_resp_msg_v01 {
1702 
1703 	/* Mandatory */
1704 	/*  Result Code */
1705 	struct ipa_qmi_response_type_v01 resp;
1706 	/* Standard response type. */
1707 };  /* Message */
1708 
1709 struct ipa_per_client_stats_info_type_v01 {
1710 
1711 	uint32_t client_id;
1712 	/*
1713 	 * Id of the client on APPS processor side for which Modem processor
1714 	 * needs to send uplink/downlink statistics.
1715 	 */
1716 
1717 	uint32_t src_pipe_id;
1718 	/*
1719 	 * IPA consumer pipe on which client on APPS side sent uplink
1720 	 * data to modem.
1721 	 */
1722 
1723 	uint64_t num_ul_ipv4_bytes;
1724 	/*
1725 	 * Accumulated number of uplink IPv4 bytes for a client.
1726 	 */
1727 
1728 	uint64_t num_ul_ipv6_bytes;
1729 	/*
1730 	 * Accumulated number of uplink IPv6 bytes for a client.
1731 	 */
1732 
1733 	uint64_t num_dl_ipv4_bytes;
1734 	/*
1735 	 * Accumulated number of downlink IPv4 bytes for a client.
1736 	 */
1737 
1738 	uint64_t num_dl_ipv6_bytes;
1739 	/*
1740 	 * Accumulated number of downlink IPv6 byes for a client.
1741 	 */
1742 
1743 
1744 	uint32_t num_ul_ipv4_pkts;
1745 	/*
1746 	 * Accumulated number of uplink IPv4 packets for a client.
1747 	 */
1748 
1749 	uint32_t num_ul_ipv6_pkts;
1750 	/*
1751 	 * Accumulated number of uplink IPv6 packets for a client.
1752 	 */
1753 
1754 	uint32_t num_dl_ipv4_pkts;
1755 	/*
1756 	 * Accumulated number of downlink IPv4 packets for a client.
1757 	 */
1758 
1759 	uint32_t num_dl_ipv6_pkts;
1760 	/*
1761 	 * Accumulated number of downlink IPv6 packets for a client.
1762 	 */
1763 };  /* Type */
1764 
1765 /*
1766  * Request Message; Requests the modem IPA driver to provide statistics
1767  * for a givenclient.
1768  */
1769 struct ipa_get_stats_per_client_req_msg_v01 {
1770 
1771 	/* Mandatory */
1772 	/*  Client id */
1773 	uint32_t client_id;
1774 	/*
1775 	 * Id of the client on APPS processor side for which Modem processor
1776 	 * needs to send uplink/downlink statistics. if client id is specified
1777 	 * as 0xffffffff, then Q6 will send the stats for all the clients of
1778 	 * the specified source pipe.
1779 	 */
1780 
1781 	/* Mandatory */
1782 	/*  Source pipe id */
1783 	uint32_t src_pipe_id;
1784 	/*
1785 	 * IPA consumer pipe on which client on APPS side sent uplink
1786 	 * data to modem. In future, this implementation can be extended
1787 	 * to provide 0xffffffff as the source pipe id, where Q6 will send
1788 	 * the stats of all the clients across all different tethered-pipes.
1789 	 */
1790 
1791 	/* Optional */
1792 	/*  Reset client statistics. */
1793 	uint8_t reset_stats_valid;
1794 	/* Must be set to true if reset_stats is being passed. */
1795 	uint8_t reset_stats;
1796 	/*
1797 	 * Option to reset the statistics currently collected by modem for this
1798 	 * particular client.
1799 	 */
1800 };  /* Message */
1801 
1802 /*
1803  * Response Message; Requests the modem IPA driver to provide statistics
1804  * for a given client.
1805  */
1806 struct ipa_get_stats_per_client_resp_msg_v01 {
1807 
1808 	/* Mandatory */
1809 	/*  Result Code */
1810 	struct ipa_qmi_response_type_v01 resp;
1811 	/* Standard response type. */
1812 
1813 	/* Optional */
1814 	/*  Per clients Statistics List */
1815 	uint8_t per_client_stats_list_valid;
1816 	/* Must be set to true if per_client_stats_list is being passed. */
1817 	uint32_t per_client_stats_list_len;
1818 	/* Must be set to # of elements in per_client_stats_list. */
1819 	struct ipa_per_client_stats_info_type_v01
1820 		per_client_stats_list[QMI_IPA_MAX_PER_CLIENTS_V01];
1821 	/*
1822 	 * List of all per client statistics that are retrieved.
1823 	 */
1824 };  /* Message */
1825 
1826 struct ipa_ul_firewall_rule_type_v01 {
1827 
1828 	enum ipa_ip_type_enum_v01 ip_type;
1829 	/*
1830 	 * IP type for which this rule is applicable.
1831 	 * The driver must identify the filter table (v6 or v4), and this
1832 	 * field is essential for that. Values:
1833 	 * - QMI_IPA_IP_TYPE_INVALID (0) --  Invalid IP type identifier
1834 	 * - QMI_IPA_IP_TYPE_V4 (1) --  IPv4 type
1835 	 * - QMI_IPA_IP_TYPE_V6 (2) --  IPv6 type
1836 	 */
1837 
1838 	struct ipa_filter_rule_type_v01 filter_rule;
1839 	/*
1840 	 * Rules in the filter specification. These rules are the
1841 	 * ones that are matched against fields in the packet.
1842 	 * Currently we only send IPv6 whitelist rules to Q6.
1843 	 */
1844 };  /* Type */
1845 
1846 /*
1847  * Request Message; Requestes remote IPA driver to install uplink
1848  * firewall rules.
1849  */
1850 struct ipa_configure_ul_firewall_rules_req_msg_v01 {
1851 
1852 	/* Optional */
1853 	/*  Uplink Firewall Specification  */
1854 	uint32_t firewall_rules_list_len;
1855 	/* Must be set to # of elements in firewall_rules_list. */
1856 	struct ipa_ul_firewall_rule_type_v01
1857 		firewall_rules_list[QMI_IPA_MAX_UL_FIREWALL_RULES_V01];
1858 	/*
1859 	 * List of uplink firewall specifications of filters that must be
1860 	 * installed.
1861 	 */
1862 
1863 	uint32_t mux_id;
1864 	/*
1865 	 * QMAP Mux ID. As a part of the QMAP protocol,
1866 	 * several data calls may be multiplexed over the same physical
1867 	 * transport channel. This identifier is used to identify one
1868 	 * such data call. The maximum value for this identifier is 255.
1869 	 */
1870 
1871 	/* Optional */
1872 	uint8_t disable_valid;
1873 	/* Must be set to true if enable is being passed. */
1874 	uint8_t disable;
1875 	/*
1876 	 * Indicates whether uplink firewall needs to be enabled or disabled.
1877 	 */
1878 
1879 	/* Optional */
1880 	uint8_t are_blacklist_filters_valid;
1881 	/* Must be set to true if are_blacklist_filters is being passed. */
1882 	uint8_t are_blacklist_filters;
1883 	/*
1884 	 * Indicates whether the filters received as part of this message are
1885 	 * blacklist filters. i.e. drop uplink packets matching these rules.
1886 	 */
1887 };  /* Message */
1888 
1889 /*
1890  * Response Message; Requestes remote IPA driver to install
1891  * uplink firewall rules.
1892  */
1893 struct ipa_configure_ul_firewall_rules_resp_msg_v01 {
1894 
1895 	/* Mandatory */
1896 	/* Result Code */
1897 	struct ipa_qmi_response_type_v01 resp;
1898 	/*
1899 	 * Standard response type.
1900 	 * Standard response type. Contains the following data members:
1901 	 * qmi_result_type -- QMI_RESULT_SUCCESS or QMI_RESULT_FAILURE
1902 	 * qmi_error_type  -- Error code. Possible error code values are
1903 	 * described in the error codes section of each message definition.
1904 	 */
1905 };  /* Message */
1906 
1907 enum ipa_ul_firewall_status_enum_v01 {
1908 	IPA_UL_FIREWALL_STATUS_ENUM_MIN_ENUM_VAL_V01 = -2147483647,
1909 	/* To force a 32 bit signed enum.  Do not change or use*/
1910 	QMI_IPA_UL_FIREWALL_STATUS_SUCCESS_V01 = 0,
1911 	/* Indicates that the uplink firewall rules
1912 	 * are configured successfully.
1913 	 */
1914 	QMI_IPA_UL_FIREWALL_STATUS_FAILURE_V01 = 1,
1915 	/* Indicates that the uplink firewall rules
1916 	 * are not configured successfully.
1917 	 */
1918 	IPA_UL_FIREWALL_STATUS_ENUM_MAX_ENUM_VAL_V01 = 2147483647
1919 	/* To force a 32 bit signed enum.  Do not change or use*/
1920 };
1921 
1922 struct ipa_ul_firewall_config_result_type_v01 {
1923 
1924 	enum ipa_ul_firewall_status_enum_v01 is_success;
1925 	/*
1926 	 * Indicates whether the uplink firewall rules are configured
1927 	 * successfully.
1928 	 */
1929 
1930 	uint32_t mux_id;
1931 	/*
1932 	 * QMAP Mux ID. As a part of the QMAP protocol,
1933 	 * several data calls may be multiplexed over the same physical
1934 	 * transport channel. This identifier is used to identify one
1935 	 * such data call. The maximum value for this identifier is 255.
1936 	 */
1937 };
1938 
1939 /*
1940  * Indication Message; Requestes remote IPA driver to install
1941  * uplink firewall rules.
1942  */
1943 struct ipa_configure_ul_firewall_rules_ind_msg_v01 {
1944 
1945 	 struct ipa_ul_firewall_config_result_type_v01 result;
1946 };  /* Message */
1947 
1948 
1949 /*Service Message Definition*/
1950 #define QMI_IPA_INDICATION_REGISTER_REQ_V01 0x0020
1951 #define QMI_IPA_INDICATION_REGISTER_RESP_V01 0x0020
1952 #define QMI_IPA_INIT_MODEM_DRIVER_REQ_V01 0x0021
1953 #define QMI_IPA_INIT_MODEM_DRIVER_RESP_V01 0x0021
1954 #define QMI_IPA_MASTER_DRIVER_INIT_COMPLETE_IND_V01 0x0022
1955 #define QMI_IPA_INSTALL_FILTER_RULE_REQ_V01 0x0023
1956 #define QMI_IPA_INSTALL_FILTER_RULE_RESP_V01 0x0023
1957 #define QMI_IPA_FILTER_INSTALLED_NOTIF_REQ_V01 0x0024
1958 #define QMI_IPA_FILTER_INSTALLED_NOTIF_RESP_V01 0x0024
1959 #define QMI_IPA_ENABLE_FORCE_CLEAR_DATAPATH_REQ_V01 0x0025
1960 #define QMI_IPA_ENABLE_FORCE_CLEAR_DATAPATH_RESP_V01 0x0025
1961 #define QMI_IPA_DISABLE_FORCE_CLEAR_DATAPATH_REQ_V01 0x0026
1962 #define QMI_IPA_DISABLE_FORCE_CLEAR_DATAPATH_RESP_V01 0x0026
1963 #define QMI_IPA_CONFIG_REQ_V01 0x0027
1964 #define QMI_IPA_CONFIG_RESP_V01 0x0027
1965 #define QMI_IPA_DISABLE_LINK_LOW_PWR_STATE_REQ_V01 0x0028
1966 #define QMI_IPA_DISABLE_LINK_LOW_PWR_STATE_RESP_V01 0x0028
1967 #define QMI_IPA_ENABLE_LINK_LOW_PWR_STATE_REQ_V01 0x0029
1968 #define QMI_IPA_ENABLE_LINK_LOW_PWR_STATE_RESP_V01 0x0029
1969 #define QMI_IPA_GET_DATA_STATS_REQ_V01 0x0030
1970 #define QMI_IPA_GET_DATA_STATS_RESP_V01 0x0030
1971 #define QMI_IPA_GET_APN_DATA_STATS_REQ_V01 0x0031
1972 #define QMI_IPA_GET_APN_DATA_STATS_RESP_V01 0x0031
1973 #define QMI_IPA_SET_DATA_USAGE_QUOTA_REQ_V01 0x0032
1974 #define QMI_IPA_SET_DATA_USAGE_QUOTA_RESP_V01 0x0032
1975 #define QMI_IPA_DATA_USAGE_QUOTA_REACHED_IND_V01 0x0033
1976 #define QMI_IPA_STOP_DATA_USAGE_QUOTA_REQ_V01 0x0034
1977 #define QMI_IPA_STOP_DATA_USAGE_QUOTA_RESP_V01 0x0034
1978 #define QMI_IPA_INIT_MODEM_DRIVER_CMPLT_REQ_V01 0x0035
1979 #define QMI_IPA_INIT_MODEM_DRIVER_CMPLT_RESP_V01 0x0035
1980 #define QMI_IPA_INSTALL_FILTER_RULE_EX_REQ_V01 0x0037
1981 #define QMI_IPA_INSTALL_FILTER_RULE_EX_RESP_V01 0x0037
1982 #define QMI_IPA_ENABLE_PER_CLIENT_STATS_REQ_V01 0x0038
1983 #define QMI_IPA_ENABLE_PER_CLIENT_STATS_RESP_V01 0x0038
1984 #define QMI_IPA_GET_STATS_PER_CLIENT_REQ_V01 0x0039
1985 #define QMI_IPA_GET_STATS_PER_CLIENT_RESP_V01 0x0039
1986 #define QMI_IPA_INSTALL_UL_FIREWALL_RULES_REQ_V01 0x003A
1987 #define QMI_IPA_INSTALL_UL_FIREWALL_RULES_RESP_V01 0x003A
1988 #define QMI_IPA_INSTALL_UL_FIREWALL_RULES_IND_V01 0x003A
1989 
1990 /* add for max length*/
1991 #define QMI_IPA_INIT_MODEM_DRIVER_REQ_MAX_MSG_LEN_V01 162
1992 #define QMI_IPA_INIT_MODEM_DRIVER_RESP_MAX_MSG_LEN_V01 25
1993 #define QMI_IPA_INDICATION_REGISTER_REQ_MAX_MSG_LEN_V01 8
1994 #define QMI_IPA_INDICATION_REGISTER_RESP_MAX_MSG_LEN_V01 7
1995 #define QMI_IPA_INSTALL_FILTER_RULE_REQ_MAX_MSG_LEN_V01 22369
1996 #define QMI_IPA_INSTALL_FILTER_RULE_RESP_MAX_MSG_LEN_V01 783
1997 #define QMI_IPA_FILTER_INSTALLED_NOTIF_REQ_MAX_MSG_LEN_V01 870
1998 #define QMI_IPA_FILTER_INSTALLED_NOTIF_RESP_MAX_MSG_LEN_V01 7
1999 #define QMI_IPA_MASTER_DRIVER_INIT_COMPLETE_IND_MAX_MSG_LEN_V01 7
2000 #define QMI_IPA_DATA_USAGE_QUOTA_REACHED_IND_MAX_MSG_LEN_V01 15
2001 
2002 
2003 #define QMI_IPA_ENABLE_FORCE_CLEAR_DATAPATH_REQ_MAX_MSG_LEN_V01 18
2004 #define QMI_IPA_DISABLE_FORCE_CLEAR_DATAPATH_REQ_MAX_MSG_LEN_V01 7
2005 #define QMI_IPA_ENABLE_FORCE_CLEAR_DATAPATH_RESP_MAX_MSG_LEN_V01 7
2006 #define QMI_IPA_DISABLE_FORCE_CLEAR_DATAPATH_RESP_MAX_MSG_LEN_V01 7
2007 
2008 
2009 #define QMI_IPA_CONFIG_REQ_MAX_MSG_LEN_V01 102
2010 #define QMI_IPA_CONFIG_RESP_MAX_MSG_LEN_V01 7
2011 #define QMI_IPA_DISABLE_LINK_LOW_PWR_STATE_REQ_MAX_MSG_LEN_V01 18
2012 #define QMI_IPA_DISABLE_LINK_LOW_PWR_STATE_RESP_MAX_MSG_LEN_V01 7
2013 #define QMI_IPA_ENABLE_LINK_LOW_PWR_STATE_REQ_MAX_MSG_LEN_V01 7
2014 #define QMI_IPA_ENABLE_LINK_LOW_PWR_STATE_RESP_MAX_MSG_LEN_V01 7
2015 #define QMI_IPA_GET_DATA_STATS_REQ_MAX_MSG_LEN_V01 11
2016 #define QMI_IPA_GET_DATA_STATS_RESP_MAX_MSG_LEN_V01 2234
2017 #define QMI_IPA_GET_APN_DATA_STATS_REQ_MAX_MSG_LEN_V01 36
2018 #define QMI_IPA_GET_APN_DATA_STATS_RESP_MAX_MSG_LEN_V01 299
2019 #define QMI_IPA_SET_DATA_USAGE_QUOTA_REQ_MAX_MSG_LEN_V01 100
2020 #define QMI_IPA_SET_DATA_USAGE_QUOTA_RESP_MAX_MSG_LEN_V01 7
2021 #define QMI_IPA_STOP_DATA_USAGE_QUOTA_REQ_MAX_MSG_LEN_V01 0
2022 #define QMI_IPA_STOP_DATA_USAGE_QUOTA_RESP_MAX_MSG_LEN_V01 7
2023 
2024 #define QMI_IPA_INIT_MODEM_DRIVER_CMPLT_REQ_MAX_MSG_LEN_V01 4
2025 #define QMI_IPA_INIT_MODEM_DRIVER_CMPLT_RESP_MAX_MSG_LEN_V01 7
2026 
2027 #define QMI_IPA_INSTALL_FILTER_RULE_EX_REQ_MAX_MSG_LEN_V01 22685
2028 #define QMI_IPA_INSTALL_FILTER_RULE_EX_RESP_MAX_MSG_LEN_V01 523
2029 
2030 #define QMI_IPA_ENABLE_PER_CLIENT_STATS_REQ_MAX_MSG_LEN_V01 4
2031 #define QMI_IPA_ENABLE_PER_CLIENT_STATS_RESP_MAX_MSG_LEN_V01 7
2032 
2033 #define QMI_IPA_GET_STATS_PER_CLIENT_REQ_MAX_MSG_LEN_V01 18
2034 #define QMI_IPA_GET_STATS_PER_CLIENT_RESP_MAX_MSG_LEN_V01 3595
2035 
2036 #define QMI_IPA_INSTALL_UL_FIREWALL_RULES_REQ_MAX_MSG_LEN_V01 9875
2037 #define QMI_IPA_INSTALL_UL_FIREWALL_RULES_RESP_MAX_MSG_LEN_V01 7
2038 #define QMI_IPA_INSTALL_UL_FIREWALL_RULES_IND_MAX_MSG_LEN_V01 11
2039 /* Service Object Accessor */
2040 
2041 #endif/* IPA_QMI_SERVICE_V01_H */
2042