xref: /wlan-driver/platform/cnss_utils/device_management_service_v01.c (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 // SPDX-License-Identifier: GPL-2.0-only
2 /* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. */
3 
4 #include <linux/soc/qcom/qmi.h>
5 
6 #include "device_management_service_v01.h"
7 
8 struct qmi_elem_info dms_get_mac_address_req_msg_v01_ei[] = {
9 	{
10 		.data_type      = QMI_SIGNED_4_BYTE_ENUM,
11 		.elem_len       = 1,
12 		.elem_size      = sizeof(enum dms_device_mac_enum_v01),
13 		.array_type       = NO_ARRAY,
14 		.tlv_type       = 0x01,
15 		.offset         = offsetof(struct
16 					   dms_get_mac_address_req_msg_v01,
17 					   device),
18 	},
19 	{
20 		.data_type      = QMI_EOTI,
21 		.array_type       = NO_ARRAY,
22 		.tlv_type       = QMI_COMMON_TLV_TYPE,
23 	},
24 };
25 EXPORT_SYMBOL(dms_get_mac_address_req_msg_v01_ei);
26 
27 struct qmi_elem_info dms_get_mac_address_resp_msg_v01_ei[] = {
28 	{
29 		.data_type      = QMI_STRUCT,
30 		.elem_len       = 1,
31 		.elem_size      = sizeof(struct qmi_response_type_v01),
32 		.array_type       = NO_ARRAY,
33 		.tlv_type       = 0x02,
34 		.offset         = offsetof(struct
35 					   dms_get_mac_address_resp_msg_v01,
36 					   resp),
37 		.ei_array      = qmi_response_type_v01_ei,
38 	},
39 	{
40 		.data_type      = QMI_OPT_FLAG,
41 		.elem_len       = 1,
42 		.elem_size      = sizeof(u8),
43 		.array_type       = NO_ARRAY,
44 		.tlv_type       = 0x10,
45 		.offset         = offsetof(struct
46 					   dms_get_mac_address_resp_msg_v01,
47 					   mac_address_valid),
48 	},
49 	{
50 		.data_type      = QMI_DATA_LEN,
51 		.elem_len       = 1,
52 		.elem_size      = sizeof(u8),
53 		.array_type       = NO_ARRAY,
54 		.tlv_type       = 0x10,
55 		.offset         = offsetof(struct
56 					   dms_get_mac_address_resp_msg_v01,
57 					   mac_address_len),
58 	},
59 	{
60 		.data_type      = QMI_UNSIGNED_1_BYTE,
61 		.elem_len       = QMI_DMS_MAC_ADDR_MAX_V01,
62 		.elem_size      = sizeof(u8),
63 		.array_type       = VAR_LEN_ARRAY,
64 		.tlv_type       = 0x10,
65 		.offset         = offsetof(struct
66 					   dms_get_mac_address_resp_msg_v01,
67 					   mac_address),
68 	},
69 	{
70 		.data_type      = QMI_EOTI,
71 		.array_type       = NO_ARRAY,
72 		.tlv_type       = QMI_COMMON_TLV_TYPE,
73 	},
74 };
75 EXPORT_SYMBOL(dms_get_mac_address_resp_msg_v01_ei);
76