1. 11 Apr, 2013 3 commits
    • Claudio Takahasi's avatar
      Bluetooth: Fix SCO connection reference · ea323c11
      Claudio Takahasi authored
      This patch fixes decrementing SCO connection reference right after
      stablishing the SCO connection with defer setup enabled. The dump below
      shows a disconnection command with handle 0, the connection is still in
      BT_CONNECT2 state and there isn't a handle associated with it.
      
      < HCI Command: Accept Synchronous Connection (0x01|0x0029) plen 21
        bdaddr 78:47:1D:B3:72:6C
      > HCI Event: Command Status (0x0f) plen 4
        Accept Synchronous Connection (0x01|0x0029) status 0x00 ncmd 1
      < HCI Command: Disconnect (0x01|0x0006) plen 3
        handle 0 reason 0x13
        Reason: Remote User Terminated Connection
      > HCI Event: Command Status (0x0f) plen 4
        Disconnect (0x01|0x0006) status 0x00 ncmd 1
      > HCI Event: Synchronous Connect Complete (0x2c) plen 17
        status 0x00 handle 46 bdaddr 78:47:1D:B3:72:6C
        type eSCO
        Air mode: CVSD
      < SCO data: handle 46 flags 0x00 dlen 48
      Signed-off-by: default avatarClaudio Takahasi <claudio.takahasi@openbossa.org>
      Signed-off-by: default avatarVinicius Costa Gomes <vinicius.gomes@openbossa.org>
      Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
      ea323c11
    • David Herrmann's avatar
      Bluetooth: rename hci_conn_put to hci_conn_drop · 76a68ba0
      David Herrmann authored
      We use _get() and _put() for device ref-counting in the kernel. However,
      hci_conn_put() is _not_ used for ref-counting, hence, rename it to
      hci_conn_drop() so we can later fix ref-counting and introduce
      hci_conn_put().
      
      hci_conn_hold() and hci_conn_put() are currently used to manage how long a
      connection should be held alive. When the last user drops the connection,
      we spawn a delayed work that performs the disconnect. Obviously, this has
      nothing to do with ref-counting for the _object_ but rather for the
      keep-alive of the connection.
      
      But we really _need_ proper ref-counting for the _object_ to allow
      connection-users like rfcomm-tty, HIDP or others.
      Signed-off-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
      Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
      76a68ba0
    • Marcel Holtmann's avatar
      Bluetooth: Use separate function for BCM92035 vendor setup · 9f8f962c
      Marcel Holtmann authored
      Trying to squeeze every single vendor setup routine into the same function
      and have it assigned all the time is actually a bad idea. Especially since
      the core can handle the absence of a setup routine perfectly fine.
      
      To make this a lot simpler for future additions of vendor setup code,
      split the BCM92035 setup into its own function and only assign it when
      this specific device has been detected.
      
      Doing it like this has the nice side benefit that we do not have to keep
      a copy of the driver_info around.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
      9f8f962c
  2. 06 Apr, 2013 2 commits
  3. 04 Apr, 2013 14 commits
  4. 03 Apr, 2013 21 commits