1. 02 10月, 2013 13 次提交
  2. 27 9月, 2013 1 次提交
  3. 26 9月, 2013 7 次提交
  4. 24 9月, 2013 1 次提交
    • K
      Bluetooth: btusb: Add support for Belkin F8065bf · 5bcecf32
      Ken O'Brien 提交于
      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: NKen O'Brien <kernel@kenobrien.org>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      5bcecf32
  5. 23 9月, 2013 1 次提交
  6. 21 9月, 2013 1 次提交
    • G
      Bluetooth: don't release the port in rfcomm_dev_state_change() · 29cd718b
      Gianluca Anzolin 提交于
      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: NGianluca Anzolin <gianluca@sottospazio.it>
      Reviewed-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      29cd718b
  7. 19 9月, 2013 12 次提交
  8. 17 9月, 2013 4 次提交
    • S
      Bluetooth: Fix ACL alive for long in case of non pariable devices · 330b6c15
      Syam Sidhardhan 提交于
      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: NSang-Ki Park <sangki79.park@samsung.com>
      Signed-off-by: NChan-yeol Park <chanyeol.park@samsung.com>
      Signed-off-by: NJaganath Kanakkassery <jaganath.k@samsung.com>
      Signed-off-by: NSzymon Janc <szymon.janc@tieto.com>
      Signed-off-by: NSyam Sidhardhan <s.syam@samsung.com>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      330b6c15
    • R
      Bluetooth: Add support for BCM20702A0 [0b05, 17cb] · 38a172be
      Raphael Kubo da Costa 提交于
      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: NRaphael Kubo da Costa <rakuco@FreeBSD.org>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      38a172be
    • A
      Bluetooth: Fix encryption key size for peripheral role · 89cbb4da
      Andre Guedes 提交于
      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: NAndre Guedes <andre.guedes@openbossa.org>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      89cbb4da
    • A
      Bluetooth: Fix security level for peripheral role · f8776218
      Andre Guedes 提交于
      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: NAndre Guedes <andre.guedes@openbossa.org>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      f8776218