summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/hci_uart.h
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2010-07-12 11:37:04 -0300
committerMarcel Holtmann <marcel@holtmann.org>2010-07-21 10:39:11 -0700
commit63c7d09cd52fe23ad2baee26bcc10a590944cfa4 (patch)
tree0d9d12e077f2f9612c6736fad45a69fda4b182d5 /drivers/bluetooth/hci_uart.h
parent47731de789749c9ed3c54751db28fd9c9eeaf019 (diff)
Bluetooth: Add HCIUARTSETFLAGS and HCIUARTGETFLAGS ioctls
This patch introduces two new ioctls: HCIUARTSETFLAGS and HCIUARTGETFLAGS. The only flag available for now is HCI_UART_RAW_DEVICE which allows to initialize a UART device into RAW mode from userspace. This is particularly useful for experimenting with Bluetooth controllers that don't yet have proper support in BlueZ. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/hci_uart.h')
-rw-r--r--drivers/bluetooth/hci_uart.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/bluetooth/hci_uart.h b/drivers/bluetooth/hci_uart.h
index 50113db06b9f..9694d9d60905 100644
--- a/drivers/bluetooth/hci_uart.h
+++ b/drivers/bluetooth/hci_uart.h
@@ -31,6 +31,8 @@
#define HCIUARTSETPROTO _IOW('U', 200, int)
#define HCIUARTGETPROTO _IOR('U', 201, int)
#define HCIUARTGETDEVICE _IOR('U', 202, int)
+#define HCIUARTSETFLAGS _IOW('U', 203, int)
+#define HCIUARTGETFLAGS _IOR('U', 204, int)
/* UART protocols */
#define HCI_UART_MAX_PROTO 5
@@ -41,6 +43,8 @@
#define HCI_UART_H4DS 3
#define HCI_UART_LL 4
+#define HCI_UART_RAW_DEVICE 0
+
struct hci_uart;
struct hci_uart_proto {
@@ -57,6 +61,7 @@ struct hci_uart {
struct tty_struct *tty;
struct hci_dev *hdev;
unsigned long flags;
+ unsigned long hdev_flags;
struct hci_uart_proto *proto;
void *priv;
@@ -66,7 +71,7 @@ struct hci_uart {
spinlock_t rx_lock;
};
-/* HCI_UART flag bits */
+/* HCI_UART proto flag bits */
#define HCI_UART_PROTO_SET 0
/* TX states */