Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
wusb-wa.h
Go to the documentation of this file.
1 /*
2  * Wireless USB Wire Adapter constants and structures.
3  *
4  * Copyright (C) 2005-2006 Intel Corporation.
5  * Inaky Perez-Gonzalez <[email protected]>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License version
9  * 2 as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301, USA.
20  *
21  *
22  * FIXME: docs
23  * FIXME: organize properly, group logically
24  *
25  * All the event structures are defined in uwb/spec.h, as they are
26  * common to the WHCI and WUSB radio control interfaces.
27  *
28  * References:
29  * [WUSB] Wireless Universal Serial Bus Specification, revision 1.0, ch8
30  */
31 #ifndef __LINUX_USB_WUSB_WA_H
32 #define __LINUX_USB_WUSB_WA_H
33 
40 enum {
41  WA_EXEC_RC_CMD = 40, /* Radio Control command Request */
42 };
43 
44 /* Wireless Adapter Requests ([WUSB] table 8-51) */
45 enum {
55 };
56 
57 
58 /* Wireless Adapter WUSB Channel Time types ([WUSB] table 8-52) */
59 enum {
63 };
64 
65 enum {
66  WA_ENABLE = 0x01,
67  WA_RESET = 0x02,
68  RPIPE_PAUSE = 0x1,
69 };
70 
71 /* Responses from Get Status request ([WUSB] section 8.3.1.6) */
72 enum {
75 };
76 
77 enum rpipe_crs {
78  RPIPE_CRS_CTL = 0x01,
79  RPIPE_CRS_ISO = 0x02,
82 };
83 
94  __le16 wBlocks; /* rw if 0 */
96  u8 bHSHubAddress; /* reserved: 0 */
97  u8 bHSHubPort; /* ??? FIXME ??? */
98  u8 bSpeed; /* rw: xfer rate 'enum uwb_phy_rate' */
99  u8 bDeviceAddress; /* rw: Target device address */
100  u8 bEndpointAddress; /* rw: Target EP address */
101  u8 bDataSequence; /* ro: Current Data sequence */
103  u8 bMaxDataSequence; /* ro?: max supported seq */
104  u8 bInterval; /* rw: */
106  u8 bmAttribute; /* ro? */
107  u8 bmCharacteristics; /* ro? enum rpipe_attr, supported xsactions */
108  u8 bmRetryOptions; /* rw? */
110 } __attribute__ ((packed));
123  HWA_NOTIF_DN = 0x95,
124 };
132 struct wa_notif_hdr {
134  u8 bNotifyType; /* enum wa_notif_type */
135 } __attribute__((packed));
136 
146 struct hwa_notif_dn {
148  u8 bSourceDeviceAddr; /* from errata 2005/07 */
150  struct wusb_dn_hdr dndata[];
151 } __attribute__((packed));
153 /* [WUSB] section 8.3.3 */
156  WA_XFER_TYPE_BI = 0x81, /* bulk/interrupt */
160 };
161 
162 /* [WUSB] section 8.3.3 */
163 struct wa_xfer_hdr {
164  u8 bLength; /* 0x18 */
165  u8 bRequestType; /* 0x80 WA_REQUEST_TYPE_CTL */
166  __le16 wRPipe; /* RPipe index */
167  __le32 dwTransferID; /* Host-assigned ID */
168  __le32 dwTransferLength; /* Length of data to xfer */
170 } __attribute__((packed));
171 
172 struct wa_xfer_ctl {
173  struct wa_xfer_hdr hdr;
177 } __attribute__((packed));
178 
179 struct wa_xfer_bi {
180  struct wa_xfer_hdr hdr;
183 } __attribute__((packed));
184 
186  struct wa_xfer_hdr hdr;
190  /* FIXME: u8 pktdata[]? */
191 } __attribute__((packed));
192 
193 /* [WUSB] section 8.3.3.5 */
197  __le16 wRPipe; /* RPipe index */
198  __le32 dwTransferID; /* Host-assigned ID */
199 } __attribute__((packed));
200 
209 } __attribute__((packed));
210 
212 enum {
226 };
227 
236 } __attribute__((packed));
237 
252  u8 bNumPorts; /* don't use!! */
253  u8 bmAttributes; /* Reserved == 0 */
259  u8 DeviceRemovable; /* FIXME: in DWA this is up to 16 bytes */
260 } __attribute__((packed));
261 
265 struct hwa_dev_info {
266  u8 bmDeviceAvailability[32]; /* FIXME: ignored for now */
270 } __attribute__((packed));
272 #endif /* #ifndef __LINUX_USB_WUSB_WA_H */