1. 07 Dec, 2013 1 commit
  2. 05 Dec, 2013 34 commits
  3. 04 Dec, 2013 5 commits
    • Johan Hedberg's avatar
      Bluetooth: Remove dead code from SMP encryption function · 201a5929
      Johan Hedberg authored
      The AES cipher is used in ECB mode by SMP and therefore doesn't use an
      IV (crypto_blkcipher_ivsize returns 0) so the code trying to set the IV
      was never getting called. Simply remove this code to avoid anyone from
      thinking it actually makes some difference.
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      201a5929
    • Johan Hedberg's avatar
      Bluetooth: Remove useless smp_rand function · e84a6b13
      Johan Hedberg authored
      This function was always just making a single get_random_bytes() call
      and always returning the value 0. It's simpler to just call
      get_random_bytes() directly where needed.
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      e84a6b13
    • Tedd Ho-Jeong An's avatar
      Bluetooth: Enable autosuspend for Intel Bluetooth device · d2bee8fb
      Tedd Ho-Jeong An authored
      This patch enables autosuspend for Intel Bluetooth device.
      
      After btusb is loaded for Intel Bluetooth device, the power/control
      attribute contains "on" value by default which disables the autosuspend.
      Based on the USB PM document(Documentation/usb/power-management.txt),
      kernel disabled the autosuspend for all devices other than hub by default.
      
      "The USB specification states that all USB devices must support power
      management.  Nevertheless, the sad fact is that many devices do not
      support it very well.  You can suspend them all right, but when you
      try to resume them they disconnect themselves from the USB bus or
      they stop working entirely.  This seems to be especially prevalent
      among printers and scanners, but plenty of other types of device have
      the same deficiency.
      
      For this reason, by default the kernel disables autosuspend (the
      power/control attribute is initialized to "on") for all devices other
      than hubs.  Hubs, at least, appear to be reasonably well-behaved in
      this regard."
      
      This document also described how the driver can enables the autosuspend
      by using an USB api.
      
      "Drivers can enable autosuspend for their devices by calling
      
      	usb_enable_autosuspend(struct usb_device *udev);
      
      in their probe() routine, if they know that the device is capable of
      suspending and resuming correctly.  This is exactly equivalent to
      writing "auto" to the device's power/control attribute."
      
      For Intel Bluetooth device, the autosuspend needs to be enabled so the
      device can transit to LPM(Low Power Mode) and ULPM(Ultra LPM) states after
      receiving suspend message from the host.
      Signed-off-by: default avatarTedd Ho-Jeong An <tedd.an@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      d2bee8fb
    • Tedd Ho-Jeong An's avatar
      Bluetooth: Add support for Intel Bluetooth device [8087:0a2a] · ef4e5e4a
      Tedd Ho-Jeong An authored
      This patch adds support for new Intel Bluetooth device.
      
      T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  4 Spd=12   MxCh= 0
      D:  Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=8087 ProdID=0a2a Rev= 0.01
      C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=1ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      E:  Ad=82(I) 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=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      E:  Ad=83(I) 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=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      E:  Ad=83(I) 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=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      E:  Ad=83(I) 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=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      E:  Ad=83(I) 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=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      E:  Ad=83(I) 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=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      Signed-off-by: default avatarTedd Ho-Jeong An <tedd.an@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      ef4e5e4a
    • Andre Guedes's avatar
      Bluetooth: Refactor hci_disconn_complete_evt · 3846220b
      Andre Guedes authored
      hci_disconn_complete_evt() logic is more complicated than what it
      should be, making it hard to follow and add new features.
      
      So this patch does some code refactoring by handling the error cases
      in the beginning of the function and by moving the main flow into the
      first level of function scope. No change is done in the event handling
      logic itself.
      
      Besides organizing this messy code, this patch makes easier to add
      code for handling LE auto connection (which will be added in a further
      patch).
      Signed-off-by: default avatarAndre Guedes <andre.guedes@openbossa.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      3846220b