1. 09 Jan, 2014 12 commits
  2. 08 Jan, 2014 1 commit
  3. 07 Jan, 2014 2 commits
  4. 06 Jan, 2014 22 commits
  5. 04 Jan, 2014 2 commits
    • Marcel Holtmann's avatar
      Bluetooth: Deal with USB devices that are faking CSR vendor · 81cac64b
      Marcel Holtmann authored
      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: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      81cac64b
    • Marcel Holtmann's avatar
      Bluetooth: Add quirk for disabling Delete Stored Link Key command · f9f462fa
      Marcel Holtmann authored
      Some controller pretend they support the Delete Stored Link Key command,
      but in reality they really don't support it.
      
        < HCI Command: Delete Stored Link Key (0x03|0x0012) plen 7
            bdaddr 00:00:00:00:00:00 all 1
        > HCI Event: Command Complete (0x0e) plen 4
            Delete Stored Link Key (0x03|0x0012) ncmd 1
            status 0x11 deleted 0
            Error: Unsupported Feature or Parameter Value
      
      Not correctly supporting this command causes the controller setup to
      fail and will make a device not work. However sending the command for
      controller that handle stored link keys is important. This quirk
      allows a driver to disable the command if it knows that this command
      handling is broken.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      f9f462fa
  6. 03 Jan, 2014 1 commit