1. 02 Oct, 2013 12 commits
  2. 27 Sep, 2013 1 commit
  3. 25 Sep, 2013 7 commits
  4. 23 Sep, 2013 1 commit
    • Ken O'Brien's avatar
      Bluetooth: btusb: Add support for Belkin F8065bf · 5bcecf32
      Ken O'Brien authored
      Add generic rule on encountering Belkin bluetooth usb device F8065bf.
      
      Relevant section from /sys/kernel/debug/usb/devices:
      
      T:  Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
      D:  Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=050d ProdID=065a Rev= 1.12
      S:  Manufacturer=Broadcom Corp
      S:  Product=BCM20702A0
      S:  SerialNumber=0002723E2D29
      C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=100mA
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) 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=ff(vend.) 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=ff(vend.) 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
      Signed-off-by: default avatarKen O'Brien <kernel@kenobrien.org>
      Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
      5bcecf32
  5. 22 Sep, 2013 1 commit
  6. 20 Sep, 2013 1 commit
    • Gianluca Anzolin's avatar
      Bluetooth: don't release the port in rfcomm_dev_state_change() · 29cd718b
      Gianluca Anzolin authored
      When the dlc is closed, rfcomm_dev_state_change() tries to release the
      port in the case it cannot get a reference to the tty. However this is
      racy and not even needed.
      
      Infact as Peter Hurley points out:
      
      1. Only consider dlcs that are 'stolen' from a connected socket, ie.
         reused. Allocated dlcs cannot have been closed prior to port
         activate and so for these dlcs a tty reference will always be avail
         in rfcomm_dev_state_change() -- except for the conditions covered by
         #2b below.
      2. If a tty was at some point previously created for this rfcomm, then
         either
         (a) the tty reference is still avail, so rfcomm_dev_state_change()
             will perform a hangup. So nothing to do, or,
         (b) the tty reference is no longer avail, and the tty_port will be
             destroyed by the last tty_port_put() in rfcomm_tty_cleanup.
             Again, no action required.
      3. Prior to obtaining the dlc lock in rfcomm_dev_add(),
         rfcomm_dev_state_change() will not 'see' a rfcomm_dev so nothing to
         do here.
      4. After releasing the dlc lock in rfcomm_dev_add(),
         rfcomm_dev_state_change() will 'see' an incomplete rfcomm_dev if a
         tty reference could not be obtained. Again, the best thing to do here
         is nothing. Any future attempted open() will block on
         rfcomm_dev_carrier_raised(). The unconnected device will exist until
         released by ioctl(RFCOMMRELEASEDEV).
      
      The patch removes the aforementioned code and uses the
      tty_port_tty_hangup() helper to hangup the tty.
      Signed-off-by: default avatarGianluca Anzolin <gianluca@sottospazio.it>
      Reviewed-by: default avatarPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
      29cd718b
  7. 19 Sep, 2013 2 commits
  8. 18 Sep, 2013 10 commits
  9. 16 Sep, 2013 5 commits
    • Syam Sidhardhan's avatar
      Bluetooth: Fix ACL alive for long in case of non pariable devices · 330b6c15
      Syam Sidhardhan authored
      For certain devices (ex: HID mouse), support for authentication,
      pairing and bonding is optional. For such devices, the ACL alive
      for too long after the L2CAP disconnection.
      
      To avoid the ACL alive for too long after L2CAP disconnection, reset the
      ACL disconnect timeout back to HCI_DISCONN_TIMEOUT during L2CAP connect.
      
      While merging the commit id:a9ea3ed9
      this issue might have introduced.
      
      Hcidump info:
      sh-4.1# /opt/hcidump -Xt
      2013-08-05 16:49:00.894129 < ACL data: handle 12 flags 0x00 dlen 12
          L2CAP(s): Disconn req: dcid 0x004a scid 0x0041
      2013-08-05 16:49:00.894195 < HCI Command: Exit Sniff Mode (0x02|0x0004)
          plen 2
          handle 12
      2013-08-05 16:49:00.894269 < ACL data: handle 12 flags 0x00 dlen 12
          L2CAP(s): Disconn req: dcid 0x0049 scid 0x0040
      2013-08-05 16:49:00.895645 > HCI Event: Command Status (0x0f) plen 4
          Exit Sniff Mode (0x02|0x0004) status 0x00 ncmd 1
      2013-08-05 16:49:00.934391 > HCI Event: Mode Change (0x14) plen 6
          status 0x00 handle 12 mode 0x00 interval 0
          Mode: Active
      2013-08-05 16:49:00.936592 > HCI Event: Number of Completed Packets
          (0x13) plen 5
          handle 12 packets 2
      2013-08-05 16:49:00.951577 > ACL data: handle 12 flags 0x02 dlen 12
          L2CAP(s): Disconn rsp: dcid 0x004a scid 0x0041
      2013-08-05 16:49:00.952820 > ACL data: handle 12 flags 0x02 dlen 12
          L2CAP(s): Disconn rsp: dcid 0x0049 scid 0x0040
      2013-08-05 16:49:00.969165 > HCI Event: Mode Change (0x14) plen 6
          status 0x00 handle 12 mode 0x02 interval 50
          Mode: Sniff
      
      2013-08-05 16:49:48.175533 > HCI Event: Mode Change (0x14) plen 6
          status 0x00 handle 12 mode 0x00 interval 0
          Mode: Active
      2013-08-05 16:49:48.219045 > HCI Event: Mode Change (0x14) plen 6
          status 0x00 handle 12 mode 0x02 interval 108
          Mode: Sniff
      
      2013-08-05 16:51:00.968209 < HCI Command: Disconnect (0x01|0x0006) plen 3
          handle 12 reason 0x13
          Reason: Remote User Terminated Connection
      2013-08-05 16:51:00.969056 > HCI Event: Command Status (0x0f) plen 4
          Disconnect (0x01|0x0006) status 0x00 ncmd 1
      2013-08-05 16:51:01.013495 > HCI Event: Mode Change (0x14) plen 6
          status 0x00 handle 12 mode 0x00 interval 0
          Mode: Active
      2013-08-05 16:51:01.073777 > HCI Event: Disconn Complete (0x05) plen 4
          status 0x00 handle 12 reason 0x16
          Reason: Connection Terminated by Local Host
      
      ============================ After  fix ================================
      
      2013-08-05 16:57:35.986648 < ACL data: handle 11 flags 0x00 dlen 12
          L2CAP(s): Disconn req: dcid 0x004c scid 0x0041
      2013-08-05 16:57:35.986713 < HCI Command: Exit Sniff Mode (0x02|0x0004)
          plen 2
          handle 11
      2013-08-05 16:57:35.986785 < ACL data: handle 11 flags 0x00 dlen 12
          L2CAP(s): Disconn req: dcid 0x004b scid 0x0040
      2013-08-05 16:57:35.988110 > HCI Event: Command Status (0x0f) plen 4
          Exit Sniff Mode (0x02|0x0004) status 0x00 ncmd 1
      2013-08-05 16:57:36.030714 > HCI Event: Mode Change (0x14) plen 6
          status 0x00 handle 11 mode 0x00 interval 0
          Mode: Active
      2013-08-05 16:57:36.032950 > HCI Event: Number of Completed Packets
          (0x13) plen 5
          handle 11 packets 2
      2013-08-05 16:57:36.047926 > ACL data: handle 11 flags 0x02 dlen 12
          L2CAP(s): Disconn rsp: dcid 0x004c scid 0x0041
      2013-08-05 16:57:36.049200 > ACL data: handle 11 flags 0x02 dlen 12
          L2CAP(s): Disconn rsp: dcid 0x004b scid 0x0040
      2013-08-05 16:57:36.065509 > HCI Event: Mode Change (0x14) plen 6
          status 0x00 handle 11 mode 0x02 interval 50
          Mode: Sniff
      
      2013-08-05 16:57:40.052006 < HCI Command: Disconnect (0x01|0x0006) plen 3
          handle 11 reason 0x13
          Reason: Remote User Terminated Connection
      2013-08-05 16:57:40.052869 > HCI Event: Command Status (0x0f) plen 4
          Disconnect (0x01|0x0006) status 0x00 ncmd 1
      2013-08-05 16:57:40.104731 > HCI Event: Mode Change (0x14) plen 6
          status 0x00 handle 11 mode 0x00 interval 0
          Mode: Active
      2013-08-05 16:57:40.146935 > HCI Event: Disconn Complete (0x05) plen 4
          status 0x00 handle 11 reason 0x16
          Reason: Connection Terminated by Local Host
      Signed-off-by: default avatarSang-Ki Park <sangki79.park@samsung.com>
      Signed-off-by: default avatarChan-yeol Park <chanyeol.park@samsung.com>
      Signed-off-by: default avatarJaganath Kanakkassery <jaganath.k@samsung.com>
      Signed-off-by: default avatarSzymon Janc <szymon.janc@tieto.com>
      Signed-off-by: default avatarSyam Sidhardhan <s.syam@samsung.com>
      Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
      330b6c15
    • Raphael Kubo da Costa's avatar
      Bluetooth: Add support for BCM20702A0 [0b05, 17cb] · 38a172be
      Raphael Kubo da Costa authored
      Yet another vendor specific ID for this chipset; this one for the ASUS
      USB-BT400 Bluetooth 4.0 adapter.
      
      T:  Bus=03 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#=  6 Spd=12  MxCh= 0
      D:  Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=0b05 ProdID=17cb Rev=01.12
      S:  Manufacturer=Broadcom Corp
      S:  Product=BCM20702A0
      S:  SerialNumber=000272C64400
      C:  #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=100mA
      I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
      I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
      I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      I:  If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarRaphael Kubo da Costa <rakuco@FreeBSD.org>
      Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
      38a172be
    • Andre Guedes's avatar
      Bluetooth: Fix encryption key size for peripheral role · 89cbb4da
      Andre Guedes authored
      This patch fixes the connection encryption key size information when
      the host is playing the peripheral role. We should set conn->enc_key_
      size in hci_le_ltk_request_evt, otherwise it is left uninitialized.
      
      Cc: Stable <stable@vger.kernel.org>
      Signed-off-by: default avatarAndre Guedes <andre.guedes@openbossa.org>
      Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
      89cbb4da
    • Andre Guedes's avatar
      Bluetooth: Fix security level for peripheral role · f8776218
      Andre Guedes authored
      While playing the peripheral role, the host gets a LE Long Term Key
      Request Event from the controller when a connection is established
      with a bonded device. The host then informs the LTK which should be
      used for the connection. Once the link is encrypted, the host gets
      an Encryption Change Event.
      
      Therefore we should set conn->pending_sec_level instead of conn->
      sec_level in hci_le_ltk_request_evt. This way, conn->sec_level is
      properly updated in hci_encrypt_change_evt.
      
      Moreover, since we have a LTK associated to the device, we have at
      least BT_SECURITY_MEDIUM security level.
      
      Cc: Stable <stable@vger.kernel.org>
      Signed-off-by: default avatarAndre Guedes <andre.guedes@openbossa.org>
      Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
      f8776218
    • Peng Chen's avatar
      Bluetooth: Add a new PID/VID 0cf3/e005 for AR3012. · 0a3658cc
      Peng Chen authored
      usb device info:
      
      T:  Bus=06 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 15 Spd=12   MxCh= 0
      D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=0cf3 ProdID=e005 Rev= 0.02
      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=  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
      
      Cc: Stable <stable@vger.kernel.org>
      Signed-off-by: default avatarPeng Chen <pengchen@qca.qualcomm.com>
      Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
      0a3658cc