aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/wusb-wa.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usb/wusb-wa.h')
-rw-r--r--include/linux/usb/wusb-wa.h51
1 files changed, 36 insertions, 15 deletions
diff --git a/include/linux/usb/wusb-wa.h b/include/linux/usb/wusb-wa.h
index 4ff744e2b678..c1257130769b 100644
--- a/include/linux/usb/wusb-wa.h
+++ b/include/linux/usb/wusb-wa.h
@@ -142,7 +142,7 @@ enum wa_notif_type {
142struct wa_notif_hdr { 142struct wa_notif_hdr {
143 u8 bLength; 143 u8 bLength;
144 u8 bNotifyType; /* enum wa_notif_type */ 144 u8 bNotifyType; /* enum wa_notif_type */
145} __attribute__((packed)); 145} __packed;
146 146
147/** 147/**
148 * HWA DN Received notification [(WUSB] section 8.5.4.2) 148 * HWA DN Received notification [(WUSB] section 8.5.4.2)
@@ -158,7 +158,7 @@ struct hwa_notif_dn {
158 u8 bSourceDeviceAddr; /* from errata 2005/07 */ 158 u8 bSourceDeviceAddr; /* from errata 2005/07 */
159 u8 bmAttributes; 159 u8 bmAttributes;
160 struct wusb_dn_hdr dndata[]; 160 struct wusb_dn_hdr dndata[];
161} __attribute__((packed)); 161} __packed;
162 162
163/* [WUSB] section 8.3.3 */ 163/* [WUSB] section 8.3.3 */
164enum wa_xfer_type { 164enum wa_xfer_type {
@@ -167,6 +167,8 @@ enum wa_xfer_type {
167 WA_XFER_TYPE_ISO = 0x82, 167 WA_XFER_TYPE_ISO = 0x82,
168 WA_XFER_RESULT = 0x83, 168 WA_XFER_RESULT = 0x83,
169 WA_XFER_ABORT = 0x84, 169 WA_XFER_ABORT = 0x84,
170 WA_XFER_ISO_PACKET_INFO = 0xA0,
171 WA_XFER_ISO_PACKET_STATUS = 0xA1,
170}; 172};
171 173
172/* [WUSB] section 8.3.3 */ 174/* [WUSB] section 8.3.3 */
@@ -177,28 +179,47 @@ struct wa_xfer_hdr {
177 __le32 dwTransferID; /* Host-assigned ID */ 179 __le32 dwTransferID; /* Host-assigned ID */
178 __le32 dwTransferLength; /* Length of data to xfer */ 180 __le32 dwTransferLength; /* Length of data to xfer */
179 u8 bTransferSegment; 181 u8 bTransferSegment;
180} __attribute__((packed)); 182} __packed;
181 183
182struct wa_xfer_ctl { 184struct wa_xfer_ctl {
183 struct wa_xfer_hdr hdr; 185 struct wa_xfer_hdr hdr;
184 u8 bmAttribute; 186 u8 bmAttribute;
185 __le16 wReserved; 187 __le16 wReserved;
186 struct usb_ctrlrequest baSetupData; 188 struct usb_ctrlrequest baSetupData;
187} __attribute__((packed)); 189} __packed;
188 190
189struct wa_xfer_bi { 191struct wa_xfer_bi {
190 struct wa_xfer_hdr hdr; 192 struct wa_xfer_hdr hdr;
191 u8 bReserved; 193 u8 bReserved;
192 __le16 wReserved; 194 __le16 wReserved;
193} __attribute__((packed)); 195} __packed;
194 196
197/* [WUSB] section 8.5.5 */
195struct wa_xfer_hwaiso { 198struct wa_xfer_hwaiso {
196 struct wa_xfer_hdr hdr; 199 struct wa_xfer_hdr hdr;
197 u8 bReserved; 200 u8 bReserved;
198 __le16 wPresentationTime; 201 __le16 wPresentationTime;
199 __le32 dwNumOfPackets; 202 __le32 dwNumOfPackets;
200 /* FIXME: u8 pktdata[]? */ 203} __packed;
201} __attribute__((packed)); 204
205struct wa_xfer_packet_info_hwaiso {
206 __le16 wLength;
207 u8 bPacketType;
208 u8 bReserved;
209 __le16 PacketLength[0];
210} __packed;
211
212struct wa_xfer_packet_status_len_hwaiso {
213 __le16 PacketLength;
214 __le16 PacketStatus;
215} __packed;
216
217struct wa_xfer_packet_status_hwaiso {
218 __le16 wLength;
219 u8 bPacketType;
220 u8 bReserved;
221 struct wa_xfer_packet_status_len_hwaiso PacketStatus[0];
222} __packed;
202 223
203/* [WUSB] section 8.3.3.5 */ 224/* [WUSB] section 8.3.3.5 */
204struct wa_xfer_abort { 225struct wa_xfer_abort {
@@ -206,7 +227,7 @@ struct wa_xfer_abort {
206 u8 bRequestType; 227 u8 bRequestType;
207 __le16 wRPipe; /* RPipe index */ 228 __le16 wRPipe; /* RPipe index */
208 __le32 dwTransferID; /* Host-assigned ID */ 229 __le32 dwTransferID; /* Host-assigned ID */
209} __attribute__((packed)); 230} __packed;
210 231
211/** 232/**
212 * WA Transfer Complete notification ([WUSB] section 8.3.3.3) 233 * WA Transfer Complete notification ([WUSB] section 8.3.3.3)
@@ -216,7 +237,7 @@ struct wa_notif_xfer {
216 struct wa_notif_hdr hdr; 237 struct wa_notif_hdr hdr;
217 u8 bEndpoint; 238 u8 bEndpoint;
218 u8 Reserved; 239 u8 Reserved;
219} __attribute__((packed)); 240} __packed;
220 241
221/** Transfer result basic codes [WUSB] table 8-15 */ 242/** Transfer result basic codes [WUSB] table 8-15 */
222enum { 243enum {
@@ -243,7 +264,7 @@ struct wa_xfer_result {
243 u8 bTransferSegment; 264 u8 bTransferSegment;
244 u8 bTransferStatus; 265 u8 bTransferStatus;
245 __le32 dwNumOfPackets; 266 __le32 dwNumOfPackets;
246} __attribute__((packed)); 267} __packed;
247 268
248/** 269/**
249 * Wire Adapter Class Descriptor ([WUSB] section 8.5.2.7). 270 * Wire Adapter Class Descriptor ([WUSB] section 8.5.2.7).
@@ -258,16 +279,16 @@ struct wa_xfer_result {
258struct usb_wa_descriptor { 279struct usb_wa_descriptor {
259 u8 bLength; 280 u8 bLength;
260 u8 bDescriptorType; 281 u8 bDescriptorType;
261 u16 bcdWAVersion; 282 __le16 bcdWAVersion;
262 u8 bNumPorts; /* don't use!! */ 283 u8 bNumPorts; /* don't use!! */
263 u8 bmAttributes; /* Reserved == 0 */ 284 u8 bmAttributes; /* Reserved == 0 */
264 u16 wNumRPipes; 285 __le16 wNumRPipes;
265 u16 wRPipeMaxBlock; 286 __le16 wRPipeMaxBlock;
266 u8 bRPipeBlockSize; 287 u8 bRPipeBlockSize;
267 u8 bPwrOn2PwrGood; 288 u8 bPwrOn2PwrGood;
268 u8 bNumMMCIEs; 289 u8 bNumMMCIEs;
269 u8 DeviceRemovable; /* FIXME: in DWA this is up to 16 bytes */ 290 u8 DeviceRemovable; /* FIXME: in DWA this is up to 16 bytes */
270} __attribute__((packed)); 291} __packed;
271 292
272/** 293/**
273 * HWA Device Information Buffer (WUSB1.0[T8.54]) 294 * HWA Device Information Buffer (WUSB1.0[T8.54])
@@ -277,6 +298,6 @@ struct hwa_dev_info {
277 u8 bDeviceAddress; 298 u8 bDeviceAddress;
278 __le16 wPHYRates; 299 __le16 wPHYRates;
279 u8 bmDeviceAttribute; 300 u8 bmDeviceAttribute;
280} __attribute__((packed)); 301} __packed;
281 302
282#endif /* #ifndef __LINUX_USB_WUSB_WA_H */ 303#endif /* #ifndef __LINUX_USB_WUSB_WA_H */