From 0675218d538e0aa03b3d46159da01dbc26550c01 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 9 May 2007 09:15:35 +0200 Subject: [PATCH] --- yaml --- r: 55948 b: refs/heads/master c: d215874460e7657b8e104de024140e0932690450 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/bluetooth/hci_ldisc.c | 5 +++++ trunk/drivers/bluetooth/hci_uart.h | 5 +++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 167c63267175..5821f6d6f29f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5be3946647424b08db0f62c545215cf506af8a52 +refs/heads/master: d215874460e7657b8e104de024140e0932690450 diff --git a/trunk/drivers/bluetooth/hci_ldisc.c b/trunk/drivers/bluetooth/hci_ldisc.c index 0f4203b499af..75c15085f81f 100644 --- a/trunk/drivers/bluetooth/hci_ldisc.c +++ b/trunk/drivers/bluetooth/hci_ldisc.c @@ -479,6 +479,11 @@ static int hci_uart_tty_ioctl(struct tty_struct *tty, struct file * file, return hu->proto->id; return -EUNATCH; + case HCIUARTGETDEVICE: + if (test_bit(HCI_UART_PROTO_SET, &hu->flags)) + return hu->hdev->id; + return -EUNATCH; + default: err = n_tty_ioctl(tty, file, cmd, arg); break; diff --git a/trunk/drivers/bluetooth/hci_uart.h b/trunk/drivers/bluetooth/hci_uart.h index b250e6789dee..1097ce72393f 100644 --- a/trunk/drivers/bluetooth/hci_uart.h +++ b/trunk/drivers/bluetooth/hci_uart.h @@ -28,8 +28,9 @@ #endif /* Ioctls */ -#define HCIUARTSETPROTO _IOW('U', 200, int) -#define HCIUARTGETPROTO _IOR('U', 201, int) +#define HCIUARTSETPROTO _IOW('U', 200, int) +#define HCIUARTGETPROTO _IOR('U', 201, int) +#define HCIUARTGETDEVICE _IOR('U', 202, int) /* UART protocols */ #define HCI_UART_MAX_PROTO 4