cleanup
[linux-2.4.21-pre4.git] / drivers / bluetooth / hci_usb.h
1 /* 
2    BlueZ - Bluetooth protocol stack for Linux
3    Copyright (C) 2000-2001 Qualcomm Incorporated
4
5    Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
6
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License version 2 as
9    published by the Free Software Foundation;
10
11    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
12    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
14    IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
15    CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES 
16    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 
17    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 
18    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19
20    ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, 
21    COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS 
22    SOFTWARE IS DISCLAIMED.
23 */
24
25 /*
26  * $Id: hci_usb.h,v 1.1.1.1 2005/04/11 02:50:17 jack Exp $
27  */
28
29 #ifdef __KERNEL__
30
31 /* Class, SubClass, and Protocol codes that describe a Bluetooth device */
32 #define HCI_DEV_CLASS        0xe0       /* Wireless class */
33 #define HCI_DEV_SUBCLASS     0x01       /* RF subclass */
34 #define HCI_DEV_PROTOCOL     0x01       /* Bluetooth programming protocol */
35
36 #define HCI_CTRL_REQ         0x20
37
38 #define HCI_MAX_IFACE_NUM       3 
39
40 #define HCI_MAX_BULK_TX         4
41 #define HCI_MAX_BULK_RX         1
42
43 struct hci_usb {
44         struct hci_dev          hdev;
45
46         unsigned long           state;
47         
48         struct usb_device       *udev;
49         struct usb_interface    *isoc_iface;
50         
51         __u8                    bulk_out_ep;
52         __u8                    bulk_in_ep;
53         __u8                    isoc_out_ep;
54         __u8                    isoc_in_ep;
55
56         __u8                    intr_ep;
57         __u8                    intr_interval;
58         struct urb              *intr_urb;
59         struct sk_buff *        intr_skb;
60
61         rwlock_t                completion_lock;
62         
63         struct sk_buff_head     cmd_q;       // TX Commands
64         struct sk_buff_head     acl_q;       // TX ACLs
65         struct sk_buff_head     pending_q;   // Pending requests
66         struct sk_buff_head     completed_q; // Completed requests
67 };
68
69 struct hci_usb_scb {
70         struct urb *urb;
71         int    intr_len;
72 };
73
74 /* States  */
75 #define HCI_USB_TX_PROCESS      1
76 #define HCI_USB_TX_WAKEUP       2
77 #define HCI_USB_CTRL_TX         3
78
79 #endif /* __KERNEL__ */