cnss_plat_ipc_service_v01.c 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /* Copyright (c) 2021, The Linux Foundation. All rights reserved. */
  3. #include "cnss_plat_ipc_service_v01.h"
  4. #include <linux/module.h>
  5. struct qmi_elem_info cnss_plat_ipc_qmi_init_setup_req_msg_v01_ei[] = {
  6. {
  7. .data_type = QMI_UNSIGNED_1_BYTE,
  8. .elem_len = 1,
  9. .elem_size = sizeof(u8),
  10. .array_type = NO_ARRAY,
  11. .tlv_type = 0x01,
  12. .offset = offsetof(struct
  13. cnss_plat_ipc_qmi_init_setup_req_msg_v01,
  14. dms_mac_addr_supported),
  15. },
  16. {
  17. .data_type = QMI_UNSIGNED_1_BYTE,
  18. .elem_len = 1,
  19. .elem_size = sizeof(u8),
  20. .array_type = NO_ARRAY,
  21. .tlv_type = 0x02,
  22. .offset = offsetof(struct
  23. cnss_plat_ipc_qmi_init_setup_req_msg_v01,
  24. qdss_hw_trace_override),
  25. },
  26. {
  27. .data_type = QMI_UNSIGNED_4_BYTE,
  28. .elem_len = 1,
  29. .elem_size = sizeof(u32),
  30. .array_type = NO_ARRAY,
  31. .tlv_type = 0x03,
  32. .offset = offsetof(struct
  33. cnss_plat_ipc_qmi_init_setup_req_msg_v01,
  34. cal_file_available_bitmask),
  35. },
  36. {
  37. .data_type = QMI_EOTI,
  38. .array_type = NO_ARRAY,
  39. .tlv_type = QMI_COMMON_TLV_TYPE,
  40. },
  41. };
  42. EXPORT_SYMBOL(cnss_plat_ipc_qmi_init_setup_req_msg_v01_ei);
  43. struct qmi_elem_info cnss_plat_ipc_qmi_init_setup_resp_msg_v01_ei[] = {
  44. {
  45. .data_type = QMI_STRUCT,
  46. .elem_len = 1,
  47. .elem_size = sizeof(struct qmi_response_type_v01),
  48. .array_type = NO_ARRAY,
  49. .tlv_type = 0x02,
  50. .offset = offsetof(struct
  51. cnss_plat_ipc_qmi_init_setup_resp_msg_v01,
  52. resp),
  53. .ei_array = qmi_response_type_v01_ei,
  54. },
  55. {
  56. .data_type = QMI_UNSIGNED_8_BYTE,
  57. .elem_len = 1,
  58. .elem_size = sizeof(u64),
  59. .array_type = NO_ARRAY,
  60. .tlv_type = 0x03,
  61. .offset = offsetof(struct
  62. cnss_plat_ipc_qmi_init_setup_resp_msg_v01,
  63. drv_status),
  64. },
  65. {
  66. .data_type = QMI_EOTI,
  67. .array_type = NO_ARRAY,
  68. .tlv_type = QMI_COMMON_TLV_TYPE,
  69. },
  70. };
  71. EXPORT_SYMBOL(cnss_plat_ipc_qmi_init_setup_resp_msg_v01_ei);
  72. struct qmi_elem_info cnss_plat_ipc_qmi_file_download_ind_msg_v01_ei[] = {
  73. {
  74. .data_type = QMI_STRING,
  75. .elem_len = CNSS_PLAT_IPC_QMI_MAX_FILE_NAME_LEN_V01 + 1,
  76. .elem_size = sizeof(char),
  77. .array_type = NO_ARRAY,
  78. .tlv_type = 0x01,
  79. .offset = offsetof(struct
  80. cnss_plat_ipc_qmi_file_download_ind_msg_v01,
  81. file_name),
  82. },
  83. {
  84. .data_type = QMI_UNSIGNED_4_BYTE,
  85. .elem_len = 1,
  86. .elem_size = sizeof(u32),
  87. .array_type = NO_ARRAY,
  88. .tlv_type = 0x02,
  89. .offset = offsetof(struct
  90. cnss_plat_ipc_qmi_file_download_ind_msg_v01,
  91. file_id),
  92. },
  93. {
  94. .data_type = QMI_EOTI,
  95. .array_type = NO_ARRAY,
  96. .tlv_type = QMI_COMMON_TLV_TYPE,
  97. },
  98. };
  99. EXPORT_SYMBOL(cnss_plat_ipc_qmi_file_download_ind_msg_v01_ei);
  100. struct qmi_elem_info cnss_plat_ipc_qmi_file_download_req_msg_v01_ei[] = {
  101. {
  102. .data_type = QMI_UNSIGNED_4_BYTE,
  103. .elem_len = 1,
  104. .elem_size = sizeof(u32),
  105. .array_type = NO_ARRAY,
  106. .tlv_type = 0x01,
  107. .offset = offsetof(struct
  108. cnss_plat_ipc_qmi_file_download_req_msg_v01,
  109. file_id),
  110. },
  111. {
  112. .data_type = QMI_UNSIGNED_4_BYTE,
  113. .elem_len = 1,
  114. .elem_size = sizeof(u32),
  115. .array_type = NO_ARRAY,
  116. .tlv_type = 0x02,
  117. .offset = offsetof(struct
  118. cnss_plat_ipc_qmi_file_download_req_msg_v01,
  119. file_size),
  120. },
  121. {
  122. .data_type = QMI_UNSIGNED_1_BYTE,
  123. .elem_len = 1,
  124. .elem_size = sizeof(u8),
  125. .array_type = NO_ARRAY,
  126. .tlv_type = 0x03,
  127. .offset = offsetof(struct
  128. cnss_plat_ipc_qmi_file_download_req_msg_v01,
  129. end),
  130. },
  131. {
  132. .data_type = QMI_UNSIGNED_4_BYTE,
  133. .elem_len = 1,
  134. .elem_size = sizeof(u32),
  135. .array_type = NO_ARRAY,
  136. .tlv_type = 0x04,
  137. .offset = offsetof(struct
  138. cnss_plat_ipc_qmi_file_download_req_msg_v01,
  139. seg_index),
  140. },
  141. {
  142. .data_type = QMI_DATA_LEN,
  143. .elem_len = 1,
  144. .elem_size = sizeof(u16),
  145. .array_type = NO_ARRAY,
  146. .tlv_type = 0x05,
  147. .offset = offsetof(struct
  148. cnss_plat_ipc_qmi_file_download_req_msg_v01,
  149. seg_buf_len),
  150. },
  151. {
  152. .data_type = QMI_UNSIGNED_1_BYTE,
  153. .elem_len = CNSS_PLAT_IPC_QMI_MAX_DATA_SIZE_V01,
  154. .elem_size = sizeof(u8),
  155. .array_type = VAR_LEN_ARRAY,
  156. .tlv_type = 0x05,
  157. .offset = offsetof(struct
  158. cnss_plat_ipc_qmi_file_download_req_msg_v01,
  159. seg_buf),
  160. },
  161. {
  162. .data_type = QMI_EOTI,
  163. .array_type = NO_ARRAY,
  164. .tlv_type = QMI_COMMON_TLV_TYPE,
  165. },
  166. };
  167. EXPORT_SYMBOL(cnss_plat_ipc_qmi_file_download_req_msg_v01_ei);
  168. struct qmi_elem_info cnss_plat_ipc_qmi_file_download_resp_msg_v01_ei[] = {
  169. {
  170. .data_type = QMI_STRUCT,
  171. .elem_len = 1,
  172. .elem_size = sizeof(struct qmi_response_type_v01),
  173. .array_type = NO_ARRAY,
  174. .tlv_type = 0x02,
  175. .offset = offsetof(struct
  176. cnss_plat_ipc_qmi_file_download_resp_msg_v01,
  177. resp),
  178. .ei_array = qmi_response_type_v01_ei,
  179. },
  180. {
  181. .data_type = QMI_UNSIGNED_4_BYTE,
  182. .elem_len = 1,
  183. .elem_size = sizeof(u32),
  184. .array_type = NO_ARRAY,
  185. .tlv_type = 0x03,
  186. .offset = offsetof(struct
  187. cnss_plat_ipc_qmi_file_download_resp_msg_v01,
  188. file_id),
  189. },
  190. {
  191. .data_type = QMI_UNSIGNED_4_BYTE,
  192. .elem_len = 1,
  193. .elem_size = sizeof(u32),
  194. .array_type = NO_ARRAY,
  195. .tlv_type = 0x04,
  196. .offset = offsetof(struct
  197. cnss_plat_ipc_qmi_file_download_resp_msg_v01,
  198. seg_index),
  199. },
  200. {
  201. .data_type = QMI_EOTI,
  202. .array_type = NO_ARRAY,
  203. .tlv_type = QMI_COMMON_TLV_TYPE,
  204. },
  205. };
  206. EXPORT_SYMBOL(cnss_plat_ipc_qmi_file_download_resp_msg_v01_ei);
  207. struct qmi_elem_info cnss_plat_ipc_qmi_file_upload_ind_msg_v01_ei[] = {
  208. {
  209. .data_type = QMI_STRING,
  210. .elem_len = CNSS_PLAT_IPC_QMI_MAX_FILE_NAME_LEN_V01 + 1,
  211. .elem_size = sizeof(char),
  212. .array_type = NO_ARRAY,
  213. .tlv_type = 0x01,
  214. .offset = offsetof(struct
  215. cnss_plat_ipc_qmi_file_upload_ind_msg_v01,
  216. file_name),
  217. },
  218. {
  219. .data_type = QMI_UNSIGNED_4_BYTE,
  220. .elem_len = 1,
  221. .elem_size = sizeof(u32),
  222. .array_type = NO_ARRAY,
  223. .tlv_type = 0x02,
  224. .offset = offsetof(struct
  225. cnss_plat_ipc_qmi_file_upload_ind_msg_v01,
  226. file_id),
  227. },
  228. {
  229. .data_type = QMI_UNSIGNED_4_BYTE,
  230. .elem_len = 1,
  231. .elem_size = sizeof(u32),
  232. .array_type = NO_ARRAY,
  233. .tlv_type = 0x03,
  234. .offset = offsetof(struct
  235. cnss_plat_ipc_qmi_file_upload_ind_msg_v01,
  236. file_size),
  237. },
  238. {
  239. .data_type = QMI_EOTI,
  240. .array_type = NO_ARRAY,
  241. .tlv_type = QMI_COMMON_TLV_TYPE,
  242. },
  243. };
  244. EXPORT_SYMBOL(cnss_plat_ipc_qmi_file_upload_ind_msg_v01_ei);
  245. struct qmi_elem_info cnss_plat_ipc_qmi_file_upload_req_msg_v01_ei[] = {
  246. {
  247. .data_type = QMI_UNSIGNED_4_BYTE,
  248. .elem_len = 1,
  249. .elem_size = sizeof(u32),
  250. .array_type = NO_ARRAY,
  251. .tlv_type = 0x01,
  252. .offset = offsetof(struct
  253. cnss_plat_ipc_qmi_file_upload_req_msg_v01,
  254. file_id),
  255. },
  256. {
  257. .data_type = QMI_UNSIGNED_4_BYTE,
  258. .elem_len = 1,
  259. .elem_size = sizeof(u32),
  260. .array_type = NO_ARRAY,
  261. .tlv_type = 0x02,
  262. .offset = offsetof(struct
  263. cnss_plat_ipc_qmi_file_upload_req_msg_v01,
  264. seg_index),
  265. },
  266. {
  267. .data_type = QMI_EOTI,
  268. .array_type = NO_ARRAY,
  269. .tlv_type = QMI_COMMON_TLV_TYPE,
  270. },
  271. };
  272. EXPORT_SYMBOL(cnss_plat_ipc_qmi_file_upload_req_msg_v01_ei);
  273. struct qmi_elem_info cnss_plat_ipc_qmi_file_upload_resp_msg_v01_ei[] = {
  274. {
  275. .data_type = QMI_STRUCT,
  276. .elem_len = 1,
  277. .elem_size = sizeof(struct qmi_response_type_v01),
  278. .array_type = NO_ARRAY,
  279. .tlv_type = 0x02,
  280. .offset = offsetof(struct
  281. cnss_plat_ipc_qmi_file_upload_resp_msg_v01,
  282. resp),
  283. .ei_array = qmi_response_type_v01_ei,
  284. },
  285. {
  286. .data_type = QMI_UNSIGNED_4_BYTE,
  287. .elem_len = 1,
  288. .elem_size = sizeof(u32),
  289. .array_type = NO_ARRAY,
  290. .tlv_type = 0x03,
  291. .offset = offsetof(struct
  292. cnss_plat_ipc_qmi_file_upload_resp_msg_v01,
  293. file_id),
  294. },
  295. {
  296. .data_type = QMI_UNSIGNED_1_BYTE,
  297. .elem_len = 1,
  298. .elem_size = sizeof(u8),
  299. .array_type = NO_ARRAY,
  300. .tlv_type = 0x04,
  301. .offset = offsetof(struct
  302. cnss_plat_ipc_qmi_file_upload_resp_msg_v01,
  303. end),
  304. },
  305. {
  306. .data_type = QMI_UNSIGNED_4_BYTE,
  307. .elem_len = 1,
  308. .elem_size = sizeof(u32),
  309. .array_type = NO_ARRAY,
  310. .tlv_type = 0x05,
  311. .offset = offsetof(struct
  312. cnss_plat_ipc_qmi_file_upload_resp_msg_v01,
  313. seg_index),
  314. },
  315. {
  316. .data_type = QMI_DATA_LEN,
  317. .elem_len = 1,
  318. .elem_size = sizeof(u16),
  319. .array_type = NO_ARRAY,
  320. .tlv_type = 0x06,
  321. .offset = offsetof(struct
  322. cnss_plat_ipc_qmi_file_upload_resp_msg_v01,
  323. seg_buf_len),
  324. },
  325. {
  326. .data_type = QMI_UNSIGNED_1_BYTE,
  327. .elem_len = CNSS_PLAT_IPC_QMI_MAX_DATA_SIZE_V01,
  328. .elem_size = sizeof(u8),
  329. .array_type = VAR_LEN_ARRAY,
  330. .tlv_type = 0x06,
  331. .offset = offsetof(struct
  332. cnss_plat_ipc_qmi_file_upload_resp_msg_v01,
  333. seg_buf),
  334. },
  335. {
  336. .data_type = QMI_EOTI,
  337. .array_type = NO_ARRAY,
  338. .tlv_type = QMI_COMMON_TLV_TYPE,
  339. },
  340. };
  341. EXPORT_SYMBOL(cnss_plat_ipc_qmi_file_upload_resp_msg_v01_ei);
  342. struct qmi_elem_info cnss_plat_ipc_qmi_reg_client_req_msg_v01_ei[] = {
  343. {
  344. .data_type = QMI_OPT_FLAG,
  345. .elem_len = 1,
  346. .elem_size = sizeof(u8),
  347. .array_type = NO_ARRAY,
  348. .tlv_type = 0x10,
  349. .offset = offsetof(struct
  350. cnss_plat_ipc_qmi_reg_client_req_msg_v01,
  351. client_id_valid),
  352. },
  353. {
  354. .data_type = QMI_SIGNED_4_BYTE_ENUM,
  355. .elem_len = 1,
  356. .elem_size = sizeof(enum cnss_plat_ipc_qmi_client_id_v01),
  357. .array_type = NO_ARRAY,
  358. .tlv_type = 0x10,
  359. .offset = offsetof(struct
  360. cnss_plat_ipc_qmi_reg_client_req_msg_v01,
  361. client_id),
  362. },
  363. {
  364. .data_type = QMI_EOTI,
  365. .array_type = NO_ARRAY,
  366. .tlv_type = QMI_COMMON_TLV_TYPE,
  367. },
  368. };
  369. EXPORT_SYMBOL(cnss_plat_ipc_qmi_reg_client_req_msg_v01_ei);
  370. struct qmi_elem_info cnss_plat_ipc_qmi_reg_client_resp_msg_v01_ei[] = {
  371. {
  372. .data_type = QMI_STRUCT,
  373. .elem_len = 1,
  374. .elem_size = sizeof(struct qmi_response_type_v01),
  375. .array_type = NO_ARRAY,
  376. .tlv_type = 0x02,
  377. .offset = offsetof(struct
  378. cnss_plat_ipc_qmi_reg_client_resp_msg_v01,
  379. resp),
  380. .ei_array = qmi_response_type_v01_ei,
  381. },
  382. {
  383. .data_type = QMI_EOTI,
  384. .array_type = NO_ARRAY,
  385. .tlv_type = QMI_COMMON_TLV_TYPE,
  386. },
  387. };
  388. EXPORT_SYMBOL(cnss_plat_ipc_qmi_reg_client_resp_msg_v01_ei);
  389. MODULE_LICENSE("GPL v2");
  390. MODULE_DESCRIPTION("WLAN FW QMI service");