aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-08-07 23:28:46 -0400
committerDavid S. Miller <davem@davemloft.net>2008-08-07 23:28:46 -0400
commitc1c6c11a6860c8135fd0d923c3d49fb368889b10 (patch)
tree7d58008c7cf943b7b6d07f5a26d59ca9e0bdab6d
parent2aaab9a0ccfd2ccf1c957cc2120da8d5593955c5 (diff)
parentcfeb414537b1d7c23ba202f198fa4154cd5a4856 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6
-rw-r--r--drivers/bluetooth/bcm203x.c9
-rw-r--r--drivers/bluetooth/bfusb.c10
-rw-r--r--drivers/bluetooth/bpa10x.c10
-rw-r--r--drivers/bluetooth/btusb.c163
-rw-r--r--drivers/bluetooth/hci_usb.c8
-rw-r--r--net/bluetooth/bnep/core.c15
6 files changed, 179 insertions, 36 deletions
diff --git a/drivers/bluetooth/bcm203x.c b/drivers/bluetooth/bcm203x.c
index 8919ccf8274b..ee40201c7278 100644
--- a/drivers/bluetooth/bcm203x.c
+++ b/drivers/bluetooth/bcm203x.c
@@ -42,9 +42,7 @@
42#define BT_DBG(D...) 42#define BT_DBG(D...)
43#endif 43#endif
44 44
45#define VERSION "1.1" 45#define VERSION "1.2"
46
47static int ignore = 0;
48 46
49static struct usb_device_id bcm203x_table[] = { 47static struct usb_device_id bcm203x_table[] = {
50 /* Broadcom Blutonium (BCM2033) */ 48 /* Broadcom Blutonium (BCM2033) */
@@ -175,7 +173,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id
175 173
176 BT_DBG("intf %p id %p", intf, id); 174 BT_DBG("intf %p id %p", intf, id);
177 175
178 if (ignore || (intf->cur_altsetting->desc.bInterfaceNumber != 0)) 176 if (intf->cur_altsetting->desc.bInterfaceNumber != 0)
179 return -ENODEV; 177 return -ENODEV;
180 178
181 data = kzalloc(sizeof(*data), GFP_KERNEL); 179 data = kzalloc(sizeof(*data), GFP_KERNEL);
@@ -300,9 +298,6 @@ static void __exit bcm203x_exit(void)
300module_init(bcm203x_init); 298module_init(bcm203x_init);
301module_exit(bcm203x_exit); 299module_exit(bcm203x_exit);
302 300
303module_param(ignore, bool, 0644);
304MODULE_PARM_DESC(ignore, "Ignore devices from the matching table");
305
306MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); 301MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
307MODULE_DESCRIPTION("Broadcom Blutonium firmware driver ver " VERSION); 302MODULE_DESCRIPTION("Broadcom Blutonium firmware driver ver " VERSION);
308MODULE_VERSION(VERSION); 303MODULE_VERSION(VERSION);
diff --git a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c
index 0c211adbc063..90a094634630 100644
--- a/drivers/bluetooth/bfusb.c
+++ b/drivers/bluetooth/bfusb.c
@@ -43,9 +43,7 @@
43#define BT_DBG(D...) 43#define BT_DBG(D...)
44#endif 44#endif
45 45
46#define VERSION "1.1" 46#define VERSION "1.2"
47
48static int ignore = 0;
49 47
50static struct usb_driver bfusb_driver; 48static struct usb_driver bfusb_driver;
51 49
@@ -656,9 +654,6 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i
656 654
657 BT_DBG("intf %p id %p", intf, id); 655 BT_DBG("intf %p id %p", intf, id);
658 656
659 if (ignore)
660 return -ENODEV;
661
662 /* Check number of endpoints */ 657 /* Check number of endpoints */
663 if (intf->cur_altsetting->desc.bNumEndpoints < 2) 658 if (intf->cur_altsetting->desc.bNumEndpoints < 2)
664 return -EIO; 659 return -EIO;
@@ -795,9 +790,6 @@ static void __exit bfusb_exit(void)
795module_init(bfusb_init); 790module_init(bfusb_init);
796module_exit(bfusb_exit); 791module_exit(bfusb_exit);
797 792
798module_param(ignore, bool, 0644);
799MODULE_PARM_DESC(ignore, "Ignore devices from the matching table");
800
801MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); 793MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
802MODULE_DESCRIPTION("BlueFRITZ! USB driver ver " VERSION); 794MODULE_DESCRIPTION("BlueFRITZ! USB driver ver " VERSION);
803MODULE_VERSION(VERSION); 795MODULE_VERSION(VERSION);
diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c
index 3b28658f5a1f..1e55a658e6ce 100644
--- a/drivers/bluetooth/bpa10x.c
+++ b/drivers/bluetooth/bpa10x.c
@@ -40,9 +40,7 @@
40#define BT_DBG(D...) 40#define BT_DBG(D...)
41#endif 41#endif
42 42
43#define VERSION "0.9" 43#define VERSION "0.10"
44
45static int ignore = 0;
46 44
47static struct usb_device_id bpa10x_table[] = { 45static struct usb_device_id bpa10x_table[] = {
48 /* Tektronix BPA 100/105 (Digianswer) */ 46 /* Tektronix BPA 100/105 (Digianswer) */
@@ -460,9 +458,6 @@ static int bpa10x_probe(struct usb_interface *intf, const struct usb_device_id *
460 458
461 BT_DBG("intf %p id %p", intf, id); 459 BT_DBG("intf %p id %p", intf, id);
462 460
463 if (ignore)
464 return -ENODEV;
465
466 if (intf->cur_altsetting->desc.bInterfaceNumber != 0) 461 if (intf->cur_altsetting->desc.bInterfaceNumber != 0)
467 return -ENODEV; 462 return -ENODEV;
468 463
@@ -546,9 +541,6 @@ static void __exit bpa10x_exit(void)
546module_init(bpa10x_init); 541module_init(bpa10x_init);
547module_exit(bpa10x_exit); 542module_exit(bpa10x_exit);
548 543
549module_param(ignore, bool, 0644);
550MODULE_PARM_DESC(ignore, "Ignore devices from the matching table");
551
552MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); 544MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
553MODULE_DESCRIPTION("Digianswer Bluetooth USB driver ver " VERSION); 545MODULE_DESCRIPTION("Digianswer Bluetooth USB driver ver " VERSION);
554MODULE_VERSION(VERSION); 546MODULE_VERSION(VERSION);
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 12e108914f19..95ae9ba5661e 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -41,18 +41,122 @@
41#define BT_DBG(D...) 41#define BT_DBG(D...)
42#endif 42#endif
43 43
44#define VERSION "0.1" 44#define VERSION "0.2"
45
46static int ignore_dga;
47static int ignore_csr;
48static int ignore_sniffer;
49static int disable_scofix;
50static int force_scofix;
51static int reset;
52
53static struct usb_driver btusb_driver;
54
55#define BTUSB_IGNORE 0x01
56#define BTUSB_RESET 0x02
57#define BTUSB_DIGIANSWER 0x04
58#define BTUSB_CSR 0x08
59#define BTUSB_SNIFFER 0x10
60#define BTUSB_BCM92035 0x20
61#define BTUSB_BROKEN_ISOC 0x40
62#define BTUSB_WRONG_SCO_MTU 0x80
45 63
46static struct usb_device_id btusb_table[] = { 64static struct usb_device_id btusb_table[] = {
47 /* Generic Bluetooth USB device */ 65 /* Generic Bluetooth USB device */
48 { USB_DEVICE_INFO(0xe0, 0x01, 0x01) }, 66 { USB_DEVICE_INFO(0xe0, 0x01, 0x01) },
49 67
68 /* AVM BlueFRITZ! USB v2.0 */
69 { USB_DEVICE(0x057c, 0x3800) },
70
71 /* Bluetooth Ultraport Module from IBM */
72 { USB_DEVICE(0x04bf, 0x030a) },
73
74 /* ALPS Modules with non-standard id */
75 { USB_DEVICE(0x044e, 0x3001) },
76 { USB_DEVICE(0x044e, 0x3002) },
77
78 /* Ericsson with non-standard id */
79 { USB_DEVICE(0x0bdb, 0x1002) },
80
81 /* Canyon CN-BTU1 with HID interfaces */
82 { USB_DEVICE(0x0c10, 0x0000), .driver_info = BTUSB_RESET },
83
50 { } /* Terminating entry */ 84 { } /* Terminating entry */
51}; 85};
52 86
53MODULE_DEVICE_TABLE(usb, btusb_table); 87MODULE_DEVICE_TABLE(usb, btusb_table);
54 88
55static struct usb_device_id blacklist_table[] = { 89static struct usb_device_id blacklist_table[] = {
90 /* CSR BlueCore devices */
91 { USB_DEVICE(0x0a12, 0x0001), .driver_info = BTUSB_CSR },
92
93 /* Broadcom BCM2033 without firmware */
94 { USB_DEVICE(0x0a5c, 0x2033), .driver_info = BTUSB_IGNORE },
95
96 /* Broadcom BCM2035 */
97 { USB_DEVICE(0x0a5c, 0x2035), .driver_info = BTUSB_RESET | BTUSB_WRONG_SCO_MTU },
98 { USB_DEVICE(0x0a5c, 0x200a), .driver_info = BTUSB_RESET | BTUSB_WRONG_SCO_MTU },
99
100 /* Broadcom BCM2045 */
101 { USB_DEVICE(0x0a5c, 0x2039), .driver_info = BTUSB_RESET | BTUSB_WRONG_SCO_MTU },
102 { USB_DEVICE(0x0a5c, 0x2101), .driver_info = BTUSB_RESET | BTUSB_WRONG_SCO_MTU },
103
104 /* Broadcom BCM2046 */
105 { USB_DEVICE(0x0a5c, 0x2151), .driver_info = BTUSB_RESET },
106
107 /* IBM/Lenovo ThinkPad with Broadcom chip */
108 { USB_DEVICE(0x0a5c, 0x201e), .driver_info = BTUSB_RESET | BTUSB_WRONG_SCO_MTU },
109 { USB_DEVICE(0x0a5c, 0x2110), .driver_info = BTUSB_RESET | BTUSB_WRONG_SCO_MTU },
110
111 /* Targus ACB10US */
112 { USB_DEVICE(0x0a5c, 0x2100), .driver_info = BTUSB_RESET },
113
114 /* ANYCOM Bluetooth USB-200 and USB-250 */
115 { USB_DEVICE(0x0a5c, 0x2111), .driver_info = BTUSB_RESET },
116
117 /* HP laptop with Broadcom chip */
118 { USB_DEVICE(0x03f0, 0x171d), .driver_info = BTUSB_RESET | BTUSB_WRONG_SCO_MTU },
119
120 /* Dell laptop with Broadcom chip */
121 { USB_DEVICE(0x413c, 0x8126), .driver_info = BTUSB_RESET | BTUSB_WRONG_SCO_MTU },
122
123 /* Dell Wireless 370 */
124 { USB_DEVICE(0x413c, 0x8156), .driver_info = BTUSB_RESET | BTUSB_WRONG_SCO_MTU },
125
126 /* Dell Wireless 410 */
127 { USB_DEVICE(0x413c, 0x8152), .driver_info = BTUSB_RESET | BTUSB_WRONG_SCO_MTU },
128
129 /* Microsoft Wireless Transceiver for Bluetooth 2.0 */
130 { USB_DEVICE(0x045e, 0x009c), .driver_info = BTUSB_RESET },
131
132 /* Kensington Bluetooth USB adapter */
133 { USB_DEVICE(0x047d, 0x105d), .driver_info = BTUSB_RESET },
134 { USB_DEVICE(0x047d, 0x105e), .driver_info = BTUSB_RESET | BTUSB_WRONG_SCO_MTU },
135
136 /* ISSC Bluetooth Adapter v3.1 */
137 { USB_DEVICE(0x1131, 0x1001), .driver_info = BTUSB_RESET },
138
139 /* RTX Telecom based adapters with buggy SCO support */
140 { USB_DEVICE(0x0400, 0x0807), .driver_info = BTUSB_BROKEN_ISOC },
141 { USB_DEVICE(0x0400, 0x080a), .driver_info = BTUSB_BROKEN_ISOC },
142
143 /* CONWISE Technology based adapters with buggy SCO support */
144 { USB_DEVICE(0x0e5e, 0x6622), .driver_info = BTUSB_BROKEN_ISOC },
145
146 /* Belkin F8T012 and F8T013 devices */
147 { USB_DEVICE(0x050d, 0x0012), .driver_info = BTUSB_RESET | BTUSB_WRONG_SCO_MTU },
148 { USB_DEVICE(0x050d, 0x0013), .driver_info = BTUSB_RESET | BTUSB_WRONG_SCO_MTU },
149
150 /* Digianswer devices */
151 { USB_DEVICE(0x08fd, 0x0001), .driver_info = BTUSB_DIGIANSWER },
152 { USB_DEVICE(0x08fd, 0x0002), .driver_info = BTUSB_IGNORE },
153
154 /* CSR BlueCore Bluetooth Sniffer */
155 { USB_DEVICE(0x0a12, 0x0002), .driver_info = BTUSB_SNIFFER },
156
157 /* Frontline ComProbe Bluetooth Sniffer */
158 { USB_DEVICE(0x16d3, 0x0002), .driver_info = BTUSB_SNIFFER },
159
56 { } /* Terminating entry */ 160 { } /* Terminating entry */
57}; 161};
58 162
@@ -433,6 +537,7 @@ static int btusb_probe(struct usb_interface *intf,
433 537
434 BT_DBG("intf %p id %p", intf, id); 538 BT_DBG("intf %p id %p", intf, id);
435 539
540 /* interface numbers are hardcoded in the spec */
436 if (intf->cur_altsetting->desc.bInterfaceNumber != 0) 541 if (intf->cur_altsetting->desc.bInterfaceNumber != 0)
437 return -ENODEV; 542 return -ENODEV;
438 543
@@ -443,6 +548,18 @@ static int btusb_probe(struct usb_interface *intf,
443 id = match; 548 id = match;
444 } 549 }
445 550
551 if (id->driver_info == BTUSB_IGNORE)
552 return -ENODEV;
553
554 if (ignore_dga && id->driver_info & BTUSB_DIGIANSWER)
555 return -ENODEV;
556
557 if (ignore_csr && id->driver_info & BTUSB_CSR)
558 return -ENODEV;
559
560 if (ignore_sniffer && id->driver_info & BTUSB_SNIFFER)
561 return -ENODEV;
562
446 data = kzalloc(sizeof(*data), GFP_KERNEL); 563 data = kzalloc(sizeof(*data), GFP_KERNEL);
447 if (!data) 564 if (!data)
448 return -ENOMEM; 565 return -ENOMEM;
@@ -503,7 +620,31 @@ static int btusb_probe(struct usb_interface *intf,
503 620
504 hdev->owner = THIS_MODULE; 621 hdev->owner = THIS_MODULE;
505 622
506 set_bit(HCI_QUIRK_RESET_ON_INIT, &hdev->quirks); 623 if (reset || id->driver_info & BTUSB_RESET)
624 set_bit(HCI_QUIRK_RESET_ON_INIT, &hdev->quirks);
625
626 if (force_scofix || id->driver_info & BTUSB_WRONG_SCO_MTU) {
627 if (!disable_scofix)
628 set_bit(HCI_QUIRK_FIXUP_BUFFER_SIZE, &hdev->quirks);
629 }
630
631 if (id->driver_info & BTUSB_SNIFFER) {
632 struct usb_device *udev = interface_to_usbdev(intf);
633
634 if (le16_to_cpu(udev->descriptor.bcdDevice) > 0x997)
635 set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks);
636 }
637
638 if (id->driver_info & BTUSB_BCM92035) {
639 unsigned char cmd[] = { 0x3b, 0xfc, 0x01, 0x00 };
640 struct sk_buff *skb;
641
642 skb = bt_skb_alloc(sizeof(cmd), GFP_KERNEL);
643 if (skb) {
644 memcpy(skb_put(skb, sizeof(cmd)), cmd, sizeof(cmd));
645 skb_queue_tail(&hdev->driver_init, skb);
646 }
647 }
507 648
508 err = hci_register_dev(hdev); 649 err = hci_register_dev(hdev);
509 if (err < 0) { 650 if (err < 0) {
@@ -558,6 +699,24 @@ static void __exit btusb_exit(void)
558module_init(btusb_init); 699module_init(btusb_init);
559module_exit(btusb_exit); 700module_exit(btusb_exit);
560 701
702module_param(ignore_dga, bool, 0644);
703MODULE_PARM_DESC(ignore_dga, "Ignore devices with id 08fd:0001");
704
705module_param(ignore_csr, bool, 0644);
706MODULE_PARM_DESC(ignore_csr, "Ignore devices with id 0a12:0001");
707
708module_param(ignore_sniffer, bool, 0644);
709MODULE_PARM_DESC(ignore_sniffer, "Ignore devices with id 0a12:0002");
710
711module_param(disable_scofix, bool, 0644);
712MODULE_PARM_DESC(disable_scofix, "Disable fixup of wrong SCO buffer size");
713
714module_param(force_scofix, bool, 0644);
715MODULE_PARM_DESC(force_scofix, "Force fixup of wrong SCO buffers size");
716
717module_param(reset, bool, 0644);
718MODULE_PARM_DESC(reset, "Send HCI reset command on initialization");
719
561MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); 720MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
562MODULE_DESCRIPTION("Generic Bluetooth USB driver ver " VERSION); 721MODULE_DESCRIPTION("Generic Bluetooth USB driver ver " VERSION);
563MODULE_VERSION(VERSION); 722MODULE_VERSION(VERSION);
diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
index c33bb59ed1fa..e397572bf574 100644
--- a/drivers/bluetooth/hci_usb.c
+++ b/drivers/bluetooth/hci_usb.c
@@ -62,7 +62,6 @@
62#define URB_ZERO_PACKET 0 62#define URB_ZERO_PACKET 0
63#endif 63#endif
64 64
65static int ignore;
66static int ignore_dga; 65static int ignore_dga;
67static int ignore_csr; 66static int ignore_csr;
68static int ignore_sniffer; 67static int ignore_sniffer;
@@ -74,7 +73,7 @@ static int reset;
74static int isoc = 2; 73static int isoc = 2;
75#endif 74#endif
76 75
77#define VERSION "2.9" 76#define VERSION "2.10"
78 77
79static struct usb_driver hci_usb_driver; 78static struct usb_driver hci_usb_driver;
80 79
@@ -801,7 +800,7 @@ static int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id
801 id = match; 800 id = match;
802 } 801 }
803 802
804 if (ignore || id->driver_info & HCI_IGNORE) 803 if (id->driver_info & HCI_IGNORE)
805 return -ENODEV; 804 return -ENODEV;
806 805
807 if (ignore_dga && id->driver_info & HCI_DIGIANSWER) 806 if (ignore_dga && id->driver_info & HCI_DIGIANSWER)
@@ -1108,9 +1107,6 @@ static void __exit hci_usb_exit(void)
1108module_init(hci_usb_init); 1107module_init(hci_usb_init);
1109module_exit(hci_usb_exit); 1108module_exit(hci_usb_exit);
1110 1109
1111module_param(ignore, bool, 0644);
1112MODULE_PARM_DESC(ignore, "Ignore devices from the matching table");
1113
1114module_param(ignore_dga, bool, 0644); 1110module_param(ignore_dga, bool, 0644);
1115MODULE_PARM_DESC(ignore_dga, "Ignore devices with id 08fd:0001"); 1111MODULE_PARM_DESC(ignore_dga, "Ignore devices with id 08fd:0001");
1116 1112
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c
index 021172c0e666..12bba6207a8d 100644
--- a/net/bluetooth/bnep/core.c
+++ b/net/bluetooth/bnep/core.c
@@ -57,7 +57,10 @@
57#define BT_DBG(D...) 57#define BT_DBG(D...)
58#endif 58#endif
59 59
60#define VERSION "1.2" 60#define VERSION "1.3"
61
62static int compress_src = 1;
63static int compress_dst = 1;
61 64
62static LIST_HEAD(bnep_session_list); 65static LIST_HEAD(bnep_session_list);
63static DECLARE_RWSEM(bnep_session_sem); 66static DECLARE_RWSEM(bnep_session_sem);
@@ -418,10 +421,10 @@ static inline int bnep_tx_frame(struct bnep_session *s, struct sk_buff *skb)
418 iv[il++] = (struct kvec) { &type, 1 }; 421 iv[il++] = (struct kvec) { &type, 1 };
419 len++; 422 len++;
420 423
421 if (!compare_ether_addr(eh->h_dest, s->eh.h_source)) 424 if (compress_src && !compare_ether_addr(eh->h_dest, s->eh.h_source))
422 type |= 0x01; 425 type |= 0x01;
423 426
424 if (!compare_ether_addr(eh->h_source, s->eh.h_dest)) 427 if (compress_dst && !compare_ether_addr(eh->h_source, s->eh.h_dest))
425 type |= 0x02; 428 type |= 0x02;
426 429
427 if (type) 430 if (type)
@@ -727,6 +730,12 @@ static void __exit bnep_exit(void)
727module_init(bnep_init); 730module_init(bnep_init);
728module_exit(bnep_exit); 731module_exit(bnep_exit);
729 732
733module_param(compress_src, bool, 0644);
734MODULE_PARM_DESC(compress_src, "Compress sources headers");
735
736module_param(compress_dst, bool, 0644);
737MODULE_PARM_DESC(compress_dst, "Compress destination headers");
738
730MODULE_AUTHOR("David Libault <david.libault@inventel.fr>, Maxim Krasnyansky <maxk@qualcomm.com>"); 739MODULE_AUTHOR("David Libault <david.libault@inventel.fr>, Maxim Krasnyansky <maxk@qualcomm.com>");
731MODULE_DESCRIPTION("Bluetooth BNEP ver " VERSION); 740MODULE_DESCRIPTION("Bluetooth BNEP ver " VERSION);
732MODULE_VERSION(VERSION); 741MODULE_VERSION(VERSION);