aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2015-07-05 08:37:39 -0400
committerMarcel Holtmann <marcel@holtmann.org>2015-07-23 11:10:50 -0400
commiteeb6abe97390c579d9ed9da27bd98fbf07c641ed (patch)
tree5dcfaa744d128fe72f1373c4213189c1101b44a1 /drivers/bluetooth
parent973bb97e5aee56edddaae3d5c96877101ad509c0 (diff)
Bluetooth: btusb: Use hardware error handler from Intel module
The Intel specific Bluetooth module provides now an exported function for the hardware error. Use that instead of duplicating it inside the driver. 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/btusb.c35
1 files changed, 1 insertions, 34 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index b4cf8d9c9dac..21bdb89da6eb 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2291,39 +2291,6 @@ done:
2291 return 0; 2291 return 0;
2292} 2292}
2293 2293
2294static void btusb_hw_error_intel(struct hci_dev *hdev, u8 code)
2295{
2296 struct sk_buff *skb;
2297 u8 type = 0x00;
2298
2299 BT_ERR("%s: Hardware error 0x%2.2x", hdev->name, code);
2300
2301 skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL, HCI_INIT_TIMEOUT);
2302 if (IS_ERR(skb)) {
2303 BT_ERR("%s: Reset after hardware error failed (%ld)",
2304 hdev->name, PTR_ERR(skb));
2305 return;
2306 }
2307 kfree_skb(skb);
2308
2309 skb = __hci_cmd_sync(hdev, 0xfc22, 1, &type, HCI_INIT_TIMEOUT);
2310 if (IS_ERR(skb)) {
2311 BT_ERR("%s: Retrieving Intel exception info failed (%ld)",
2312 hdev->name, PTR_ERR(skb));
2313 return;
2314 }
2315
2316 if (skb->len != 13) {
2317 BT_ERR("%s: Exception info size mismatch", hdev->name);
2318 kfree_skb(skb);
2319 return;
2320 }
2321
2322 BT_ERR("%s: Exception info %s", hdev->name, (char *)(skb->data + 1));
2323
2324 kfree_skb(skb);
2325}
2326
2327static int btusb_shutdown_intel(struct hci_dev *hdev) 2294static int btusb_shutdown_intel(struct hci_dev *hdev)
2328{ 2295{
2329 struct sk_buff *skb; 2296 struct sk_buff *skb;
@@ -2783,7 +2750,7 @@ static int btusb_probe(struct usb_interface *intf,
2783 if (id->driver_info & BTUSB_INTEL_NEW) { 2750 if (id->driver_info & BTUSB_INTEL_NEW) {
2784 hdev->send = btusb_send_frame_intel; 2751 hdev->send = btusb_send_frame_intel;
2785 hdev->setup = btusb_setup_intel_new; 2752 hdev->setup = btusb_setup_intel_new;
2786 hdev->hw_error = btusb_hw_error_intel; 2753 hdev->hw_error = btintel_hw_error;
2787 hdev->set_bdaddr = btintel_set_bdaddr; 2754 hdev->set_bdaddr = btintel_set_bdaddr;
2788 set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks); 2755 set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks);
2789 } 2756 }