diff options
| author | Thomas Pugliese <thomas.pugliese@gmail.com> | 2013-10-01 15:04:35 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-03 18:46:26 -0400 |
| commit | 4ae1a5bd3fabd7f7f3575309c7a0d676fecf6303 (patch) | |
| tree | 58c37e3ac592f7846ffbeebdaf7e477ed9c57e4b /include/linux/usb | |
| parent | 1a7ff0e3673807ff6f38e7ae7b79e46a986fc578 (diff) | |
usb: wusbcore: Add isoc transfer type enum and packet definitions
This patch adds transfer type enum and packet definitions for
WA_XFER_ISO_PACKET_INFO and WA_XFER_ISO_PACKET_STATUS packets.
It also changes instances of __attribute__((packed)) to __packed to make
checkpatch.pl happy.
Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb')
| -rw-r--r-- | include/linux/usb/wusb-wa.h | 45 |
1 files changed, 33 insertions, 12 deletions
diff --git a/include/linux/usb/wusb-wa.h b/include/linux/usb/wusb-wa.h index 4ff744e2b678..9ae7e299bf77 100644 --- a/include/linux/usb/wusb-wa.h +++ b/include/linux/usb/wusb-wa.h | |||
| @@ -142,7 +142,7 @@ enum wa_notif_type { | |||
| 142 | struct wa_notif_hdr { | 142 | struct 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 */ |
| 164 | enum wa_xfer_type { | 164 | enum 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 | ||
| 182 | struct wa_xfer_ctl { | 184 | struct 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 | ||
| 189 | struct wa_xfer_bi { | 191 | struct 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 */ | ||
| 195 | struct wa_xfer_hwaiso { | 198 | struct 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 | |
| 205 | struct wa_xfer_packet_info_hwaiso { | ||
| 206 | __le16 wLength; | ||
| 207 | u8 bPacketType; | ||
| 208 | u8 bReserved; | ||
| 209 | __le16 PacketLength[0]; | ||
| 210 | } __packed; | ||
| 211 | |||
| 212 | struct wa_xfer_packet_status_len_hwaiso { | ||
| 213 | __le16 PacketLength; | ||
| 214 | __le16 PacketStatus; | ||
| 215 | } __packed; | ||
| 216 | |||
| 217 | struct 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 */ |
| 204 | struct wa_xfer_abort { | 225 | struct 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 */ |
| 222 | enum { | 243 | enum { |
| @@ -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). |
| @@ -267,7 +288,7 @@ struct usb_wa_descriptor { | |||
| 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 */ |
