Skip to content
  1. Jun 09, 2015
    • Marcel Holtmann's avatar
      Bluetooth: btusb: Fix secure send command length alignment on Intel 8260 · e66890a9
      Marcel Holtmann authored
      
      
      This patch fixes the command length alignment issue for Intel Bluetooth
      8260.
      
      The length of parameters in the firmware downloading command must be
      multiplication of 4. If not, the command must append Intel_NOP command
      with extra parameters, zeros, at the end, and the firmware file is
      already included Intel_NOP command for alignment.
      
      This patch checks the next command and if the next command is Intel_NOP
      command, it reads the Intel_NOP command and send them together.
      
      For example, if the data from the firmware file looks like this:
      8E FC 03 11 22 33 02 FC 03 00 00 00
      
      Previously, btusb sends two commands:
      09 FC 06 8E FC 03 11 22 33
      09 FC 06 02 FC 03 00 00 00
      
      This won't work because the length of parameters are 6 which violates
      the 4 byte alignment.
      
      This patch will append them together and send as one command:
      09 FC 0C 8E FC 03 11 22 33 02 FC 03 00 00 00
      
      Based on previous work from Tedd Ho-Jeong An <tedd.an@intel.com>
      
      Reported-by: default avatarTedd Ho-Jeong An <tedd.an@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Tested-by: default avatarTedd Ho-Jeong An <tedd.an@intel.com>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      Cc: stable@vger.kernel.org
      e66890a9
    • Johan Hedberg's avatar
      Bluetooth: Fix encryption key size handling for LTKs · 8b76ce34
      Johan Hedberg authored
      
      
      The encryption key size for LTKs is supposed to be applied only at the
      moment of encryption. When generating a Link Key (using LE SC) from
      the LTK the full non-shortened value should be used. This patch
      modifies the code to always keep the full value around and only apply
      the key size when passing the value to HCI.
      
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      8b76ce34
  2. Jun 08, 2015
    • Aleksei Volkov's avatar
      Bluetooth: btusb: Correct typo in Roper Class 1 Bluetooth Dongle · 2eeac871
      Aleksei Volkov authored
      
      
      That patch corrects the typo in usb vendor id for Roper Class 1 Bluetooth
      Dongle. Problem with typo is present since 4.0 kernel.
      
      Content /sys/kernel/debug/usb/devices for these dongle:
      
      T:  Bus=05 Lev=01 Prnt=01 Port=00 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=1310 ProdID=0001 Rev=15.00
      S:  Manufacturer=SiW
      S:  Product=SiW
      S:  SerialNumber=E7BB050D0B00
      C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr= 50mA
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
      E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      
      Signed-off-by: default avatarAleksei Volkov <info@dv2c.ru>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Cc: stable@vger.kernel.org # 4.0.x
      2eeac871
    • Marcel Holtmann's avatar
      Bluetooth: btusb: Remove unneeded btusb_read_local_version function · 7cd84d72
      Marcel Holtmann authored
      
      
      The btusb_read_local_version function has only a single user and with
      that just move its functionality in place where it belongs.
      
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      7cd84d72
    • Marcel Holtmann's avatar
      Bluetooth: btusb: Remove double error check from local version command · 9641d343
      Marcel Holtmann authored
      
      
      The __hci_cmd_sync function already handles the command status and
      command complete errors. No need to check the status field again.
      
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      9641d343
    • Marcel Holtmann's avatar
      Bluetooth: btusb: Fix memory leak in Intel setup routine · ecffc804
      Marcel Holtmann authored
      
      
      The SKB returned from the Intel specific version information command is
      missing a kfree_skb.
      
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      Cc: stable@vger.kernel.org
      ecffc804
    • Marcel Holtmann's avatar
      Bluetooth: Fix race condition with user channel and setup stage · 781f899f
      Marcel Holtmann authored
      
      
      During the initial setup stage of a controller, the low-level transport
      is actually active. This means that HCI_UP is true. To avoid toggling
      the transport off and back on again for normal operation the kernel
      holds a grace period with HCI_AUTO_OFF that will turn the low-level
      transport off in case no user is present.
      
      The idea of the grace period is important to avoid having to initialize
      all of the controller twice. So legacy ioctl and the new management
      interface knows how to clear this grace period and then start normal
      operation.
      
      For the user channel operation this grace period has not been taken into
      account which results in the problem that HCI_UP and HCI_AUTO_OFF are
      set and the kernel will return EBUSY. However from a system point of
      view the controller is ready to be grabbed by either the ioctl, the
      management interface or the user channel.
      
      This patch brings the user channel to the same level as the other two
      entries for operating a controller.
      
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      Cc: stable@vger.kernel.org
      781f899f
  3. Jun 07, 2015
  4. Jun 06, 2015
  5. Jun 04, 2015
  6. Jun 03, 2015
  7. Jun 02, 2015
  8. May 31, 2015