diff options
Diffstat (limited to 'drivers/bluetooth/hci_uart.h')
| -rw-r--r-- | drivers/bluetooth/hci_uart.h | 84 |
1 files changed, 44 insertions, 40 deletions
diff --git a/drivers/bluetooth/hci_uart.h b/drivers/bluetooth/hci_uart.h index 0a57d72790ec..b250e6789dee 100644 --- a/drivers/bluetooth/hci_uart.h +++ b/drivers/bluetooth/hci_uart.h | |||
| @@ -1,32 +1,29 @@ | |||
| 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 | /* | 1 | /* |
| 26 | * $Id: hci_uart.h,v 1.2 2002/09/09 01:17:32 maxk Exp $ | 2 | * |
| 3 | * Bluetooth HCI UART driver | ||
| 4 | * | ||
| 5 | * Copyright (C) 2000-2001 Qualcomm Incorporated | ||
| 6 | * Copyright (C) 2002-2003 Maxim Krasnyansky <maxk@qualcomm.com> | ||
| 7 | * Copyright (C) 2004-2005 Marcel Holtmann <marcel@holtmann.org> | ||
| 8 | * | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or modify | ||
| 11 | * it under the terms of the GNU General Public License as published by | ||
| 12 | * the Free Software Foundation; either version 2 of the License, or | ||
| 13 | * (at your option) any later version. | ||
| 14 | * | ||
| 15 | * This program is distributed in the hope that it will be useful, | ||
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | * GNU General Public License for more details. | ||
| 19 | * | ||
| 20 | * You should have received a copy of the GNU General Public License | ||
| 21 | * along with this program; if not, write to the Free Software | ||
| 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 23 | * | ||
| 27 | */ | 24 | */ |
| 28 | 25 | ||
| 29 | #ifndef N_HCI | 26 | #ifndef N_HCI |
| 30 | #define N_HCI 15 | 27 | #define N_HCI 15 |
| 31 | #endif | 28 | #endif |
| 32 | 29 | ||
| @@ -42,7 +39,6 @@ | |||
| 42 | #define HCI_UART_3WIRE 2 | 39 | #define HCI_UART_3WIRE 2 |
| 43 | #define HCI_UART_H4DS 3 | 40 | #define HCI_UART_H4DS 3 |
| 44 | 41 | ||
| 45 | #ifdef __KERNEL__ | ||
| 46 | struct hci_uart; | 42 | struct hci_uart; |
| 47 | 43 | ||
| 48 | struct hci_uart_proto { | 44 | struct hci_uart_proto { |
| @@ -56,27 +52,35 @@ struct hci_uart_proto { | |||
| 56 | }; | 52 | }; |
| 57 | 53 | ||
| 58 | struct hci_uart { | 54 | struct hci_uart { |
| 59 | struct tty_struct *tty; | 55 | struct tty_struct *tty; |
| 60 | struct hci_dev *hdev; | 56 | struct hci_dev *hdev; |
| 61 | unsigned long flags; | 57 | unsigned long flags; |
| 62 | 58 | ||
| 63 | struct hci_uart_proto *proto; | 59 | struct hci_uart_proto *proto; |
| 64 | void *priv; | 60 | void *priv; |
| 65 | 61 | ||
| 66 | struct sk_buff *tx_skb; | 62 | struct sk_buff *tx_skb; |
| 67 | unsigned long tx_state; | 63 | unsigned long tx_state; |
| 68 | spinlock_t rx_lock; | 64 | spinlock_t rx_lock; |
| 69 | }; | 65 | }; |
| 70 | 66 | ||
| 71 | /* HCI_UART flag bits */ | 67 | /* HCI_UART flag bits */ |
| 72 | #define HCI_UART_PROTO_SET 0 | 68 | #define HCI_UART_PROTO_SET 0 |
| 73 | 69 | ||
| 74 | /* TX states */ | 70 | /* TX states */ |
| 75 | #define HCI_UART_SENDING 1 | 71 | #define HCI_UART_SENDING 1 |
| 76 | #define HCI_UART_TX_WAKEUP 2 | 72 | #define HCI_UART_TX_WAKEUP 2 |
| 77 | 73 | ||
| 78 | int hci_uart_register_proto(struct hci_uart_proto *p); | 74 | int hci_uart_register_proto(struct hci_uart_proto *p); |
| 79 | int hci_uart_unregister_proto(struct hci_uart_proto *p); | 75 | int hci_uart_unregister_proto(struct hci_uart_proto *p); |
| 80 | int hci_uart_tx_wakeup(struct hci_uart *hu); | 76 | int hci_uart_tx_wakeup(struct hci_uart *hu); |
| 81 | 77 | ||
| 82 | #endif /* __KERNEL__ */ | 78 | #ifdef CONFIG_BT_HCIUART_H4 |
| 79 | int h4_init(void); | ||
| 80 | int h4_deinit(void); | ||
| 81 | #endif | ||
| 82 | |||
| 83 | #ifdef CONFIG_BT_HCIUART_BCSP | ||
| 84 | int bcsp_init(void); | ||
| 85 | int bcsp_deinit(void); | ||
| 86 | #endif | ||
