diff options
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r-- | net/bluetooth/hci_core.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 62edbf1b114e..208aab09d1bf 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -39,6 +39,7 @@ #include "hci_request.h" #include "hci_debugfs.h" +#include "led.h" #include "smp.h" static void hci_rx_work(struct work_struct *work); @@ -3392,6 +3393,9 @@ int hci_register_dev(struct hci_dev *hdev) if (hdev->rfkill && rfkill_blocked(hdev->rfkill)) hci_dev_set_flag(hdev, HCI_RFKILLED); + bluetooth_led_names(hdev); + bluetooth_led_init(hdev); + hci_dev_set_flag(hdev, HCI_SETUP); hci_dev_set_flag(hdev, HCI_AUTO_OFF); @@ -3462,6 +3466,8 @@ void hci_unregister_dev(struct hci_dev *hdev) hci_sock_dev_event(hdev, HCI_DEV_UNREG); + bluetooth_led_exit(hdev); + if (hdev->rfkill) { rfkill_unregister(hdev->rfkill); rfkill_destroy(hdev->rfkill); @@ -3553,6 +3559,8 @@ int hci_recv_frame(struct hci_dev *hdev, struct sk_buff *skb) skb_queue_tail(&hdev->rx_q, skb); queue_work(hdev->workqueue, &hdev->rx_work); + bluetooth_led_rx(hdev); + return 0; } EXPORT_SYMBOL(hci_recv_frame); @@ -3629,6 +3637,8 @@ static void hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb) BT_ERR("%s sending frame failed (%d)", hdev->name, err); kfree_skb(skb); } + + bluetooth_led_tx(hdev); } /* Send HCI command */ |