linux-stable/drivers/bluetooth
Marcel Holtmann 81cac64ba2 Bluetooth: Deal with USB devices that are faking CSR vendor
There exists a set of Bluetooth USB devices that show up on the USB
bus as 0a12:0001 and identify themselves as devices from CSR. However
they are not. When sending Read Local Version command they now have
a split personality and say they are from Broadcom.

  < HCI Command: Read Local Version Information (0x04|0x0001) plen 0
  > HCI Event: Command Complete (0x0e) plen 12
      Read Local Version Information (0x04|0x0001) ncmd 1
      status 0x00
      HCI Version: 2.0 (0x3) HCI Revision: 0x3000
      LMP Version: 2.0 (0x3) LMP Subversion: 0x420b
      Manufacturer: Broadcom Corporation (15)

The assumption is that they are neither CSR nor Broadcom based devices
and that they are designed and manufactured by someone else.

For the most parts they follow the Bluetooth HCI specification and
can be used as standard Bluetooth devices. However they have the
minor problem that the Delete Stored Link Key command is not working
as it should.

During the Bluetooth controller setup, this command is needed if
stored link keys are supported. For these devices it has to be
assumed that this is broken and so just set a quirk to clearly
indicate the behavior. After that the setup can just proceed.

Now the trick part is to detect these faulty devices since we do
not want to punish all CSR and all Broadcom devices. The original
devices do actually work according to the specification.

What is known so far is that these broken devices set the USB bcdDevice
revision information to 1.0 or less.

T:  Bus=02 Lev=01 Prnt=01 Port=08 Cnt=03 Dev#=  9 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0a12 ProdID=0001 Rev= 1.00
S:  Manufacturer=Bluetooth v2.0
S:  Product=Bluetooth V2.0 Dongle

T:  Bus=05 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0a12 ProdID=0001 Rev= 0.07

In case of CSR devices, the bcdDevice revision contains the firmware
build ID and that is normally a higher value. If the bcdDevice revision
is 1.0 or less, then an extra setup stage is checking if Read Local
Version returns CSR manufacturer information. If not then it will be
assumed that this is a broken device and the Delete Stored Link Key
command will be marked as broken.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2014-01-04 20:11:07 +02:00
..
ath3k.c Bluetooth: ath3k: Add support for a new AR3012 device 2013-12-04 11:09:04 -02:00
bcm203x.c Bluetooth: Use devm_kzalloc in bcm203x.c file. 2012-08-06 15:03:00 -03:00
bfusb.c Bluetooth: Declare bfusb_table[] as const 2013-10-11 17:05:20 +02:00
bluecard_cs.c Bluetooth: Remove pointless parameter check in bluecard_hci_send_frame() 2013-10-11 16:57:15 +02:00
bpa10x.c Bluetooth: Declare bpa10x_table[] as const 2013-10-11 17:05:22 +02:00
bt3c_cs.c Bluetooth: Remove pointless parameter check in bt3c_hci_send_frame() 2013-10-11 16:57:27 +02:00
btmrvl_debugfs.c Bluetooth: replace strict_strtol() with kstrtol() 2013-07-25 14:15:25 +01:00
btmrvl_drv.h Bluetooth: btmrvl: remove cal-data byte swapping and redundant mem copy 2013-12-04 11:09:03 -02:00
btmrvl_main.c Bluetooth: btmrvl: remove cal-data byte swapping and redundant mem copy 2013-12-04 11:09:03 -02:00
btmrvl_sdio.c Bluetooth: btmrvl: use cal-data from device-tree instead of conf file 2013-12-04 11:09:03 -02:00
btmrvl_sdio.h Bluetooth: btmrvl: use cal-data from device-tree instead of conf file 2013-12-04 11:09:03 -02:00
btsdio.c Bluetooth: Use MD SET register for changing SDIO Type-B to Type-A 2013-12-29 21:31:07 +02:00
btuart_cs.c Bluetooth: Remove pointless parameter check in btuart_hci_send_frame() 2013-10-11 17:00:02 +02:00
btusb.c Bluetooth: Deal with USB devices that are faking CSR vendor 2014-01-04 20:11:07 +02:00
btwilink.c Bluetooth: Add hdev parameter to hdev->send driver callback 2013-10-11 15:28:03 +02:00
dtl1_cs.c Bluetooth: Remove pointless parameter check in dtl1_hci_send_frame() 2013-10-11 17:00:08 +02:00
hci_ath.c tty: move the termios object into the tty 2012-07-16 13:00:41 -07:00
hci_bcsp.c Bluetooth: Provide hdev parameter to hci_recv_frame() driver callback 2013-10-11 09:45:34 +02:00
hci_h4.c Bluetooth: Remove unused h4_check_data_len() function 2013-10-11 07:51:09 +02:00
hci_h5.c Bluetooth: Provide hdev parameter to hci_recv_frame() driver callback 2013-10-11 09:45:34 +02:00
hci_ldisc.c Bluetooth: Remove pointless parameter check in hci_uart_send_frame() 2013-10-11 17:00:24 +02:00
hci_ll.c Bluetooth: Add hdev parameter to hdev->send driver callback 2013-10-11 15:28:03 +02:00
hci_uart.h Bluetooth: Add delayed init sequence support for UART controllers 2012-07-17 14:48:29 -03:00
hci_vhci.c Bluetooth: Add support for vectored writes to virtual HCI driver 2013-12-29 21:25:52 +02:00
Kconfig Bluetooth: btmrvl: support Marvell Bluetooth device SD8897 2013-06-12 10:20:54 -04:00
Makefile Bluetooth: Enable -D__CHECK_ENDIAN__ for sparse by default 2013-10-02 09:10:05 +03:00