aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2014-11-01 21:56:41 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2014-11-02 02:59:42 -0500
commit24dfa343716a493472db0555342bb88678efa444 (patch)
tree7a07d632e92e30835672e6fabc1f4ec6691f71ab /net
parent8761f9d6620b0be6b08f21807568fbbfcbb128d2 (diff)
Bluetooth: Print error message for HCI_Hardware_Error event
When the HCI_Hardware_Error event is send by the controller or injected by the driver, then at least print an error message. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_event.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 3dd2550b4c07..2f02ff0ed781 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2925,6 +2925,13 @@ static void hci_cmd_status_evt(struct hci_dev *hdev, struct sk_buff *skb)
2925 } 2925 }
2926} 2926}
2927 2927
2928static void hci_hardware_error_evt(struct hci_dev *hdev, struct sk_buff *skb)
2929{
2930 struct hci_ev_hardware_error *ev = (void *) skb->data;
2931
2932 BT_ERR("%s hardware error 0x%2.2x", hdev->name, ev->code);
2933}
2934
2928static void hci_role_change_evt(struct hci_dev *hdev, struct sk_buff *skb) 2935static void hci_role_change_evt(struct hci_dev *hdev, struct sk_buff *skb)
2929{ 2936{
2930 struct hci_ev_role_change *ev = (void *) skb->data; 2937 struct hci_ev_role_change *ev = (void *) skb->data;
@@ -4746,6 +4753,10 @@ void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb)
4746 hci_cmd_status_evt(hdev, skb); 4753 hci_cmd_status_evt(hdev, skb);
4747 break; 4754 break;
4748 4755
4756 case HCI_EV_HARDWARE_ERROR:
4757 hci_hardware_error_evt(hdev, skb);
4758 break;
4759
4749 case HCI_EV_ROLE_CHANGE: 4760 case HCI_EV_ROLE_CHANGE:
4750 hci_role_change_evt(hdev, skb); 4761 hci_role_change_evt(hdev, skb);
4751 break; 4762 break;