aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2012-02-24 11:12:24 -0500
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-24 13:14:56 -0500
commita55e1f388767116836d32457a50eda7da3e925e5 (patch)
treeaf1e150006d5799ee3114ab78a7cf56af57d0256 /drivers/bluetooth
parent28b8df77449faa03b573638e089a855f8d25e0ed (diff)
Bluetooth: Allow HCI UART reset parameter via flags ioctl
The flags ioctl for HCI UART drivers already allows setting of certain Bluetooth core quirks. The reset parameter fits right in here. So allow this as well. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/hci_ldisc.c11
-rw-r--r--drivers/bluetooth/hci_uart.h1
2 files changed, 4 insertions, 8 deletions
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index c2d637adb3ca..cdc3594f9901 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -48,8 +48,6 @@
48 48
49#define VERSION "2.2" 49#define VERSION "2.2"
50 50
51static bool reset = 0;
52
53static struct hci_uart_proto *hup[HCI_UART_MAX_PROTO]; 51static struct hci_uart_proto *hup[HCI_UART_MAX_PROTO];
54 52
55int hci_uart_register_proto(struct hci_uart_proto *p) 53int hci_uart_register_proto(struct hci_uart_proto *p)
@@ -392,12 +390,12 @@ static int hci_uart_register_dev(struct hci_uart *hu)
392 hdev->send = hci_uart_send_frame; 390 hdev->send = hci_uart_send_frame;
393 hdev->parent = hu->tty->dev; 391 hdev->parent = hu->tty->dev;
394 392
395 if (!reset)
396 set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks);
397
398 if (test_bit(HCI_UART_RAW_DEVICE, &hu->hdev_flags)) 393 if (test_bit(HCI_UART_RAW_DEVICE, &hu->hdev_flags))
399 set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks); 394 set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks);
400 395
396 if (!test_bit(HCI_UART_RESET_ON_INIT, &hu->hdev_flags))
397 set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks);
398
401 if (hci_register_dev(hdev) < 0) { 399 if (hci_register_dev(hdev) < 0) {
402 BT_ERR("Can't register HCI device"); 400 BT_ERR("Can't register HCI device");
403 hci_free_dev(hdev); 401 hci_free_dev(hdev);
@@ -584,9 +582,6 @@ static void __exit hci_uart_exit(void)
584module_init(hci_uart_init); 582module_init(hci_uart_init);
585module_exit(hci_uart_exit); 583module_exit(hci_uart_exit);
586 584
587module_param(reset, bool, 0644);
588MODULE_PARM_DESC(reset, "Send HCI reset command on initialization");
589
590MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); 585MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
591MODULE_DESCRIPTION("Bluetooth HCI UART driver ver " VERSION); 586MODULE_DESCRIPTION("Bluetooth HCI UART driver ver " VERSION);
592MODULE_VERSION(VERSION); 587MODULE_VERSION(VERSION);
diff --git a/drivers/bluetooth/hci_uart.h b/drivers/bluetooth/hci_uart.h
index 99fb35239d1f..54c8983b183e 100644
--- a/drivers/bluetooth/hci_uart.h
+++ b/drivers/bluetooth/hci_uart.h
@@ -45,6 +45,7 @@
45#define HCI_UART_ATH3K 5 45#define HCI_UART_ATH3K 5
46 46
47#define HCI_UART_RAW_DEVICE 0 47#define HCI_UART_RAW_DEVICE 0
48#define HCI_UART_RESET_ON_INIT 1
48 49
49struct hci_uart; 50struct hci_uart;
50 51