2 #ifndef __LINUX_USB_WUSB_WA_H
3 #define __LINUX_USB_WUSB_WA_H
6 * Radio Command Request for the Radio Control Interface
8 * Radio Control Interface command and event codes are the same as
9 * WHCI, and listed in include/linux/uwb.h:UWB_RC_{CMD,EVT}_*
12 WA_EXEC_RC_CMD
= 40, /* Radio Control command Request */
15 /* Wireless Adapter Requests ([WUSB] table 8-51) */
17 WUSB_REQ_ADD_MMC_IE
= 20,
18 WUSB_REQ_REMOVE_MMC_IE
= 21,
19 WUSB_REQ_SET_NUM_DNTS
= 22,
20 WUSB_REQ_SET_CLUSTER_ID
= 23,
21 WUSB_REQ_SET_DEV_INFO
= 24,
22 WUSB_REQ_GET_TIME
= 25,
23 WUSB_REQ_SET_STREAM_IDX
= 26,
24 WUSB_REQ_SET_WUSB_MAS
= 27,
25 WUSB_REQ_CHAN_STOP
= 28,
29 /* Wireless Adapter WUSB Channel Time types ([WUSB] table 8-52) */
42 /* Responses from Get Status request ([WUSB] section 8.3.1.6) */
44 WA_STATUS_ENABLED
= 0x01,
45 WA_STATUS_RESETTING
= 0x02
51 RPIPE_CRS_BULK
= 0x04,
55 struct usb_rpipe_descriptor
{
60 __le16 wBlocks
; /* rw if 0 */
61 __le16 wMaxPacketSize
; /* rw? */
62 u8 bHSHubAddress
; /* reserved: 0 */
64 u8 bSpeed
; /* rw: xfer rate 'enum uwb_phy_rate' */
65 u8 bDeviceAddress
; /* rw: Target device address */
66 u8 bEndpointAddress
; /* rw: Target EP address */
67 u8 bDataSequence
; /* ro: Current Data sequence */
68 __le32 dwCurrentWindow
; /* ro */
69 u8 bMaxDataSequence
; /* ro?: max supported seq */
70 u8 bInterval
; /* rw: */
71 u8 bOverTheAirInterval
; /* rw: */
72 u8 bmAttribute
; /* ro? */
73 u8 bmCharacteristics
; /* ro? enum rpipe_attr, supported xsactions */
74 u8 bmRetryOptions
; /* rw? */
75 __le16 wNumTransactionErrors
; /* rw */
76 } __attribute__ ((packed
));
79 * Wire Adapter Notification types ([WUSB] sections 8.4.5 & 8.5.4)
81 * These are the notifications coming on the notification endpoint of
85 DWA_NOTIF_RWAKE
= 0x91,
86 DWA_NOTIF_PORTSTATUS
= 0x92,
87 WA_NOTIF_TRANSFER
= 0x93,
88 HWA_NOTIF_BPST_ADJ
= 0x94,
93 * Wire Adapter notification header
95 * Notifications coming from a wire adapter use a common header
96 * defined in [WUSB] sections 8.4.5 & 8.5.4.
100 u8 bNotifyType
; /* enum wa_notif_type */
101 } __attribute__((packed
));
104 * HWA DN Received notification [(WUSB] section 8.5.4.2)
106 * The DNData is specified in WUSB1.0[7.6]. For each device
107 * notification we received, we just need to dispatch it.
109 * @dndata: this is really an array of notifications, but all start
110 * with the same header.
112 struct hwa_notif_dn
{
113 struct wa_notif_hdr hdr
;
114 u8 bSourceDeviceAddr
; /* from errata 2005/07 */
116 struct wusb_dn_hdr dndata
[];
117 } __attribute__((packed
));
119 /* [WUSB] section 8.3.3 */
121 WA_XFER_TYPE_CTL
= 0x80,
122 WA_XFER_TYPE_BI
= 0x81, /* bulk/interrupt */
123 WA_XFER_TYPE_ISO
= 0x82,
124 WA_XFER_RESULT
= 0x83,
125 WA_XFER_ABORT
= 0x84,
128 /* [WUSB] section 8.3.3 */
130 u8 bLength
; /* 0x18 */
131 u8 bRequestType
; /* 0x80 WA_REQUEST_TYPE_CTL */
132 __le16 wRPipe
; /* RPipe index */
133 __le32 dwTransferID
; /* Host-assigned ID */
134 __le32 dwTransferLength
; /* Length of data to xfer */
136 } __attribute__((packed
));
139 struct wa_xfer_hdr hdr
;
142 struct usb_ctrlrequest baSetupData
;
143 } __attribute__((packed
));
146 struct wa_xfer_hdr hdr
;
149 } __attribute__((packed
));
151 struct wa_xfer_hwaiso
{
152 struct wa_xfer_hdr hdr
;
154 __le16 wPresentationTime
;
155 __le32 dwNumOfPackets
;
156 } __attribute__((packed
));
158 /* [WUSB] section 8.3.3.5 */
159 struct wa_xfer_abort
{
162 __le16 wRPipe
; /* RPipe index */
163 __le32 dwTransferID
; /* Host-assigned ID */
164 } __attribute__((packed
));
167 * WA Transfer Complete notification ([WUSB] section 8.3.3.3)
170 struct wa_notif_xfer
{
171 struct wa_notif_hdr hdr
;
174 } __attribute__((packed
));
176 /** Transfer result basic codes [WUSB] table 8-15 */
178 WA_XFER_STATUS_SUCCESS
,
179 WA_XFER_STATUS_HALTED
,
180 WA_XFER_STATUS_DATA_BUFFER_ERROR
,
181 WA_XFER_STATUS_BABBLE
,
183 WA_XFER_STATUS_NOT_FOUND
,
184 WA_XFER_STATUS_INSUFFICIENT_RESOURCE
,
185 WA_XFER_STATUS_TRANSACTION_ERROR
,
186 WA_XFER_STATUS_ABORTED
,
187 WA_XFER_STATUS_RPIPE_NOT_READY
,
188 WA_XFER_INVALID_FORMAT
,
189 WA_XFER_UNEXPECTED_SEGMENT_NUMBER
,
190 WA_XFER_STATUS_RPIPE_TYPE_MISMATCH
,
193 /** [WUSB] section 8.3.3.4 */
194 struct wa_xfer_result
{
195 struct wa_notif_hdr hdr
;
197 __le32 dwTransferLength
;
200 __le32 dwNumOfPackets
;
201 } __attribute__((packed
));
204 * Wire Adapter Class Descriptor ([WUSB] section 8.5.2.7).
206 * NOTE: u16 fields are read Little Endian from the hardware.
208 * @bNumPorts is the original max number of devices that the host can
209 * connect; we might chop this so the stack can handle
210 * it. In case you need to access it, use wusbhc->ports_max
211 * if it is a Wireless USB WA.
213 struct usb_wa_descriptor
{
217 u8 bNumPorts
; /* don't use!! */
218 u8 bmAttributes
; /* Reserved == 0 */
225 } __attribute__((packed
));
228 * HWA Device Information Buffer (WUSB1.0[T8.54])
230 struct hwa_dev_info
{
231 u8 bmDeviceAvailability
[32];
234 u8 bmDeviceAttribute
;
235 } __attribute__((packed
));
237 #endif /* #ifndef __LINUX_USB_WUSB_WA_H */