aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2013-10-11 19:42:07 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2013-10-12 02:46:35 -0400
commit4ca048e3a38e9691eb3e390c5eea3acd9b51cd17 (patch)
tree132fa73cd985fb3e6466652110a7132e62a8f160 /net/bluetooth/hci_core.c
parent7f72134e08bb15511ffcb880cdd01ca77ea54cb7 (diff)
Bluetooth: Fix HCI init for 1st generation BlueFRITZ! devices
The 1st generation of BlueFRITZ! devices from AVM Berlin pretend to be HCI version 1.2 controllers, but they are not. They are simple Bluetooth 1.1 devices. Since this company never created any newer controllers, it is safe to use the manufacturer ID instead of an USB quirk. < HCI Command: Read Page Scan Activity (0x03|0x001b) plen 0 > HCI Event: Command Complete (0x0e) plen 8 Read Page Scan Activity (0x03|0x001b) ncmd 1 Status: Success (0x00) Interval: 1280.000 msec (0x0800) Window: 21.250 msec (0x0022) < HCI Command: Read Page Scan Type (0x03|0x0046) plen 0 > HCI Event: Command Status (0x0f) plen 4 Read Page Scan Type (0x03|0x0046) ncmd 1 Status: Unknown HCI Command (0x01) Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 8f70a35b4d0e..082f3966f894 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -353,6 +353,8 @@ static void hci_init1_req(struct hci_request *req, unsigned long opt)
353 353
354static void bredr_setup(struct hci_request *req) 354static void bredr_setup(struct hci_request *req)
355{ 355{
356 struct hci_dev *hdev = req->hdev;
357
356 __le16 param; 358 __le16 param;
357 __u8 flt_type; 359 __u8 flt_type;
358 360
@@ -376,8 +378,10 @@ static void bredr_setup(struct hci_request *req)
376 param = __constant_cpu_to_le16(0x7d00); 378 param = __constant_cpu_to_le16(0x7d00);
377 hci_req_add(req, HCI_OP_WRITE_CA_TIMEOUT, 2, &param); 379 hci_req_add(req, HCI_OP_WRITE_CA_TIMEOUT, 2, &param);
378 380
379 /* Read page scan parameters */ 381 /* AVM Berlin (31), aka "BlueFRITZ!", reports version 1.2,
380 if (req->hdev->hci_ver > BLUETOOTH_VER_1_1) { 382 * but it does not support page scan related HCI commands.
383 */
384 if (hdev->manufacturer != 31 && hdev->hci_ver > BLUETOOTH_VER_1_1) {
381 hci_req_add(req, HCI_OP_READ_PAGE_SCAN_ACTIVITY, 0, NULL); 385 hci_req_add(req, HCI_OP_READ_PAGE_SCAN_ACTIVITY, 0, NULL);
382 hci_req_add(req, HCI_OP_READ_PAGE_SCAN_TYPE, 0, NULL); 386 hci_req_add(req, HCI_OP_READ_PAGE_SCAN_TYPE, 0, NULL);
383 } 387 }