History

mei: add connect with vtag ioctl

This IOCTL is used to associate the current file descriptor with a FW Client (given by UUID), and virtual tag (vtag). The IOCTL opens a communication channel between a host client and a FW client on a tagged channel. From this point on, every reader and write will communicate with the associated FW client on the tagged channel. Upon close() the communication is terminated. The IOCTL argument is a struct with a union that contains the input parameter and the output parameter for this IOCTL. The input parameter is UUID of the FW Client, a vtag [0,255] The output parameter is the properties of the FW client Clients that do not support tagged connection will respond with -EOPNOTSUPP

Alexander Usyskin committed 6 years ago

Commit aa207a01 parent 224ae602 files · +243 −16Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/mei.h+49−0
@@ -66,4 +66,53 @@ struct mei_connect_client_data { · 65 unmodified lines
66 */66 */
67#define IOCTL_MEI_NOTIFY_GET _IOR('H', 0x03, __u32)67#define IOCTL_MEI_NOTIFY_GET _IOR('H', 0x03, __u32)
68 68
69/**
70 * struct mei_connect_client_vtag - mei client information struct with vtag
71 *
72 * @in_client_uuid: UUID of client to connect
73 * @vtag: virtual tag
74 * @reserved: reserved for future use
75 */
76struct mei_connect_client_vtag {
77 uuid_le in_client_uuid;
78 __u8 vtag;
79 __u8 reserved[3];
80};
81
82/**
83 * struct mei_connect_client_data_vtag - IOCTL connect data union
84 *
85 * @connect: input connect data
86 * @out_client_properties: output client data
87 */
88struct mei_connect_client_data_vtag {
89 union {
90 struct mei_connect_client_vtag connect;
91 struct mei_client out_client_properties;
92 };
93};
94
95/**
96 * DOC:
97 * This IOCTL is used to associate the current file descriptor with a
98 * FW Client (given by UUID), and virtual tag (vtag).
99 * The IOCTL opens a communication channel between a host client and
100 * a FW client on a tagged channel. From this point on, every read
101 * and write will communicate with the associated FW client with
102 * on the tagged channel.
103 * Upone close() the communication is terminated.
104 *
105 * The IOCTL argument is a struct with a union that contains
106 * the input parameter and the output parameter for this IOCTL.
107 *
108 * The input parameter is UUID of the FW Client, a vtag [0,255]
109 * The output parameter is the properties of the FW client
110 * (FW protocool version and max message size).
111 *
112 * Clients that do not support tagged connection
113 * will respond with -EOPNOTSUPP.
114 */
115#define IOCTL_MEI_CONNECT_CLIENT_VTAG \
116 _IOWR('H', 0x04, struct mei_connect_client_data_vtag)
117
69#endif /* _LINUX_MEI_H */118#endif /* _LINUX_MEI_H */