diff options
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/ath3k.c | 15 | ||||
-rw-r--r-- | drivers/bluetooth/bfusb.c | 4 | ||||
-rw-r--r-- | drivers/bluetooth/bluecard_cs.c | 4 | ||||
-rw-r--r-- | drivers/bluetooth/bt3c_cs.c | 4 | ||||
-rw-r--r-- | drivers/bluetooth/btuart_cs.c | 4 | ||||
-rw-r--r-- | drivers/bluetooth/btusb.c | 26 | ||||
-rw-r--r-- | drivers/bluetooth/dtl1_cs.c | 4 | ||||
-rw-r--r-- | drivers/bluetooth/hci_vhci.c | 13 |
8 files changed, 40 insertions, 34 deletions
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c index cf77a9a2bfa4..07f14d10ea49 100644 --- a/drivers/bluetooth/ath3k.c +++ b/drivers/bluetooth/ath3k.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <net/bluetooth/bluetooth.h> | 30 | #include <net/bluetooth/bluetooth.h> |
31 | 31 | ||
32 | #define VERSION "1.0" | 32 | #define VERSION "1.0" |
33 | #define ATH3K_FIRMWARE "ath3k-1.fw" | ||
33 | 34 | ||
34 | #define ATH3K_DNLOAD 0x01 | 35 | #define ATH3K_DNLOAD 0x01 |
35 | #define ATH3K_GETSTATE 0x05 | 36 | #define ATH3K_GETSTATE 0x05 |
@@ -400,9 +401,15 @@ static int ath3k_probe(struct usb_interface *intf, | |||
400 | return 0; | 401 | return 0; |
401 | } | 402 | } |
402 | 403 | ||
403 | if (request_firmware(&firmware, "ath3k-1.fw", &udev->dev) < 0) { | 404 | ret = request_firmware(&firmware, ATH3K_FIRMWARE, &udev->dev); |
404 | BT_ERR("Error loading firmware"); | 405 | if (ret < 0) { |
405 | return -EIO; | 406 | if (ret == -ENOENT) |
407 | BT_ERR("Firmware file \"%s\" not found", | ||
408 | ATH3K_FIRMWARE); | ||
409 | else | ||
410 | BT_ERR("Firmware file \"%s\" request failed (err=%d)", | ||
411 | ATH3K_FIRMWARE, ret); | ||
412 | return ret; | ||
406 | } | 413 | } |
407 | 414 | ||
408 | ret = ath3k_load_firmware(udev, firmware); | 415 | ret = ath3k_load_firmware(udev, firmware); |
@@ -429,4 +436,4 @@ MODULE_AUTHOR("Atheros Communications"); | |||
429 | MODULE_DESCRIPTION("Atheros AR30xx firmware driver"); | 436 | MODULE_DESCRIPTION("Atheros AR30xx firmware driver"); |
430 | MODULE_VERSION(VERSION); | 437 | MODULE_VERSION(VERSION); |
431 | MODULE_LICENSE("GPL"); | 438 | MODULE_LICENSE("GPL"); |
432 | MODULE_FIRMWARE("ath3k-1.fw"); | 439 | MODULE_FIRMWARE(ATH3K_FIRMWARE); |
diff --git a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c index e64a290a1b98..a323baee51b0 100644 --- a/drivers/bluetooth/bfusb.c +++ b/drivers/bluetooth/bfusb.c | |||
@@ -751,9 +751,7 @@ static void bfusb_disconnect(struct usb_interface *intf) | |||
751 | 751 | ||
752 | bfusb_close(hdev); | 752 | bfusb_close(hdev); |
753 | 753 | ||
754 | if (hci_unregister_dev(hdev) < 0) | 754 | hci_unregister_dev(hdev); |
755 | BT_ERR("Can't unregister HCI device %s", hdev->name); | ||
756 | |||
757 | hci_free_dev(hdev); | 755 | hci_free_dev(hdev); |
758 | } | 756 | } |
759 | 757 | ||
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c index aed1904ea67b..c6a0c6103743 100644 --- a/drivers/bluetooth/bluecard_cs.c +++ b/drivers/bluetooth/bluecard_cs.c | |||
@@ -844,9 +844,7 @@ static int bluecard_close(bluecard_info_t *info) | |||
844 | /* Turn FPGA off */ | 844 | /* Turn FPGA off */ |
845 | outb(0x80, iobase + 0x30); | 845 | outb(0x80, iobase + 0x30); |
846 | 846 | ||
847 | if (hci_unregister_dev(hdev) < 0) | 847 | hci_unregister_dev(hdev); |
848 | BT_ERR("Can't unregister HCI device %s", hdev->name); | ||
849 | |||
850 | hci_free_dev(hdev); | 848 | hci_free_dev(hdev); |
851 | 849 | ||
852 | return 0; | 850 | return 0; |
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c index 4fc01949d399..0c97e5d514b6 100644 --- a/drivers/bluetooth/bt3c_cs.c +++ b/drivers/bluetooth/bt3c_cs.c | |||
@@ -636,9 +636,7 @@ static int bt3c_close(bt3c_info_t *info) | |||
636 | 636 | ||
637 | bt3c_hci_close(hdev); | 637 | bt3c_hci_close(hdev); |
638 | 638 | ||
639 | if (hci_unregister_dev(hdev) < 0) | 639 | hci_unregister_dev(hdev); |
640 | BT_ERR("Can't unregister HCI device %s", hdev->name); | ||
641 | |||
642 | hci_free_dev(hdev); | 640 | hci_free_dev(hdev); |
643 | 641 | ||
644 | return 0; | 642 | return 0; |
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c index 526b61807d94..200b3a2877d6 100644 --- a/drivers/bluetooth/btuart_cs.c +++ b/drivers/bluetooth/btuart_cs.c | |||
@@ -565,9 +565,7 @@ static int btuart_close(btuart_info_t *info) | |||
565 | 565 | ||
566 | spin_unlock_irqrestore(&(info->lock), flags); | 566 | spin_unlock_irqrestore(&(info->lock), flags); |
567 | 567 | ||
568 | if (hci_unregister_dev(hdev) < 0) | 568 | hci_unregister_dev(hdev); |
569 | BT_ERR("Can't unregister HCI device %s", hdev->name); | ||
570 | |||
571 | hci_free_dev(hdev); | 569 | hci_free_dev(hdev); |
572 | 570 | ||
573 | return 0; | 571 | return 0; |
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 0c3e179b7589..55ac349695c4 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
@@ -101,6 +101,7 @@ static struct usb_device_id btusb_table[] = { | |||
101 | { USB_DEVICE(0x0c10, 0x0000) }, | 101 | { USB_DEVICE(0x0c10, 0x0000) }, |
102 | 102 | ||
103 | /* Broadcom BCM20702A0 */ | 103 | /* Broadcom BCM20702A0 */ |
104 | { USB_DEVICE(0x0a5c, 0x21e3) }, | ||
104 | { USB_DEVICE(0x413c, 0x8197) }, | 105 | { USB_DEVICE(0x413c, 0x8197) }, |
105 | 106 | ||
106 | { } /* Terminating entry */ | 107 | { } /* Terminating entry */ |
@@ -315,7 +316,8 @@ static int btusb_submit_intr_urb(struct hci_dev *hdev, gfp_t mem_flags) | |||
315 | 316 | ||
316 | err = usb_submit_urb(urb, mem_flags); | 317 | err = usb_submit_urb(urb, mem_flags); |
317 | if (err < 0) { | 318 | if (err < 0) { |
318 | BT_ERR("%s urb %p submission failed (%d)", | 319 | if (err != -EPERM && err != -ENODEV) |
320 | BT_ERR("%s urb %p submission failed (%d)", | ||
319 | hdev->name, urb, -err); | 321 | hdev->name, urb, -err); |
320 | usb_unanchor_urb(urb); | 322 | usb_unanchor_urb(urb); |
321 | } | 323 | } |
@@ -400,7 +402,8 @@ static int btusb_submit_bulk_urb(struct hci_dev *hdev, gfp_t mem_flags) | |||
400 | 402 | ||
401 | err = usb_submit_urb(urb, mem_flags); | 403 | err = usb_submit_urb(urb, mem_flags); |
402 | if (err < 0) { | 404 | if (err < 0) { |
403 | BT_ERR("%s urb %p submission failed (%d)", | 405 | if (err != -EPERM && err != -ENODEV) |
406 | BT_ERR("%s urb %p submission failed (%d)", | ||
404 | hdev->name, urb, -err); | 407 | hdev->name, urb, -err); |
405 | usb_unanchor_urb(urb); | 408 | usb_unanchor_urb(urb); |
406 | } | 409 | } |
@@ -506,15 +509,10 @@ static int btusb_submit_isoc_urb(struct hci_dev *hdev, gfp_t mem_flags) | |||
506 | 509 | ||
507 | pipe = usb_rcvisocpipe(data->udev, data->isoc_rx_ep->bEndpointAddress); | 510 | pipe = usb_rcvisocpipe(data->udev, data->isoc_rx_ep->bEndpointAddress); |
508 | 511 | ||
509 | urb->dev = data->udev; | 512 | usb_fill_int_urb(urb, data->udev, pipe, buf, size, btusb_isoc_complete, |
510 | urb->pipe = pipe; | 513 | hdev, data->isoc_rx_ep->bInterval); |
511 | urb->context = hdev; | ||
512 | urb->complete = btusb_isoc_complete; | ||
513 | urb->interval = data->isoc_rx_ep->bInterval; | ||
514 | 514 | ||
515 | urb->transfer_flags = URB_FREE_BUFFER | URB_ISO_ASAP; | 515 | urb->transfer_flags = URB_FREE_BUFFER | URB_ISO_ASAP; |
516 | urb->transfer_buffer = buf; | ||
517 | urb->transfer_buffer_length = size; | ||
518 | 516 | ||
519 | __fill_isoc_descriptor(urb, size, | 517 | __fill_isoc_descriptor(urb, size, |
520 | le16_to_cpu(data->isoc_rx_ep->wMaxPacketSize)); | 518 | le16_to_cpu(data->isoc_rx_ep->wMaxPacketSize)); |
@@ -523,7 +521,8 @@ static int btusb_submit_isoc_urb(struct hci_dev *hdev, gfp_t mem_flags) | |||
523 | 521 | ||
524 | err = usb_submit_urb(urb, mem_flags); | 522 | err = usb_submit_urb(urb, mem_flags); |
525 | if (err < 0) { | 523 | if (err < 0) { |
526 | BT_ERR("%s urb %p submission failed (%d)", | 524 | if (err != -EPERM && err != -ENODEV) |
525 | BT_ERR("%s urb %p submission failed (%d)", | ||
527 | hdev->name, urb, -err); | 526 | hdev->name, urb, -err); |
528 | usb_unanchor_urb(urb); | 527 | usb_unanchor_urb(urb); |
529 | } | 528 | } |
@@ -727,6 +726,9 @@ static int btusb_send_frame(struct sk_buff *skb) | |||
727 | usb_fill_bulk_urb(urb, data->udev, pipe, | 726 | usb_fill_bulk_urb(urb, data->udev, pipe, |
728 | skb->data, skb->len, btusb_tx_complete, skb); | 727 | skb->data, skb->len, btusb_tx_complete, skb); |
729 | 728 | ||
729 | if (skb->priority >= HCI_PRIO_MAX - 1) | ||
730 | urb->transfer_flags = URB_ISO_ASAP; | ||
731 | |||
730 | hdev->stat.acl_tx++; | 732 | hdev->stat.acl_tx++; |
731 | break; | 733 | break; |
732 | 734 | ||
@@ -770,7 +772,9 @@ skip_waking: | |||
770 | 772 | ||
771 | err = usb_submit_urb(urb, GFP_ATOMIC); | 773 | err = usb_submit_urb(urb, GFP_ATOMIC); |
772 | if (err < 0) { | 774 | if (err < 0) { |
773 | BT_ERR("%s urb %p submission failed", hdev->name, urb); | 775 | if (err != -EPERM && err != -ENODEV) |
776 | BT_ERR("%s urb %p submission failed (%d)", | ||
777 | hdev->name, urb, -err); | ||
774 | kfree(urb->setup_packet); | 778 | kfree(urb->setup_packet); |
775 | usb_unanchor_urb(urb); | 779 | usb_unanchor_urb(urb); |
776 | } else { | 780 | } else { |
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c index 5e4c2de9fc3f..969bb22e493f 100644 --- a/drivers/bluetooth/dtl1_cs.c +++ b/drivers/bluetooth/dtl1_cs.c | |||
@@ -551,9 +551,7 @@ static int dtl1_close(dtl1_info_t *info) | |||
551 | 551 | ||
552 | spin_unlock_irqrestore(&(info->lock), flags); | 552 | spin_unlock_irqrestore(&(info->lock), flags); |
553 | 553 | ||
554 | if (hci_unregister_dev(hdev) < 0) | 554 | hci_unregister_dev(hdev); |
555 | BT_ERR("Can't unregister HCI device %s", hdev->name); | ||
556 | |||
557 | hci_free_dev(hdev); | 555 | hci_free_dev(hdev); |
558 | 556 | ||
559 | return 0; | 557 | return 0; |
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index 67c180c2c1e0..2ed6ab1c6e1b 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c | |||
@@ -41,6 +41,8 @@ | |||
41 | 41 | ||
42 | #define VERSION "1.3" | 42 | #define VERSION "1.3" |
43 | 43 | ||
44 | static bool amp; | ||
45 | |||
44 | struct vhci_data { | 46 | struct vhci_data { |
45 | struct hci_dev *hdev; | 47 | struct hci_dev *hdev; |
46 | 48 | ||
@@ -239,6 +241,9 @@ static int vhci_open(struct inode *inode, struct file *file) | |||
239 | hdev->bus = HCI_VIRTUAL; | 241 | hdev->bus = HCI_VIRTUAL; |
240 | hdev->driver_data = data; | 242 | hdev->driver_data = data; |
241 | 243 | ||
244 | if (amp) | ||
245 | hdev->dev_type = HCI_AMP; | ||
246 | |||
242 | hdev->open = vhci_open_dev; | 247 | hdev->open = vhci_open_dev; |
243 | hdev->close = vhci_close_dev; | 248 | hdev->close = vhci_close_dev; |
244 | hdev->flush = vhci_flush; | 249 | hdev->flush = vhci_flush; |
@@ -264,10 +269,7 @@ static int vhci_release(struct inode *inode, struct file *file) | |||
264 | struct vhci_data *data = file->private_data; | 269 | struct vhci_data *data = file->private_data; |
265 | struct hci_dev *hdev = data->hdev; | 270 | struct hci_dev *hdev = data->hdev; |
266 | 271 | ||
267 | if (hci_unregister_dev(hdev) < 0) { | 272 | hci_unregister_dev(hdev); |
268 | BT_ERR("Can't unregister HCI device %s", hdev->name); | ||
269 | } | ||
270 | |||
271 | hci_free_dev(hdev); | 273 | hci_free_dev(hdev); |
272 | 274 | ||
273 | file->private_data = NULL; | 275 | file->private_data = NULL; |
@@ -306,6 +308,9 @@ static void __exit vhci_exit(void) | |||
306 | module_init(vhci_init); | 308 | module_init(vhci_init); |
307 | module_exit(vhci_exit); | 309 | module_exit(vhci_exit); |
308 | 310 | ||
311 | module_param(amp, bool, 0644); | ||
312 | MODULE_PARM_DESC(amp, "Create AMP controller device"); | ||
313 | |||
309 | MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); | 314 | MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); |
310 | MODULE_DESCRIPTION("Bluetooth virtual HCI driver ver " VERSION); | 315 | MODULE_DESCRIPTION("Bluetooth virtual HCI driver ver " VERSION); |
311 | MODULE_VERSION(VERSION); | 316 | MODULE_VERSION(VERSION); |