ipa_qmi_service_v01.h 49 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393
  1. /*
  2. * This header file defines the types and structures that were defined in
  3. * ipa. It contains the constant values defined, enums, structures,
  4. * messages, and service message IDs (in that order) Structures that were
  5. * defined in the IDL as messages contain mandatory elements, optional
  6. * elements, a combination of mandatory and optional elements (mandatory
  7. * always come before optionals in the structure), or nothing (null message)
  8. * An optional element in a message is preceded by a uint8_t value that must be
  9. * set to true if the element is going to be included. When decoding a received
  10. * message, the uint8_t values will be set to true or false by the decode
  11. * routine, and should be checked before accessing the values that they
  12. * correspond to.
  13. * Variable sized arrays are defined as static sized arrays with an unsigned
  14. * integer (32 bit) preceding it that must be set to the number of elements
  15. * in the array that are valid. For Example:
  16. * uint32_t test_opaque_len;
  17. * uint8_t test_opaque[16];
  18. * If only 4 elements are added to test_opaque[] then test_opaque_len must be
  19. * set to 4 before sending the message. When decoding, the _len value is set
  20. * by the decode routine and should be checked so that the correct number of
  21. * elements in the array will be accessed.
  22. */
  23. #ifndef IPA_QMI_SERVICE_V01_H
  24. #define IPA_QMI_SERVICE_V01_H
  25. #define QMI_IPA_IPFLTR_NUM_IHL_RANGE_16_EQNS_V01 2
  26. #define QMI_IPA_IPFLTR_NUM_MEQ_32_EQNS_V01 2
  27. #define QMI_IPA_IPFLTR_NUM_IHL_MEQ_32_EQNS_V01 2
  28. #define QMI_IPA_IPFLTR_NUM_MEQ_128_EQNS_V01 2
  29. #define QMI_IPA_MAX_FILTERS_V01 64
  30. #define QMI_IPA_MAX_PIPES_V01 20
  31. #define QMI_IPA_MAX_APN_V01 8
  32. #define IPA_INT_MAX ((int)(~0U>>1))
  33. #define IPA_INT_MIN (-IPA_INT_MAX - 1)
  34. /* IPA definition as msm_qmi_interface.h */
  35. enum ipa_qmi_result_type_v01 {
  36. /* To force a 32 bit signed enum. Do not change or use*/
  37. IPA_QMI_RESULT_TYPE_MIN_ENUM_VAL_V01 = IPA_INT_MIN,
  38. IPA_QMI_RESULT_SUCCESS_V01 = 0,
  39. IPA_QMI_RESULT_FAILURE_V01 = 1,
  40. IPA_QMI_RESULT_TYPE_MAX_ENUM_VAL_V01 = IPA_INT_MAX,
  41. };
  42. enum ipa_qmi_error_type_v01 {
  43. /* To force a 32 bit signed enum. Do not change or use*/
  44. IPA_QMI_ERROR_TYPE_MIN_ENUM_VAL_V01 = IPA_INT_MIN,
  45. IPA_QMI_ERR_NONE_V01 = 0x0000,
  46. IPA_QMI_ERR_MALFORMED_MSG_V01 = 0x0001,
  47. IPA_QMI_ERR_NO_MEMORY_V01 = 0x0002,
  48. IPA_QMI_ERR_INTERNAL_V01 = 0x0003,
  49. IPA_QMI_ERR_CLIENT_IDS_EXHAUSTED_V01 = 0x0005,
  50. IPA_QMI_ERR_INVALID_ID_V01 = 0x0029,
  51. IPA_QMI_ERR_ENCODING_V01 = 0x003A,
  52. IPA_QMI_ERR_INCOMPATIBLE_STATE_V01 = 0x005A,
  53. IPA_QMI_ERR_NOT_SUPPORTED_V01 = 0x005E,
  54. IPA_QMI_ERROR_TYPE_MAX_ENUM_VAL_V01 = IPA_INT_MAX,
  55. };
  56. struct ipa_qmi_response_type_v01 {
  57. enum ipa_qmi_result_type_v01 result;
  58. enum ipa_qmi_error_type_v01 error;
  59. };
  60. enum ipa_platform_type_enum_v01 {
  61. IPA_PLATFORM_TYPE_ENUM_MIN_ENUM_VAL_V01 =
  62. -2147483647, /* To force a 32 bit signed enum. Do not change or use */
  63. QMI_IPA_PLATFORM_TYPE_INVALID_V01 = 0,
  64. /* Invalid platform identifier */
  65. QMI_IPA_PLATFORM_TYPE_TN_V01 = 1,
  66. /* Platform identifier - Data card device */
  67. QMI_IPA_PLATFORM_TYPE_LE_V01 = 2,
  68. /* Platform identifier - Data router device */
  69. QMI_IPA_PLATFORM_TYPE_MSM_ANDROID_V01 = 3,
  70. /* Platform identifier - MSM device with Android HLOS */
  71. QMI_IPA_PLATFORM_TYPE_MSM_WINDOWS_V01 = 4,
  72. /* Platform identifier - MSM device with Windows HLOS */
  73. QMI_IPA_PLATFORM_TYPE_MSM_QNX_V01 = 5,
  74. /* Platform identifier - MSM device with QNX HLOS */
  75. IPA_PLATFORM_TYPE_ENUM_MAX_ENUM_VAL_V01 = 2147483647
  76. /* To force a 32 bit signed enum. Do not change or use */
  77. };
  78. struct ipa_hdr_tbl_info_type_v01 {
  79. uint32_t modem_offset_start;
  80. /* Offset from the start of IPA Shared memory from which
  81. * modem driver may insert header table entries.
  82. */
  83. uint32_t modem_offset_end;
  84. /* Offset from the start of IPA shared mem beyond which modem
  85. * driver shall not insert header table entries. The space
  86. * available for the modem driver shall include the
  87. * modem_offset_start and modem_offset_end.
  88. */
  89. }; /* Type */
  90. struct ipa_route_tbl_info_type_v01 {
  91. uint32_t route_tbl_start_addr;
  92. /* Identifies the start of the routing table. Denotes the offset
  93. * from the start of the IPA Shared Mem
  94. */
  95. uint32_t num_indices;
  96. /* Number of indices (starting from 0) that is being allocated to
  97. * the modem. The number indicated here is also included in the
  98. * allocation. The value of num_indices shall not exceed 31
  99. * (5 bits used to specify the routing table index), unless there
  100. * is a change in the hardware.
  101. */
  102. }; /* Type */
  103. struct ipa_modem_mem_info_type_v01 {
  104. uint32_t block_start_addr;
  105. /* Identifies the start of the memory block allocated for the
  106. * modem. Denotes the offset from the start of the IPA Shared Mem
  107. */
  108. uint32_t size;
  109. /* Size of the block allocated for the modem driver */
  110. }; /* Type */
  111. struct ipa_hdr_proc_ctx_tbl_info_type_v01 {
  112. uint32_t modem_offset_start;
  113. /* Offset from the start of IPA shared memory from which the modem
  114. * driver may insert header processing context table entries.
  115. */
  116. uint32_t modem_offset_end;
  117. /* Offset from the start of IPA shared memory beyond which the modem
  118. * driver may not insert header proc table entries. The space
  119. * available for the modem driver includes modem_offset_start and
  120. * modem_offset_end.
  121. */
  122. }; /* Type */
  123. struct ipa_zip_tbl_info_type_v01 {
  124. uint32_t modem_offset_start;
  125. /* Offset from the start of IPA shared memory from which the modem
  126. * driver may insert compression/decompression command entries.
  127. */
  128. uint32_t modem_offset_end;
  129. /* Offset from the start of IPA shared memory beyond which the modem
  130. * driver may not insert compression/decompression command entries.
  131. * The space available for the modem driver includes
  132. * modem_offset_start and modem_offset_end.
  133. */
  134. }; /* Type */
  135. /** Request Message; Requests the modem IPA driver to perform initializtion */
  136. struct ipa_init_modem_driver_req_msg_v01 {
  137. /* Optional */
  138. /* Platform info */
  139. uint8_t platform_type_valid; /**< Must be set to true if platform_type
  140. is being passed */
  141. enum ipa_platform_type_enum_v01 platform_type;
  142. /* Provides information about the platform (ex. TN/MN/LE/MSM,etc) */
  143. /* Optional */
  144. /* Header table info */
  145. uint8_t hdr_tbl_info_valid;
  146. /* Must be set to true if hdr_tbl_info is being passed */
  147. struct ipa_hdr_tbl_info_type_v01 hdr_tbl_info;
  148. /* Provides information about the header table */
  149. /* Optional */
  150. /* IPV4 Routing table info */
  151. uint8_t v4_route_tbl_info_valid;
  152. /* Must be set to true if v4_route_tbl_info is being passed */
  153. struct ipa_route_tbl_info_type_v01 v4_route_tbl_info;
  154. /* Provides information about the IPV4 routing table */
  155. /* Optional */
  156. /* IPV6 Routing table info */
  157. uint8_t v6_route_tbl_info_valid; /**< Must be set to true if
  158. v6_route_tbl_info is being passed */
  159. struct ipa_route_tbl_info_type_v01 v6_route_tbl_info;
  160. /* Provides information about the IPV6 routing table */
  161. /* Optional */
  162. /* IPV4 Filter table start address */
  163. uint8_t v4_filter_tbl_start_addr_valid; /**< Must be set to true
  164. if v4_filter_tbl_start_addr is being passed */
  165. uint32_t v4_filter_tbl_start_addr;
  166. /* Provides information about the starting address of IPV4 filter
  167. * tableDenotes the offset from the start of the IPA Shared Mem
  168. */
  169. /* Optional */
  170. /* IPV6 Filter table start address */
  171. uint8_t v6_filter_tbl_start_addr_valid;
  172. /* Must be set to true if v6_filter_tbl_start_addr is being passed */
  173. uint32_t v6_filter_tbl_start_addr;
  174. /* Provides information about the starting address of IPV6 filter
  175. * table Denotes the offset from the start of the IPA Shared Mem
  176. */
  177. /* Optional */
  178. /* Modem memory block */
  179. uint8_t modem_mem_info_valid;
  180. /* Must be set to true if modem_mem_info is being passed */
  181. struct ipa_modem_mem_info_type_v01 modem_mem_info;
  182. /* Provides information about the start address and the size of
  183. * the memory block that is being allocated to the modem driver.
  184. * Denotes the physical address
  185. */
  186. /* Optional */
  187. /* Destination end point for control commands from modem */
  188. uint8_t ctrl_comm_dest_end_pt_valid; /**< Must be set to true if
  189. ctrl_comm_dest_end_pt is being passed */
  190. uint32_t ctrl_comm_dest_end_pt;
  191. /* Provides information about the destination end point on the
  192. * application processor to which the modem driver can send
  193. * control commands. The value of this parameter cannot exceed
  194. * 19 since IPA only supports 20 end points.
  195. */
  196. /* Optional */
  197. /* Modem Bootup Information */
  198. uint8_t is_ssr_bootup_valid; /**< Must be set to true if
  199. is_ssr_bootup is being passed */
  200. uint8_t is_ssr_bootup;
  201. /* Specifies whether the modem is booting up after a modem only
  202. * sub-system restart or not. This will let the modem driver
  203. * know that it doesn't have to reinitialize some of the HW
  204. * blocks because IPA has not been reset since the previous
  205. * initialization.
  206. */
  207. /* Optional */
  208. /* Header Processing Context Table Information */
  209. uint8_t hdr_proc_ctx_tbl_info_valid;
  210. /* Must be set to true if hdr_proc_ctx_tbl_info is being passed */
  211. struct ipa_hdr_proc_ctx_tbl_info_type_v01 hdr_proc_ctx_tbl_info;
  212. /* Provides information about the header processing context table.
  213. */
  214. /* Optional */
  215. /* Compression Decompression Table Information */
  216. uint8_t zip_tbl_info_valid;
  217. /* Must be set to true if zip_tbl_info is being passed */
  218. struct ipa_zip_tbl_info_type_v01 zip_tbl_info;
  219. /* Provides information about the header processing context table.
  220. */
  221. }; /* Message */
  222. /* Response Message; Requests the modem IPA driver about initializtion */
  223. struct ipa_init_modem_driver_resp_msg_v01 {
  224. /* Mandatory */
  225. /* Result Code */
  226. struct ipa_qmi_response_type_v01 resp;
  227. /* Standard response type.*/
  228. /* Optional */
  229. /* Destination end point for control commands from master driver */
  230. uint8_t ctrl_comm_dest_end_pt_valid;
  231. /* Must be set to true if ctrl_comm_dest_ep is being passed */
  232. uint32_t ctrl_comm_dest_end_pt;
  233. /* Provides information about the destination end point on the
  234. * modem processor to which the master driver can send control
  235. * commands. The value of this parameter cannot exceed 19 since
  236. * IPA only supports 20 end points. This field is looked at only
  237. * if the result in TLV RESULT_CODE is QMI_RESULT_SUCCESS
  238. */
  239. /* Optional */
  240. /* Default end point */
  241. uint8_t default_end_pt_valid;
  242. /* Must be set to true if default_end_pt is being passed */
  243. uint32_t default_end_pt;
  244. /* Provides information about the default end point. The master
  245. * driver may or may not set the register in the hardware with
  246. * this value. The value of this parameter cannot exceed 19
  247. * since IPA only supports 20 end points. This field is looked
  248. * at only if the result in TLV RESULT_CODE is QMI_RESULT_SUCCESS
  249. */
  250. }; /* Message */
  251. /* Request Message; This is the message that is exchanged between the
  252. * control point and the service in order to register for indications.
  253. */
  254. struct ipa_indication_reg_req_msg_v01 {
  255. /* Optional */
  256. /* Master driver initialization completion */
  257. uint8_t master_driver_init_complete_valid;
  258. /* Must be set to true if master_driver_init_complete is being passed */
  259. uint8_t master_driver_init_complete;
  260. /* If set to TRUE, this field indicates that the client is
  261. * interested in getting indications about the completion
  262. * of the initialization sequence of the master driver.
  263. * Setting this field in the request message makes sense
  264. * only when the QMI_IPA_INDICATION_REGISTER_REQ is being
  265. * originated from the modem driver
  266. */
  267. /* Optional */
  268. /* Data Usage Quota Reached */
  269. uint8_t data_usage_quota_reached_valid;
  270. /* Must be set to true if data_usage_quota_reached is being passed */
  271. uint8_t data_usage_quota_reached;
  272. /* If set to TRUE, this field indicates that the client wants to
  273. * receive indications about reaching the data usage quota that
  274. * previously set via QMI_IPA_SET_DATA_USAGE_QUOTA. Setting this field
  275. * in the request message makes sense only when the
  276. * QMI_IPA_INDICATION_REGISTER_REQ is being originated from the Master
  277. * driver
  278. */
  279. }; /* Message */
  280. /* Response Message; This is the message that is exchanged between the
  281. * control point and the service in order to register for indications.
  282. */
  283. struct ipa_indication_reg_resp_msg_v01 {
  284. /* Mandatory */
  285. /* Result Code */
  286. struct ipa_qmi_response_type_v01 resp;
  287. /**< Standard response type.*/
  288. }; /* Message */
  289. /* Indication Message; Indication sent to the Modem IPA driver from
  290. * master IPA driver about initialization being complete.
  291. */
  292. struct ipa_master_driver_init_complt_ind_msg_v01 {
  293. /* Mandatory */
  294. /* Master driver initialization completion status */
  295. struct ipa_qmi_response_type_v01 master_driver_init_status;
  296. /* Indicates the status of initialization. If everything went
  297. * as expected, this field is set to SUCCESS. ERROR is set
  298. * otherwise. Extended error info may be used to convey
  299. * additional information about the error
  300. */
  301. }; /* Message */
  302. struct ipa_ipfltr_range_eq_16_type_v01 {
  303. uint8_t offset;
  304. /* Specifies the offset from the IHL (Internet Header length) */
  305. uint16_t range_low;
  306. /* Specifies the lower bound of the range */
  307. uint16_t range_high;
  308. /* Specifies the upper bound of the range */
  309. }; /* Type */
  310. struct ipa_ipfltr_mask_eq_32_type_v01 {
  311. uint8_t offset;
  312. /* Specifies the offset either from IHL or from the start of
  313. * the IP packet. This depends on the equation that this structure
  314. * is used in.
  315. */
  316. uint32_t mask;
  317. /* Specifies the mask that has to be used in the comparison.
  318. * The field is ANDed with the mask and compared against the value.
  319. */
  320. uint32_t value;
  321. /* Specifies the 32 bit value that used in the comparison. */
  322. }; /* Type */
  323. struct ipa_ipfltr_eq_16_type_v01 {
  324. uint8_t offset;
  325. /* Specifies the offset into the packet */
  326. uint16_t value;
  327. /* Specifies the 16 bit value that should be used in the comparison. */
  328. }; /* Type */
  329. struct ipa_ipfltr_eq_32_type_v01 {
  330. uint8_t offset;
  331. /* Specifies the offset into the packet */
  332. uint32_t value;
  333. /* Specifies the 32 bit value that should be used in the comparison. */
  334. }; /* Type */
  335. struct ipa_ipfltr_mask_eq_128_type_v01 {
  336. uint8_t offset;
  337. /* Specifies the offset into the packet */
  338. uint8_t mask[16];
  339. /* Specifies the mask that has to be used in the comparison.
  340. * The field is ANDed with the mask and compared against the value.
  341. */
  342. uint8_t value[16];
  343. /* Specifies the 128 bit value that should be used in the comparison. */
  344. }; /* Type */
  345. struct ipa_filter_rule_type_v01 {
  346. uint16_t rule_eq_bitmap;
  347. /* 16-bit Bitmask to indicate how many eqs are valid in this rule */
  348. uint8_t tos_eq_present;
  349. /* Specifies if a type of service check rule is present */
  350. uint8_t tos_eq;
  351. /* The value to check against the type of service (ipv4) field */
  352. uint8_t protocol_eq_present;
  353. /* Specifies if a protocol check rule is present */
  354. uint8_t protocol_eq;
  355. /* The value to check against the protocol field */
  356. uint8_t num_ihl_offset_range_16;
  357. /* The number of 16 bit range check rules at the location
  358. * determined by IP header length plus a given offset offset
  359. * in this rule. See the definition of the ipa_filter_range_eq_16
  360. * for better understanding. The value of this field cannot exceed
  361. * IPA_IPFLTR_NUM_IHL_RANGE_16_EQNS which is set as 2
  362. */
  363. struct ipa_ipfltr_range_eq_16_type_v01
  364. ihl_offset_range_16[QMI_IPA_IPFLTR_NUM_IHL_RANGE_16_EQNS_V01];
  365. /* Array of the registered IP header length offset 16 bit range
  366. * check rules.
  367. */
  368. uint8_t num_offset_meq_32;
  369. /* The number of 32 bit masked comparison rules present
  370. * in this rule
  371. */
  372. struct ipa_ipfltr_mask_eq_32_type_v01
  373. offset_meq_32[QMI_IPA_IPFLTR_NUM_MEQ_32_EQNS_V01];
  374. /* An array of all the possible 32bit masked comparison rules
  375. * in this rule
  376. */
  377. uint8_t tc_eq_present;
  378. /* Specifies if the traffic class rule is present in this rule */
  379. uint8_t tc_eq;
  380. /* The value against which the IPV4 traffic class field has to
  381. be checked */
  382. uint8_t flow_eq_present;
  383. /* Specifies if the "flow equals" rule is present in this rule */
  384. uint32_t flow_eq;
  385. /* The value against which the IPV6 flow field has to be checked */
  386. uint8_t ihl_offset_eq_16_present;
  387. /* Specifies if there is a 16 bit comparison required at the
  388. * location in the packet determined by "Intenet Header length
  389. * + specified offset"
  390. */
  391. struct ipa_ipfltr_eq_16_type_v01 ihl_offset_eq_16;
  392. /* The 16 bit comparison equation */
  393. uint8_t ihl_offset_eq_32_present;
  394. /* Specifies if there is a 32 bit comparison required at the
  395. * location in the packet determined by "Intenet Header length
  396. * + specified offset"
  397. */
  398. struct ipa_ipfltr_eq_32_type_v01 ihl_offset_eq_32;
  399. /* The 32 bit comparison equation */
  400. uint8_t num_ihl_offset_meq_32;
  401. /* The number of 32 bit masked comparison equations in this
  402. * rule. The location of the packet to be compared is
  403. * determined by the IP Header length + the give offset
  404. */
  405. struct ipa_ipfltr_mask_eq_32_type_v01
  406. ihl_offset_meq_32[QMI_IPA_IPFLTR_NUM_IHL_MEQ_32_EQNS_V01];
  407. /* Array of 32 bit masked comparison equations.
  408. */
  409. uint8_t num_offset_meq_128;
  410. /* The number of 128 bit comparison equations in this rule */
  411. struct ipa_ipfltr_mask_eq_128_type_v01
  412. offset_meq_128[QMI_IPA_IPFLTR_NUM_MEQ_128_EQNS_V01];
  413. /* Array of 128 bit comparison equations. The location in the
  414. * packet is determined by the specified offset
  415. */
  416. uint8_t metadata_meq32_present;
  417. /* Boolean indicating if the 32 bit masked comparison equation
  418. * is present or not. Comparison is done against the metadata
  419. * in IPA. Metadata can either be extracted from the packet
  420. * header or from the "metadata" register.
  421. */
  422. struct ipa_ipfltr_mask_eq_32_type_v01
  423. metadata_meq32;
  424. /* The metadata 32 bit masked comparison equation */
  425. uint8_t ipv4_frag_eq_present;
  426. /* Specifies if the IPv4 Fragment equation is present in this rule */
  427. }; /* Type */
  428. enum ipa_ip_type_enum_v01 {
  429. IPA_IP_TYPE_ENUM_MIN_ENUM_VAL_V01 = -2147483647,
  430. /* To force a 32 bit signed enum. Do not change or use*/
  431. QMI_IPA_IP_TYPE_INVALID_V01 = 0,
  432. /* Invalid IP type identifier */
  433. QMI_IPA_IP_TYPE_V4_V01 = 1,
  434. /* IP V4 type */
  435. QMI_IPA_IP_TYPE_V6_V01 = 2,
  436. /* IP V6 type */
  437. QMI_IPA_IP_TYPE_V4V6_V01 = 3,
  438. /* Applies to both IP types */
  439. IPA_IP_TYPE_ENUM_MAX_ENUM_VAL_V01 = 2147483647
  440. /* To force a 32 bit signed enum. Do not change or use*/
  441. };
  442. enum ipa_filter_action_enum_v01 {
  443. IPA_FILTER_ACTION_ENUM_MIN_ENUM_VAL_V01 = -2147483647,
  444. /* To force a 32 bit signed enum. Do not change or use */
  445. QMI_IPA_FILTER_ACTION_INVALID_V01 = 0,
  446. /* Invalid action on filter hit */
  447. QMI_IPA_FILTER_ACTION_SRC_NAT_V01 = 1,
  448. /* Pass packet to NAT block for Source NAT */
  449. QMI_IPA_FILTER_ACTION_DST_NAT_V01 = 2,
  450. /* Pass packet to NAT block for Destination NAT */
  451. QMI_IPA_FILTER_ACTION_ROUTING_V01 = 3,
  452. /* Pass packet to Routing block */
  453. QMI_IPA_FILTER_ACTION_EXCEPTION_V01 = 4,
  454. /* Treat packet as exception and send to exception pipe */
  455. IPA_FILTER_ACTION_ENUM_MAX_ENUM_VAL_V01 = 2147483647
  456. /* To force a 32 bit signed enum. Do not change or use*/
  457. };
  458. struct ipa_filter_spec_type_v01 {
  459. uint32_t filter_spec_identifier;
  460. /* This field is used to identify a filter spec in the list
  461. * of filter specs being sent from the client. This field
  462. * is applicable only in the filter install request and response.
  463. */
  464. enum ipa_ip_type_enum_v01 ip_type;
  465. /* This field identifies the IP type for which this rule is
  466. * applicable. The driver needs to identify the filter table
  467. * (V6 or V4) and this field is essential for that
  468. */
  469. struct ipa_filter_rule_type_v01 filter_rule;
  470. /* This field specifies the rules in the filter spec. These rules
  471. * are the ones that are matched against fields in the packet.
  472. */
  473. enum ipa_filter_action_enum_v01 filter_action;
  474. /* This field specifies the action to be taken when a filter match
  475. * occurs. The remote side should install this information into the
  476. * hardware along with the filter equations.
  477. */
  478. uint8_t is_routing_table_index_valid;
  479. /* Specifies whether the routing table index is present or not.
  480. * If the action is "QMI_IPA_FILTER_ACTION_EXCEPTION", this
  481. * parameter need not be provided.
  482. */
  483. uint32_t route_table_index;
  484. /* This is the index in the routing table that should be used
  485. * to route the packets if the filter rule is hit
  486. */
  487. uint8_t is_mux_id_valid;
  488. /* Specifies whether the mux_id is valid */
  489. uint32_t mux_id;
  490. /* This field identifies the QMAP MUX ID. As a part of QMAP
  491. * protocol, several data calls may be multiplexed over the
  492. * same physical transport channel. This identifier is used to
  493. * identify one such data call. The maximum value for this
  494. * identifier is 255.
  495. */
  496. }; /* Type */
  497. /* Request Message; This is the message that is exchanged between the
  498. * control point and the service in order to request the installation
  499. * of filtering rules in the hardware block by the remote side.
  500. */
  501. struct ipa_install_fltr_rule_req_msg_v01 {
  502. /* Optional */
  503. /* IP type that this rule applies to
  504. Filter specification to be installed in the hardware */
  505. uint8_t filter_spec_list_valid;
  506. /* Must be set to true if filter_spec_list is being passed */
  507. uint32_t filter_spec_list_len;
  508. /* Must be set to # of elements in filter_spec_list */
  509. struct ipa_filter_spec_type_v01
  510. filter_spec_list[QMI_IPA_MAX_FILTERS_V01];
  511. /* This structure defines the list of filters that have
  512. * to be installed in the hardware. The driver installing
  513. * these rules shall do so in the same order as specified
  514. * in this list.
  515. */
  516. /* Optional */
  517. /* Pipe index to intall rule */
  518. uint8_t source_pipe_index_valid;
  519. /* Must be set to true if source_pipe_index is being passed */
  520. uint32_t source_pipe_index;
  521. /* This is the source pipe on which the filter rule is to be
  522. * installed. The requestor may always not know the pipe
  523. * indices. If not specified, the receiver shall install
  524. * this rule on all the pipes that it controls through
  525. * which data may be fed into IPA.
  526. */
  527. /* Optional */
  528. /* Total number of IPv4 filters in the filter spec list */
  529. uint8_t num_ipv4_filters_valid;
  530. /* Must be set to true if num_ipv4_filters is being passed */
  531. uint32_t num_ipv4_filters;
  532. /* Number of IPv4 rules included in filter spec list */
  533. /* Optional */
  534. /* Total number of IPv6 filters in the filter spec list */
  535. uint8_t num_ipv6_filters_valid;
  536. /* Must be set to true if num_ipv6_filters is being passed */
  537. uint32_t num_ipv6_filters;
  538. /* Number of IPv6 rules included in filter spec list */
  539. /* Optional */
  540. /* List of XLAT filter indices in the filter spec list */
  541. uint8_t xlat_filter_indices_list_valid;
  542. /* Must be set to true if xlat_filter_indices_list
  543. * is being passed
  544. */
  545. uint32_t xlat_filter_indices_list_len;
  546. /* Must be set to # of elements in xlat_filter_indices_list */
  547. uint32_t xlat_filter_indices_list[QMI_IPA_MAX_FILTERS_V01];
  548. /* List of XLAT filter indices. Filter rules at specified indices
  549. * will need to be modified by the receiver if the PDN is XLAT
  550. * before installing them on the associated IPA consumer pipe.
  551. */
  552. }; /* Message */
  553. struct ipa_filter_rule_identifier_to_handle_map_v01 {
  554. uint32_t filter_spec_identifier;
  555. /* This field is used to identify a filter spec in the list of
  556. * filter specs being sent from the client. This field is
  557. * applicable only in the filter install request and response.
  558. */
  559. uint32_t filter_handle;
  560. /* This field is used to identify a rule in any subsequent message.
  561. * This is a value that is provided by the server to the control
  562. * point
  563. */
  564. }; /* Type */
  565. /* Response Message; This is the message that is exchanged between the
  566. * control point and the service in order to request the
  567. * installation of filtering rules in the hardware block by
  568. * the remote side.
  569. */
  570. struct ipa_install_fltr_rule_resp_msg_v01 {
  571. /* Mandatory */
  572. /* Result Code */
  573. struct ipa_qmi_response_type_v01 resp;
  574. /* Standard response type.
  575. * Standard response type. Contains the following data members:
  576. * - qmi_result_type -- QMI_RESULT_SUCCESS or QMI_RESULT_FAILURE
  577. * - qmi_error_type -- Error code. Possible error code values are
  578. * described in the error codes section of each message definition.
  579. */
  580. /* Optional */
  581. /* Filter Handle list */
  582. uint8_t filter_handle_list_valid;
  583. /**< Must be set to true if filter_handle_list is being passed */
  584. uint32_t filter_handle_list_len;
  585. /* Must be set to # of elements in filter_handle_list */
  586. struct ipa_filter_rule_identifier_to_handle_map_v01
  587. filter_handle_list[QMI_IPA_MAX_FILTERS_V01];
  588. /* This is a list of handles returned to the control point.
  589. * Each handle is mapped to the rule identifier that was
  590. * specified in the request message. Any further reference
  591. * to the rule is done using the filter handle
  592. */
  593. }; /* Message */
  594. struct ipa_filter_handle_to_index_map_v01 {
  595. uint32_t filter_handle;
  596. /* This is a handle that was given to the remote client that
  597. * requested the rule addition.
  598. */
  599. uint32_t filter_index;
  600. /* This index denotes the location in a filter table, where the
  601. * filter rule has been installed. The maximum value of this
  602. * field is 64.
  603. */
  604. }; /* Type */
  605. /* Request Message; This is the message that is exchanged between the
  606. * control point and the service in order to notify the remote driver
  607. * about the installation of the filter rule supplied earlier by
  608. * the remote driver
  609. */
  610. struct ipa_fltr_installed_notif_req_msg_v01 {
  611. /* Mandatory */
  612. /* Pipe index */
  613. uint32_t source_pipe_index;
  614. /* This is the source pipe on which the filter rule has been
  615. * installed or was attempted to be installed
  616. */
  617. /* Mandatory */
  618. /* Installation Status */
  619. enum ipa_qmi_result_type_v01 install_status;
  620. /* This is the status of installation. If this indicates
  621. * SUCCESS, other optional fields carry additional
  622. * information
  623. */
  624. /* Mandatory */
  625. /* List of filter indices */
  626. uint32_t filter_index_list_len;
  627. /* Must be set to # of elements in filter_index_list */
  628. struct ipa_filter_handle_to_index_map_v01
  629. filter_index_list[QMI_IPA_MAX_FILTERS_V01];
  630. /* This field provides the list of filter indices and the
  631. * corresponding filter handle. If the installation_status
  632. * indicates failure, then the filter indices shall be set
  633. * to a reserve index (255)
  634. */
  635. /* Optional */
  636. /* Embedded pipe index */
  637. uint8_t embedded_pipe_index_valid;
  638. /* Must be set to true if embedded_pipe_index is being passed */
  639. uint32_t embedded_pipe_index;
  640. /* This index denotes the embedded pipe number on which a call to
  641. * the same PDN has been made. If this field is set, it denotes
  642. * that this is a use case where PDN sharing is happening. The
  643. * embedded pipe is used to send data from the embedded client
  644. * in the device
  645. */
  646. /* Optional */
  647. /* Retain Header Configuration */
  648. uint8_t retain_header_valid;
  649. /* Must be set to true if retain_header is being passed */
  650. uint8_t retain_header;
  651. /* This field indicates if the driver installing the rule has
  652. * turned on the "retain header" bit. If this is true, the
  653. * header that is removed by IPA is reinserted after the
  654. * packet processing is completed.
  655. */
  656. /* Optional */
  657. /* Embedded call Mux Id */
  658. uint8_t embedded_call_mux_id_valid;
  659. /**< Must be set to true if embedded_call_mux_id is being passed */
  660. uint32_t embedded_call_mux_id;
  661. /* This identifies one of the many calls that have been originated
  662. * on the embedded pipe. This is how we identify the PDN gateway
  663. * to which traffic from the source pipe has to flow.
  664. */
  665. /* Optional */
  666. /* Total number of IPv4 filters in the filter index list */
  667. uint8_t num_ipv4_filters_valid;
  668. /* Must be set to true if num_ipv4_filters is being passed */
  669. uint32_t num_ipv4_filters;
  670. /* Number of IPv4 rules included in filter index list */
  671. /* Optional */
  672. /* Total number of IPv6 filters in the filter index list */
  673. uint8_t num_ipv6_filters_valid;
  674. /* Must be set to true if num_ipv6_filters is being passed */
  675. uint32_t num_ipv6_filters;
  676. /* Number of IPv6 rules included in filter index list */
  677. /* Optional */
  678. /* Start index on IPv4 filters installed on source pipe */
  679. uint8_t start_ipv4_filter_idx_valid;
  680. /* Must be set to true if start_ipv4_filter_idx is being passed */
  681. uint32_t start_ipv4_filter_idx;
  682. /* Start index of IPv4 rules in filter index list */
  683. /* Optional */
  684. /* Start index on IPv6 filters installed on source pipe */
  685. uint8_t start_ipv6_filter_idx_valid;
  686. /* Must be set to true if start_ipv6_filter_idx is being passed */
  687. uint32_t start_ipv6_filter_idx;
  688. /* Start index of IPv6 rules in filter index list */
  689. }; /* Message */
  690. /* Response Message; This is the message that is exchanged between the control
  691. * point and the service in order to notify the remote driver about the
  692. * installation of the filter rule supplied earlier by the remote driver
  693. */
  694. struct ipa_fltr_installed_notif_resp_msg_v01 {
  695. /* Mandatory */
  696. /* Result Code */
  697. struct ipa_qmi_response_type_v01 resp;
  698. /* Standard response type */
  699. }; /* Message */
  700. /* Request Message; Notifies the remote driver of the need to clear the data
  701. * path to prevent the IPA from being blocked at the head of the processing
  702. * pipeline
  703. */
  704. struct ipa_enable_force_clear_datapath_req_msg_v01 {
  705. /* Mandatory */
  706. /* Pipe Mask */
  707. uint32_t source_pipe_bitmask;
  708. /* Set of consumer (source) pipes that must be clear of
  709. * active data transfers.
  710. */
  711. /* Mandatory */
  712. /* Request ID */
  713. uint32_t request_id;
  714. /* Identifies the ID of the request that is sent to the server
  715. * The same request ID is used in the message to remove the force_clear
  716. * request. The server is expected to keep track of the request ID and
  717. * the source_pipe_bitmask so that it can revert as needed
  718. */
  719. /* Optional */
  720. /* Source Throttle State */
  721. uint8_t throttle_source_valid;
  722. /* Must be set to true if throttle_source is being passed */
  723. uint8_t throttle_source;
  724. /* Specifies whether the server is to throttle the data from
  725. * these consumer (source) pipes after clearing the exisiting
  726. * data present in the IPA that were pulled from these pipes
  727. * The server is expected to put all the source pipes in the
  728. * source_pipe_bitmask in the same state
  729. */
  730. }; /* Message */
  731. /* Response Message; Notifies the remote driver of the need to clear the
  732. * data path to prevent the IPA from being blocked at the head of the
  733. * processing pipeline
  734. */
  735. struct ipa_enable_force_clear_datapath_resp_msg_v01 {
  736. /* Mandatory */
  737. /* Result Code */
  738. struct ipa_qmi_response_type_v01 resp;
  739. /* Standard response type */
  740. }; /* Message */
  741. /* Request Message; Notifies the remote driver that the forceful clearing
  742. * of the data path can be lifted
  743. */
  744. struct ipa_disable_force_clear_datapath_req_msg_v01 {
  745. /* Mandatory */
  746. /* Request ID */
  747. uint32_t request_id;
  748. /* Identifies the request that was sent to the server to
  749. * forcibly clear the data path. This request simply undoes
  750. * the operation done in that request
  751. */
  752. }; /* Message */
  753. /* Response Message; Notifies the remote driver that the forceful clearing
  754. * of the data path can be lifted
  755. */
  756. struct ipa_disable_force_clear_datapath_resp_msg_v01 {
  757. /* Mandatory */
  758. /* Result Code */
  759. struct ipa_qmi_response_type_v01 resp;
  760. /* Standard response type */
  761. }; /* Message */
  762. enum ipa_peripheral_speed_enum_v01 {
  763. IPA_PERIPHERAL_SPEED_ENUM_MIN_ENUM_VAL_V01 = -2147483647,
  764. /* To force a 32 bit signed enum. Do not change or use */
  765. QMI_IPA_PER_USB_FS_V01 = 1,
  766. /* Full-speed USB connection */
  767. QMI_IPA_PER_USB_HS_V01 = 2,
  768. /* High-speed USB connection */
  769. QMI_IPA_PER_USB_SS_V01 = 3,
  770. /* Super-speed USB connection */
  771. QMI_IPA_PER_WLAN_V01 = 4,
  772. /* WLAN connection */
  773. IPA_PERIPHERAL_SPEED_ENUM_MAX_ENUM_VAL_V01 = 2147483647
  774. /* To force a 32 bit signed enum. Do not change or use*/
  775. };
  776. enum ipa_pipe_mode_enum_v01 {
  777. IPA_PIPE_MODE_ENUM_MIN_ENUM_VAL_V01 = -2147483647,
  778. /* To force a 32 bit signed enum. Do not change or use */
  779. QMI_IPA_PIPE_MODE_HW_V01 = 1,
  780. /* Pipe is connected with a hardware block */
  781. QMI_IPA_PIPE_MODE_SW_V01 = 2,
  782. /* Pipe is controlled by the software */
  783. IPA_PIPE_MODE_ENUM_MAX_ENUM_VAL_V01 = 2147483647
  784. /* To force a 32 bit signed enum. Do not change or use */
  785. };
  786. enum ipa_peripheral_type_enum_v01 {
  787. IPA_PERIPHERAL_TYPE_ENUM_MIN_ENUM_VAL_V01 = -2147483647,
  788. /* To force a 32 bit signed enum. Do not change or use */
  789. QMI_IPA_PERIPHERAL_USB_V01 = 1,
  790. /* Specifies a USB peripheral */
  791. QMI_IPA_PERIPHERAL_HSIC_V01 = 2,
  792. /* Specifies an HSIC peripheral */
  793. QMI_IPA_PERIPHERAL_PCIE_V01 = 3,
  794. /* Specifies a PCIe peripheral */
  795. IPA_PERIPHERAL_TYPE_ENUM_MAX_ENUM_VAL_V01 = 2147483647
  796. /* To force a 32 bit signed enum. Do not change or use */
  797. };
  798. struct ipa_config_req_msg_v01 {
  799. /* Optional */
  800. /* Peripheral Type */
  801. uint8_t peripheral_type_valid;
  802. /* Must be set to true if peripheral_type is being passed */
  803. enum ipa_peripheral_type_enum_v01 peripheral_type;
  804. /* Informs the remote driver about the perhipheral for
  805. * which this configuration information is relevant. Values:
  806. * - QMI_IPA_PERIPHERAL_USB (1) -- Specifies a USB peripheral
  807. * - QMI_IPA_PERIPHERAL_HSIC(2) -- Specifies an HSIC peripheral
  808. * - QMI_IPA_PERIPHERAL_PCIE(3) -- Specifies a PCIe peripheral
  809. */
  810. /* Optional */
  811. /* HW Deaggregation Support */
  812. uint8_t hw_deaggr_supported_valid;
  813. /* Must be set to true if hw_deaggr_supported is being passed */
  814. uint8_t hw_deaggr_supported;
  815. /* Informs the remote driver whether the local IPA driver
  816. * allows de-aggregation to be performed in the hardware
  817. */
  818. /* Optional */
  819. /* Maximum Aggregation Frame Size */
  820. uint8_t max_aggr_frame_size_valid;
  821. /* Must be set to true if max_aggr_frame_size is being passed */
  822. uint32_t max_aggr_frame_size;
  823. /* Specifies the maximum size of the aggregated frame that
  824. * the remote driver can expect from this execution environment
  825. * - Valid range: 128 bytes to 32768 bytes
  826. */
  827. /* Optional */
  828. /* IPA Ingress Pipe Mode */
  829. uint8_t ipa_ingress_pipe_mode_valid;
  830. /* Must be set to true if ipa_ingress_pipe_mode is being passed */
  831. enum ipa_pipe_mode_enum_v01 ipa_ingress_pipe_mode;
  832. /* Indicates to the remote driver if the ingress pipe into the
  833. * IPA is in direct connection with another hardware block or
  834. * if the producer of data to this ingress pipe is a software
  835. * module. Values:
  836. * -QMI_IPA_PIPE_MODE_HW(1) --Pipe is connected with hardware block
  837. * -QMI_IPA_PIPE_MODE_SW(2) --Pipe is controlled by the software
  838. */
  839. /* Optional */
  840. /* Peripheral Speed Info */
  841. uint8_t peripheral_speed_info_valid;
  842. /* Must be set to true if peripheral_speed_info is being passed */
  843. enum ipa_peripheral_speed_enum_v01 peripheral_speed_info;
  844. /* Indicates the speed that the peripheral connected to the IPA supports
  845. * Values:
  846. * - QMI_IPA_PER_USB_FS (1) -- Full-speed USB connection
  847. * - QMI_IPA_PER_USB_HS (2) -- High-speed USB connection
  848. * - QMI_IPA_PER_USB_SS (3) -- Super-speed USB connection
  849. * - QMI_IPA_PER_WLAN (4) -- WLAN connection
  850. */
  851. /* Optional */
  852. /* Downlink Accumulation Time limit */
  853. uint8_t dl_accumulation_time_limit_valid;
  854. /* Must be set to true if dl_accumulation_time_limit is being passed */
  855. uint32_t dl_accumulation_time_limit;
  856. /* Informs the remote driver about the time for which data
  857. * is accumulated in the downlink direction before it is pushed into the
  858. * IPA (downlink is with respect to the WWAN air interface)
  859. * - Units: milliseconds
  860. * - Maximum value: 255
  861. */
  862. /* Optional */
  863. /* Downlink Accumulation Packet limit */
  864. uint8_t dl_accumulation_pkt_limit_valid;
  865. /* Must be set to true if dl_accumulation_pkt_limit is being passed */
  866. uint32_t dl_accumulation_pkt_limit;
  867. /* Informs the remote driver about the number of packets
  868. * that are to be accumulated in the downlink direction before it is
  869. * pushed into the IPA - Maximum value: 1023
  870. */
  871. /* Optional */
  872. /* Downlink Accumulation Byte Limit */
  873. uint8_t dl_accumulation_byte_limit_valid;
  874. /* Must be set to true if dl_accumulation_byte_limit is being passed */
  875. uint32_t dl_accumulation_byte_limit;
  876. /* Inform the remote driver about the number of bytes
  877. * that are to be accumulated in the downlink direction before it
  878. * is pushed into the IPA - Maximum value: TBD
  879. */
  880. /* Optional */
  881. /* Uplink Accumulation Time Limit */
  882. uint8_t ul_accumulation_time_limit_valid;
  883. /* Must be set to true if ul_accumulation_time_limit is being passed */
  884. uint32_t ul_accumulation_time_limit;
  885. /* Inform thes remote driver about the time for which data
  886. * is to be accumulated in the uplink direction before it is pushed into
  887. * the IPA (downlink is with respect to the WWAN air interface).
  888. * - Units: milliseconds
  889. * - Maximum value: 255
  890. */
  891. /* Optional */
  892. /* HW Control Flags */
  893. uint8_t hw_control_flags_valid;
  894. /* Must be set to true if hw_control_flags is being passed */
  895. uint32_t hw_control_flags;
  896. /* Informs the remote driver about the hardware control flags:
  897. * - Bit 0: IPA_HW_FLAG_HALT_SYSTEM_ON_NON_TERMINAL_FAILURE --
  898. * Indicates to the hardware that it must not continue with
  899. * any subsequent operation even if the failure is not terminal
  900. * - Bit 1: IPA_HW_FLAG_NO_REPORT_MHI_CHANNEL_ERORR --
  901. * Indicates to the hardware that it is not required to report
  902. * channel errors to the host.
  903. * - Bit 2: IPA_HW_FLAG_NO_REPORT_MHI_CHANNEL_WAKE_UP --
  904. * Indicates to the hardware that it is not required to generate
  905. * wake-up events to the host.
  906. * - Bit 4: IPA_HW_FLAG_WORK_OVER_DDR --
  907. * Indicates to the hardware that it is accessing addresses in
  908. * the DDR and not over PCIe
  909. * - Bit 5: IPA_HW_FLAG_INTERRUPT_MODE_CTRL_FLAG --
  910. * Indicates whether the device must
  911. * raise an event to let the host know that it is going into an
  912. * interrupt mode (no longer polling for data/buffer availability)
  913. */
  914. /* Optional */
  915. /* Uplink MSI Event Threshold */
  916. uint8_t ul_msi_event_threshold_valid;
  917. /* Must be set to true if ul_msi_event_threshold is being passed */
  918. uint32_t ul_msi_event_threshold;
  919. /* Informs the remote driver about the threshold that will
  920. * cause an interrupt (MSI) to be fired to the host. This ensures
  921. * that the remote driver does not accumulate an excesive number of
  922. * events before firing an interrupt.
  923. * This threshold is applicable for data moved in the UL direction.
  924. * - Maximum value: 65535
  925. */
  926. /* Optional */
  927. /* Downlink MSI Event Threshold */
  928. uint8_t dl_msi_event_threshold_valid;
  929. /* Must be set to true if dl_msi_event_threshold is being passed */
  930. uint32_t dl_msi_event_threshold;
  931. /* Informs the remote driver about the threshold that will
  932. * cause an interrupt (MSI) to be fired to the host. This ensures
  933. * that the remote driver does not accumulate an excesive number of
  934. * events before firing an interrupt
  935. * This threshold is applicable for data that is moved in the
  936. * DL direction - Maximum value: 65535
  937. */
  938. }; /* Message */
  939. /* Response Message; Notifies the remote driver of the configuration
  940. * information
  941. */
  942. struct ipa_config_resp_msg_v01 {
  943. /* Mandatory */
  944. /* Result Code */
  945. struct ipa_qmi_response_type_v01 resp;
  946. /**< Standard response type.*/
  947. }; /* Message */
  948. enum ipa_stats_type_enum_v01 {
  949. IPA_STATS_TYPE_ENUM_MIN_ENUM_VAL_V01 = -2147483647,
  950. /* To force a 32 bit signed enum. Do not change or use */
  951. QMI_IPA_STATS_TYPE_INVALID_V01 = 0,
  952. /* Invalid stats type identifier */
  953. QMI_IPA_STATS_TYPE_PIPE_V01 = 1,
  954. /* Pipe stats type */
  955. QMI_IPA_STATS_TYPE_FILTER_RULES_V01 = 2,
  956. /* Filter rule stats type */
  957. IPA_STATS_TYPE_ENUM_MAX_ENUM_VAL_V01 = 2147483647
  958. /* To force a 32 bit signed enum. Do not change or use */
  959. };
  960. struct ipa_pipe_stats_info_type_v01 {
  961. uint32_t pipe_index;
  962. /* Pipe index for statistics to be retrieved. */
  963. uint64_t num_ipv4_packets;
  964. /* Accumulated number of IPv4 packets over this pipe. */
  965. uint64_t num_ipv4_bytes;
  966. /* Accumulated number of IPv4 bytes over this pipe. */
  967. uint64_t num_ipv6_packets;
  968. /* Accumulated number of IPv6 packets over this pipe. */
  969. uint64_t num_ipv6_bytes;
  970. /* Accumulated number of IPv6 bytes over this pipe. */
  971. };
  972. struct ipa_stats_type_filter_rule_v01 {
  973. uint32_t filter_rule_index;
  974. /* Filter rule index for statistics to be retrieved. */
  975. uint64_t num_packets;
  976. /* Accumulated number of packets over this filter rule. */
  977. };
  978. /* Request Message; Retrieve the data statistics collected on modem
  979. * IPA driver.
  980. */
  981. struct ipa_get_data_stats_req_msg_v01 {
  982. /* Mandatory */
  983. /* Stats Type */
  984. enum ipa_stats_type_enum_v01 ipa_stats_type;
  985. /* Indicates the type of statistics to be retrieved. */
  986. /* Optional */
  987. /* Reset Statistics */
  988. uint8_t reset_stats_valid;
  989. /* Must be set to true if reset_stats is being passed */
  990. uint8_t reset_stats;
  991. /* Option to reset the specific type of data statistics
  992. * currently collected.
  993. */
  994. }; /* Message */
  995. /* Response Message; Retrieve the data statistics collected
  996. * on modem IPA driver.
  997. */
  998. struct ipa_get_data_stats_resp_msg_v01 {
  999. /* Mandatory */
  1000. /* Result Code */
  1001. struct ipa_qmi_response_type_v01 resp;
  1002. /* Standard response type. */
  1003. /* Optional */
  1004. /* Stats Type */
  1005. uint8_t ipa_stats_type_valid;
  1006. /* Must be set to true if ipa_stats_type is passed */
  1007. enum ipa_stats_type_enum_v01 ipa_stats_type;
  1008. /* Indicates the type of statistics that are retrieved. */
  1009. /* Optional */
  1010. /* Uplink Source Pipe Statistics List */
  1011. uint8_t ul_src_pipe_stats_list_valid;
  1012. /* Must be set to true if ul_src_pipe_stats_list is being passed */
  1013. uint32_t ul_src_pipe_stats_list_len;
  1014. /* Must be set to # of elements in ul_src_pipe_stats_list */
  1015. struct ipa_pipe_stats_info_type_v01
  1016. ul_src_pipe_stats_list[QMI_IPA_MAX_PIPES_V01];
  1017. /* List of all Uplink pipe statistics that are retrieved. */
  1018. /* Optional */
  1019. /* Downlink Destination Pipe Statistics List */
  1020. uint8_t dl_dst_pipe_stats_list_valid;
  1021. /* Must be set to true if dl_dst_pipe_stats_list is being passed */
  1022. uint32_t dl_dst_pipe_stats_list_len;
  1023. /* Must be set to # of elements in dl_dst_pipe_stats_list */
  1024. struct ipa_pipe_stats_info_type_v01
  1025. dl_dst_pipe_stats_list[QMI_IPA_MAX_PIPES_V01];
  1026. /* List of all Downlink pipe statistics that are retrieved. */
  1027. /* Optional */
  1028. /* Downlink Filter Rule Stats List */
  1029. uint8_t dl_filter_rule_stats_list_valid;
  1030. /* Must be set to true if dl_filter_rule_stats_list is being passed */
  1031. uint32_t dl_filter_rule_stats_list_len;
  1032. /* Must be set to # of elements in dl_filter_rule_stats_list */
  1033. struct ipa_stats_type_filter_rule_v01
  1034. dl_filter_rule_stats_list[QMI_IPA_MAX_FILTERS_V01];
  1035. /* List of all Downlink filter rule statistics retrieved. */
  1036. }; /* Message */
  1037. struct ipa_apn_data_stats_info_type_v01 {
  1038. uint32_t mux_id;
  1039. /* Indicates the MUX ID associated with the APN for which the data
  1040. * usage statistics is queried
  1041. */
  1042. uint64_t num_ul_packets;
  1043. /* Accumulated number of uplink packets corresponding to
  1044. * this Mux ID
  1045. */
  1046. uint64_t num_ul_bytes;
  1047. /* Accumulated number of uplink bytes corresponding to
  1048. * this Mux ID
  1049. */
  1050. uint64_t num_dl_packets;
  1051. /* Accumulated number of downlink packets corresponding
  1052. * to this Mux ID
  1053. */
  1054. uint64_t num_dl_bytes;
  1055. /* Accumulated number of downlink bytes corresponding to
  1056. * this Mux ID
  1057. */
  1058. }; /* Type */
  1059. /* Request Message; Retrieve the APN data statistics collected from modem */
  1060. struct ipa_get_apn_data_stats_req_msg_v01 {
  1061. /* Optional */
  1062. /* Mux ID List */
  1063. uint8_t mux_id_list_valid;
  1064. /* Must be set to true if mux_id_list is being passed */
  1065. uint32_t mux_id_list_len;
  1066. /* Must be set to # of elements in mux_id_list */
  1067. uint32_t mux_id_list[QMI_IPA_MAX_APN_V01];
  1068. /* The list of MUX IDs associated with APNs for which the data usage
  1069. * statistics is being retrieved
  1070. */
  1071. }; /* Message */
  1072. /* Response Message; Retrieve the APN data statistics collected from modem */
  1073. struct ipa_get_apn_data_stats_resp_msg_v01 {
  1074. /* Mandatory */
  1075. /* Result Code */
  1076. struct ipa_qmi_response_type_v01 resp;
  1077. /* Standard response type.*/
  1078. /* Optional */
  1079. /* APN Data Statistics List */
  1080. uint8_t apn_data_stats_list_valid;
  1081. /* Must be set to true if apn_data_stats_list is being passed */
  1082. uint32_t apn_data_stats_list_len;
  1083. /* Must be set to # of elements in apn_data_stats_list */
  1084. struct ipa_apn_data_stats_info_type_v01
  1085. apn_data_stats_list[QMI_IPA_MAX_APN_V01];
  1086. /* List of APN data retrieved as per request on mux_id.
  1087. * For now, only one APN monitoring is supported on modem driver.
  1088. * Making this as list for expandability to support more APNs in future.
  1089. */
  1090. }; /* Message */
  1091. struct ipa_data_usage_quota_info_type_v01 {
  1092. uint32_t mux_id;
  1093. /* Indicates the MUX ID associated with the APN for which the data usage
  1094. * quota needs to be set
  1095. */
  1096. uint64_t num_Mbytes;
  1097. /* Number of Mega-bytes of quota value to be set on this APN associated
  1098. * with this Mux ID.
  1099. */
  1100. }; /* Type */
  1101. /* Request Message; Master driver sets a data usage quota value on
  1102. * modem driver
  1103. */
  1104. struct ipa_set_data_usage_quota_req_msg_v01 {
  1105. /* Optional */
  1106. /* APN Quota List */
  1107. uint8_t apn_quota_list_valid;
  1108. /* Must be set to true if apn_quota_list is being passed */
  1109. uint32_t apn_quota_list_len;
  1110. /* Must be set to # of elements in apn_quota_list */
  1111. struct ipa_data_usage_quota_info_type_v01
  1112. apn_quota_list[QMI_IPA_MAX_APN_V01];
  1113. /* The list of APNs on which a data usage quota to be set on modem
  1114. * driver. For now, only one APN monitoring is supported on modem
  1115. * driver. Making this as list for expandability to support more
  1116. * APNs in future.
  1117. */
  1118. }; /* Message */
  1119. /* Response Message; Master driver sets a data usage on modem driver. */
  1120. struct ipa_set_data_usage_quota_resp_msg_v01 {
  1121. /* Mandatory */
  1122. /* Result Code */
  1123. struct ipa_qmi_response_type_v01 resp;
  1124. /* Standard response type.*/
  1125. }; /* Message */
  1126. /* Indication Message; Modem driver sends this indication to master
  1127. * driver when the data usage quota is reached
  1128. */
  1129. struct ipa_data_usage_quota_reached_ind_msg_v01 {
  1130. /* Mandatory */
  1131. /* APN Quota List */
  1132. struct ipa_data_usage_quota_info_type_v01 apn;
  1133. /* This message indicates which APN has the previously set quota
  1134. * reached. For now, only one APN monitoring is supported on modem
  1135. * driver.
  1136. */
  1137. }; /* Message */
  1138. /* Request Message; Master driver request modem driver to terminate
  1139. * the current data usage quota monitoring session.
  1140. */
  1141. struct ipa_stop_data_usage_quota_req_msg_v01 {
  1142. /* This element is a placeholder to prevent the declaration of
  1143. * an empty struct. DO NOT USE THIS FIELD UNDER ANY CIRCUMSTANCE
  1144. */
  1145. char __placeholder;
  1146. }; /* Message */
  1147. /* Response Message; Master driver request modem driver to terminate
  1148. * the current quota monitoring session.
  1149. */
  1150. struct ipa_stop_data_usage_quota_resp_msg_v01 {
  1151. /* Mandatory */
  1152. /* Result Code */
  1153. struct ipa_qmi_response_type_v01 resp;
  1154. /**< Standard response type.*/
  1155. }; /* Message */
  1156. /*Service Message Definition*/
  1157. #define QMI_IPA_INDICATION_REGISTER_REQ_V01 0x0020
  1158. #define QMI_IPA_INDICATION_REGISTER_RESP_V01 0x0020
  1159. #define QMI_IPA_INIT_MODEM_DRIVER_REQ_V01 0x0021
  1160. #define QMI_IPA_INIT_MODEM_DRIVER_RESP_V01 0x0021
  1161. #define QMI_IPA_MASTER_DRIVER_INIT_COMPLETE_IND_V01 0x0022
  1162. #define QMI_IPA_INSTALL_FILTER_RULE_REQ_V01 0x0023
  1163. #define QMI_IPA_INSTALL_FILTER_RULE_RESP_V01 0x0023
  1164. #define QMI_IPA_FILTER_INSTALLED_NOTIF_REQ_V01 0x0024
  1165. #define QMI_IPA_FILTER_INSTALLED_NOTIF_RESP_V01 0x0024
  1166. #define QMI_IPA_ENABLE_FORCE_CLEAR_DATAPATH_REQ_V01 0x0025
  1167. #define QMI_IPA_ENABLE_FORCE_CLEAR_DATAPATH_RESP_V01 0x0025
  1168. #define QMI_IPA_DISABLE_FORCE_CLEAR_DATAPATH_REQ_V01 0x0026
  1169. #define QMI_IPA_DISABLE_FORCE_CLEAR_DATAPATH_RESP_V01 0x0026
  1170. #define QMI_IPA_CONFIG_REQ_V01 0x0027
  1171. #define QMI_IPA_CONFIG_RESP_V01 0x0027
  1172. #define QMI_IPA_DISABLE_LINK_LOW_PWR_STATE_REQ_V01 0x0028
  1173. #define QMI_IPA_DISABLE_LINK_LOW_PWR_STATE_RESP_V01 0x0028
  1174. #define QMI_IPA_ENABLE_LINK_LOW_PWR_STATE_REQ_V01 0x0029
  1175. #define QMI_IPA_ENABLE_LINK_LOW_PWR_STATE_RESP_V01 0x0029
  1176. #define QMI_IPA_GET_DATA_STATS_REQ_V01 0x0030
  1177. #define QMI_IPA_GET_DATA_STATS_RESP_V01 0x0030
  1178. #define QMI_IPA_GET_APN_DATA_STATS_REQ_V01 0x0031
  1179. #define QMI_IPA_GET_APN_DATA_STATS_RESP_V01 0x0031
  1180. #define QMI_IPA_SET_DATA_USAGE_QUOTA_REQ_V01 0x0032
  1181. #define QMI_IPA_SET_DATA_USAGE_QUOTA_RESP_V01 0x0032
  1182. #define QMI_IPA_DATA_USAGE_QUOTA_REACHED_IND_V01 0x0033
  1183. #define QMI_IPA_STOP_DATA_USAGE_QUOTA_REQ_V01 0x0034
  1184. #define QMI_IPA_STOP_DATA_USAGE_QUOTA_RESP_V01 0x0034
  1185. /* add for max length*/
  1186. #define QMI_IPA_INIT_MODEM_DRIVER_REQ_MAX_MSG_LEN_V01 98
  1187. #define QMI_IPA_INIT_MODEM_DRIVER_RESP_MAX_MSG_LEN_V01 21
  1188. #define QMI_IPA_INDICATION_REGISTER_REQ_MAX_MSG_LEN_V01 8
  1189. #define QMI_IPA_INDICATION_REGISTER_RESP_MAX_MSG_LEN_V01 7
  1190. #define QMI_IPA_INSTALL_FILTER_RULE_REQ_MAX_MSG_LEN_V01 11293
  1191. #define QMI_IPA_INSTALL_FILTER_RULE_RESP_MAX_MSG_LEN_V01 523
  1192. #define QMI_IPA_FILTER_INSTALLED_NOTIF_REQ_MAX_MSG_LEN_V01 574
  1193. #define QMI_IPA_FILTER_INSTALLED_NOTIF_RESP_MAX_MSG_LEN_V01 7
  1194. #define QMI_IPA_MASTER_DRIVER_INIT_COMPLETE_IND_MAX_MSG_LEN_V01 7
  1195. #define QMI_IPA_DATA_USAGE_QUOTA_REACHED_IND_MAX_MSG_LEN_V01 15
  1196. #define QMI_IPA_ENABLE_FORCE_CLEAR_DATAPATH_REQ_MAX_MSG_LEN_V01 18
  1197. #define QMI_IPA_DISABLE_FORCE_CLEAR_DATAPATH_REQ_MAX_MSG_LEN_V01 7
  1198. #define QMI_IPA_ENABLE_FORCE_CLEAR_DATAPATH_RESP_MAX_MSG_LEN_V01 7
  1199. #define QMI_IPA_DISABLE_FORCE_CLEAR_DATAPATH_RESP_MAX_MSG_LEN_V01 7
  1200. #define QMI_IPA_CONFIG_REQ_MAX_MSG_LEN_V01 81
  1201. #define QMI_IPA_CONFIG_RESP_MAX_MSG_LEN_V01 7
  1202. #define QMI_IPA_DISABLE_LINK_LOW_PWR_STATE_REQ_MAX_MSG_LEN_V01 18
  1203. #define QMI_IPA_DISABLE_LINK_LOW_PWR_STATE_RESP_MAX_MSG_LEN_V01 7
  1204. #define QMI_IPA_ENABLE_LINK_LOW_PWR_STATE_REQ_MAX_MSG_LEN_V01 7
  1205. #define QMI_IPA_ENABLE_LINK_LOW_PWR_STATE_RESP_MAX_MSG_LEN_V01 7
  1206. #define QMI_IPA_GET_DATA_STATS_REQ_MAX_MSG_LEN_V01 11
  1207. #define QMI_IPA_GET_DATA_STATS_RESP_MAX_MSG_LEN_V01 2234
  1208. #define QMI_IPA_GET_APN_DATA_STATS_REQ_MAX_MSG_LEN_V01 36
  1209. #define QMI_IPA_GET_APN_DATA_STATS_RESP_MAX_MSG_LEN_V01 299
  1210. #define QMI_IPA_SET_DATA_USAGE_QUOTA_REQ_MAX_MSG_LEN_V01 100
  1211. #define QMI_IPA_SET_DATA_USAGE_QUOTA_RESP_MAX_MSG_LEN_V01 7
  1212. #define QMI_IPA_STOP_DATA_USAGE_QUOTA_REQ_MAX_MSG_LEN_V01 0
  1213. #define QMI_IPA_STOP_DATA_USAGE_QUOTA_RESP_MAX_MSG_LEN_V01 7
  1214. /* Service Object Accessor */
  1215. #endif/* IPA_QMI_SERVICE_V01_H */