diff options
| author | David Vrabel <dv02@dv02pc01.europe.root.pri> | 2008-10-10 06:47:31 -0400 |
|---|---|---|
| committer | David Vrabel <dv02@dv02pc01.europe.root.pri> | 2008-10-10 06:47:31 -0400 |
| commit | 99ee3a6d4577e7633c66304e4aefeca5489c8d5c (patch) | |
| tree | 94dbf1db8b2efb6b4fdaf6fdaa86de655c64ff1c /include | |
| parent | 3fa8749e584b55f1180411ab1b51117190bac1e5 (diff) | |
| parent | edfa042c880f62848aa55b3e71e538fe383929da (diff) | |
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb into for-upstream
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/bitmap.h | 1 | ||||
| -rw-r--r-- | include/linux/usb/wusb-wa.h | 271 | ||||
| -rw-r--r-- | include/linux/usb/wusb.h | 376 | ||||
| -rw-r--r-- | include/linux/uwb.h | 765 | ||||
| -rw-r--r-- | include/linux/uwb/debug-cmd.h | 57 | ||||
| -rw-r--r-- | include/linux/uwb/debug.h | 82 | ||||
| -rw-r--r-- | include/linux/uwb/spec.h | 727 | ||||
| -rw-r--r-- | include/linux/uwb/umc.h | 194 | ||||
| -rw-r--r-- | include/linux/uwb/whci.h | 117 | ||||
| -rw-r--r-- | include/linux/wlp.h | 735 |
10 files changed, 3325 insertions, 0 deletions
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index 89781fd4885..5379913aca5 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h | |||
| @@ -130,6 +130,7 @@ extern void bitmap_fold(unsigned long *dst, const unsigned long *orig, | |||
| 130 | extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order); | 130 | extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order); |
| 131 | extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); | 131 | extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); |
| 132 | extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); | 132 | extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); |
| 133 | extern void bitmap_copy_le(void *dst, const unsigned long *src, int nbits); | ||
| 133 | 134 | ||
| 134 | #define BITMAP_LAST_WORD_MASK(nbits) \ | 135 | #define BITMAP_LAST_WORD_MASK(nbits) \ |
| 135 | ( \ | 136 | ( \ |
diff --git a/include/linux/usb/wusb-wa.h b/include/linux/usb/wusb-wa.h new file mode 100644 index 00000000000..a102561e702 --- /dev/null +++ b/include/linux/usb/wusb-wa.h | |||
| @@ -0,0 +1,271 @@ | |||
| 1 | /* | ||
| 2 | * Wireless USB Wire Adapter constants and structures. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2005-2006 Intel Corporation. | ||
| 5 | * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> | ||
| 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 | |||
| 34 | /** | ||
| 35 | * Radio Command Request for the Radio Control Interface | ||
| 36 | * | ||
| 37 | * Radio Control Interface command and event codes are the same as | ||
| 38 | * WHCI, and listed in include/linux/uwb.h:UWB_RC_{CMD,EVT}_* | ||
| 39 | */ | ||
| 40 | enum { | ||
| 41 | WA_EXEC_RC_CMD = 40, /* Radio Control command Request */ | ||
| 42 | }; | ||
| 43 | |||
| 44 | /* Wireless Adapter Requests ([WUSB] table 8-51) */ | ||
| 45 | enum { | ||
| 46 | WUSB_REQ_ADD_MMC_IE = 20, | ||
| 47 | WUSB_REQ_REMOVE_MMC_IE = 21, | ||
| 48 | WUSB_REQ_SET_NUM_DNTS = 22, | ||
| 49 | WUSB_REQ_SET_CLUSTER_ID = 23, | ||
| 50 | WUSB_REQ_SET_DEV_INFO = 24, | ||
| 51 | WUSB_REQ_GET_TIME = 25, | ||
| 52 | WUSB_REQ_SET_STREAM_IDX = 26, | ||
| 53 | WUSB_REQ_SET_WUSB_MAS = 27, | ||
| 54 | }; | ||
| 55 | |||
| 56 | |||
| 57 | /* Wireless Adapter WUSB Channel Time types ([WUSB] table 8-52) */ | ||
| 58 | enum { | ||
| 59 | WUSB_TIME_ADJ = 0, | ||
| 60 | WUSB_TIME_BPST = 1, | ||
| 61 | WUSB_TIME_WUSB = 2, | ||
| 62 | }; | ||
| 63 | |||
| 64 | enum { | ||
| 65 | WA_ENABLE = 0x01, | ||
| 66 | WA_RESET = 0x02, | ||
| 67 | RPIPE_PAUSE = 0x1, | ||
| 68 | }; | ||
| 69 | |||
| 70 | /* Responses from Get Status request ([WUSB] section 8.3.1.6) */ | ||
| 71 | enum { | ||
| 72 | WA_STATUS_ENABLED = 0x01, | ||
| 73 | WA_STATUS_RESETTING = 0x02 | ||
| 74 | }; | ||
| 75 | |||
| 76 | enum rpipe_crs { | ||
| 77 | RPIPE_CRS_CTL = 0x01, | ||
| 78 | RPIPE_CRS_ISO = 0x02, | ||
| 79 | RPIPE_CRS_BULK = 0x04, | ||
| 80 | RPIPE_CRS_INTR = 0x08 | ||
| 81 | }; | ||
| 82 | |||
| 83 | /** | ||
| 84 | * RPipe descriptor ([WUSB] section 8.5.2.11) | ||
| 85 | * | ||
| 86 | * FIXME: explain rpipes | ||
| 87 | */ | ||
| 88 | struct usb_rpipe_descriptor { | ||
| 89 | u8 bLength; | ||
| 90 | u8 bDescriptorType; | ||
| 91 | __le16 wRPipeIndex; | ||
| 92 | __le16 wRequests; | ||
| 93 | __le16 wBlocks; /* rw if 0 */ | ||
| 94 | __le16 wMaxPacketSize; /* rw? */ | ||
| 95 | u8 bHSHubAddress; /* reserved: 0 */ | ||
| 96 | u8 bHSHubPort; /* ??? FIXME ??? */ | ||
| 97 | u8 bSpeed; /* rw: xfer rate 'enum uwb_phy_rate' */ | ||
| 98 | u8 bDeviceAddress; /* rw: Target device address */ | ||
| 99 | u8 bEndpointAddress; /* rw: Target EP address */ | ||
| 100 | u8 bDataSequence; /* ro: Current Data sequence */ | ||
| 101 | __le32 dwCurrentWindow; /* ro */ | ||
| 102 | u8 bMaxDataSequence; /* ro?: max supported seq */ | ||
| 103 | u8 bInterval; /* rw: */ | ||
| 104 | u8 bOverTheAirInterval; /* rw: */ | ||
| 105 | u8 bmAttribute; /* ro? */ | ||
| 106 | u8 bmCharacteristics; /* ro? enum rpipe_attr, supported xsactions */ | ||
| 107 | u8 bmRetryOptions; /* rw? */ | ||
| 108 | __le16 wNumTransactionErrors; /* rw */ | ||
| 109 | } __attribute__ ((packed)); | ||
| 110 | |||
| 111 | /** | ||
| 112 | * Wire Adapter Notification types ([WUSB] sections 8.4.5 & 8.5.4) | ||
| 113 | * | ||
| 114 | * These are the notifications coming on the notification endpoint of | ||
| 115 | * an HWA and a DWA. | ||
| 116 | */ | ||
| 117 | enum wa_notif_type { | ||
| 118 | DWA_NOTIF_RWAKE = 0x91, | ||
| 119 | DWA_NOTIF_PORTSTATUS = 0x92, | ||
| 120 | WA_NOTIF_TRANSFER = 0x93, | ||
| 121 | HWA_NOTIF_BPST_ADJ = 0x94, | ||
| 122 | HWA_NOTIF_DN = 0x95, | ||
| 123 | }; | ||
| 124 | |||
| 125 | /** | ||
| 126 | * Wire Adapter notification header | ||
| 127 | * | ||
| 128 | * Notifications coming from a wire adapter use a common header | ||
| 129 | * defined in [WUSB] sections 8.4.5 & 8.5.4. | ||
| 130 | */ | ||
| 131 | struct wa_notif_hdr { | ||
| 132 | u8 bLength; | ||
| 133 | u8 bNotifyType; /* enum wa_notif_type */ | ||
| 134 | } __attribute__((packed)); | ||
| 135 | |||
| 136 | /** | ||
| 137 | * HWA DN Received notification [(WUSB] section 8.5.4.2) | ||
| 138 | * | ||
| 139 | * The DNData is specified in WUSB1.0[7.6]. For each device | ||
| 140 | * notification we received, we just need to dispatch it. | ||
| 141 | * | ||
| 142 | * @dndata: this is really an array of notifications, but all start | ||
| 143 | * with the same header. | ||
| 144 | */ | ||
| 145 | struct hwa_notif_dn { | ||
| 146 | struct wa_notif_hdr hdr; | ||
| 147 | u8 bSourceDeviceAddr; /* from errata 2005/07 */ | ||
| 148 | u8 bmAttributes; | ||
| 149 | struct wusb_dn_hdr dndata[]; | ||
| 150 | } __attribute__((packed)); | ||
| 151 | |||
| 152 | /* [WUSB] section 8.3.3 */ | ||
| 153 | enum wa_xfer_type { | ||
| 154 | WA_XFER_TYPE_CTL = 0x80, | ||
| 155 | WA_XFER_TYPE_BI = 0x81, /* bulk/interrupt */ | ||
| 156 | WA_XFER_TYPE_ISO = 0x82, | ||
| 157 | WA_XFER_RESULT = 0x83, | ||
| 158 | WA_XFER_ABORT = 0x84, | ||
| 159 | }; | ||
| 160 | |||
| 161 | /* [WUSB] section 8.3.3 */ | ||
| 162 | struct wa_xfer_hdr { | ||
| 163 | u8 bLength; /* 0x18 */ | ||
| 164 | u8 bRequestType; /* 0x80 WA_REQUEST_TYPE_CTL */ | ||
| 165 | __le16 wRPipe; /* RPipe index */ | ||
| 166 | __le32 dwTransferID; /* Host-assigned ID */ | ||
| 167 | __le32 dwTransferLength; /* Length of data to xfer */ | ||
| 168 | u8 bTransferSegment; | ||
| 169 | } __attribute__((packed)); | ||
| 170 | |||
| 171 | struct wa_xfer_ctl { | ||
| 172 | struct wa_xfer_hdr hdr; | ||
| 173 | u8 bmAttribute; | ||
| 174 | __le16 wReserved; | ||
| 175 | struct usb_ctrlrequest baSetupData; | ||
| 176 | } __attribute__((packed)); | ||
| 177 | |||
| 178 | struct wa_xfer_bi { | ||
| 179 | struct wa_xfer_hdr hdr; | ||
| 180 | u8 bReserved; | ||
| 181 | __le16 wReserved; | ||
| 182 | } __attribute__((packed)); | ||
| 183 | |||
| 184 | struct wa_xfer_hwaiso { | ||
| 185 | struct wa_xfer_hdr hdr; | ||
