1. 16 5月, 2014 1 次提交
  2. 10 5月, 2014 1 次提交
  3. 27 3月, 2014 2 次提交
  4. 20 3月, 2014 1 次提交
  5. 13 3月, 2014 1 次提交
  6. 01 3月, 2014 2 次提交
    • J
      Bluetooth: Remove unnecessary stop_scan_complete function · 81ad6fd9
      Johan Hedberg 提交于
      The stop_scan_complete function was used as an intermediate step before
      doing the actual connection creation. Since we're using hci_request
      there's no reason to have this extra function around, i.e. we can simply
      put both HCI commands into the same request.
      
      The single task that the intermediate function had, i.e. indicating
      discovery as stopped is now taken care of by a new
      HCI_LE_SCAN_INTERRUPTED flag which allows us to do the discovery state
      update when the stop scan command completes.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      81ad6fd9
    • J
      Bluetooth: Fix trying to disable scanning twice · 317ac8cb
      Johan Hedberg 提交于
      The discovery process has a timer for disabling scanning, however
      scanning might be disabled through other means too like the auto-connect
      process.  We should therefore ensure that the timer is never active
      after sending a HCI command to disable scanning.
      
      There was some existing code in stop_scan_complete trying to avoid the
      timer when a connect request interrupts a discovery procedure, but the
      other way around was not covered. This patch covers both scenarios by
      canceling the timer as soon as we get a successful command complete for
      the disabling HCI command.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      317ac8cb
  7. 28 2月, 2014 3 次提交
  8. 27 2月, 2014 6 次提交
    • A
      Bluetooth: Introduce LE auto connection infrastructure · a4790dbd
      Andre Guedes 提交于
      This patch introduces the LE auto connection infrastructure which
      will be used to implement the LE auto connection options.
      
      In summary, the auto connection mechanism works as follows: Once the
      first pending LE connection is created, the background scanning is
      started. When the target device is found in range, the kernel
      autonomously starts the connection attempt. If connection is
      established successfully, that pending LE connection is deleted and
      the background is stopped.
      
      To achieve that, this patch introduces the hci_update_background_scan()
      which controls the background scanning state. This function starts or
      stops the background scanning based on the hdev->pend_le_conns list. If
      there is no pending LE connection, the background scanning is stopped.
      Otherwise, we start the background scanning.
      
      Then, every time a pending LE connection is added we call hci_update_
      background_scan() so the background scanning is started (in case it is
      not already running). Likewise, every time a pending LE connection is
      deleted we call hci_update_background_scan() so the background scanning
      is stopped (in case this was the last pending LE connection) or it is
      started again (in case we have more pending LE connections). Finally,
      we also call hci_update_background_scan() in hci_le_conn_failed() so
      the background scan is restarted in case the connection establishment
      fails. This way the background scanning keeps running until all pending
      LE connection are established.
      
      At this point, resolvable addresses are not support by this
      infrastructure. The proper support is added in upcoming patches.
      Signed-off-by: NAndre Guedes <andre.guedes@openbossa.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      a4790dbd
    • A
      Bluetooth: Move address type conversion to outside hci_connect_le · 6f77d8c7
      Andre Guedes 提交于
      This patch moves address type conversion (L2CAP address type to HCI
      address type) to outside hci_connect_le. This way, we avoid back and
      forth address type conversion in a comming patch.
      
      So hci_connect_le() now expects 'dst_type' parameter in HCI address
      type convention.
      Signed-off-by: NAndre Guedes <andre.guedes@openbossa.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      6f77d8c7
    • A
      Bluetooth: Refactor HCI connection code · 04a6c589
      Andre Guedes 提交于
      hci_connect() is a very simple and useless wrapper of hci_connect_acl
      and hci_connect_le functions. Addtionally, all places where hci_connect
      is called the link type value is passed explicitly. This way, we can
      safely delete hci_connect, declare hci_connect_acl and hci_connect_le
      in hci_core.h and call them directly.
      
      No functionality is changed by this patch.
      Signed-off-by: NAndre Guedes <andre.guedes@openbossa.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      04a6c589
    • A
      Bluetooth: Remove unused function · c99ed834
      Andre Guedes 提交于
      This patch removes hci_create_le_conn() since it is not used anymore.
      Signed-off-by: NAndre Guedes <andre.guedes@openbossa.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      c99ed834
    • A
      Bluetooth: Stop scanning on LE connection · 2acf3d90
      Andre Guedes 提交于
      Some LE controllers don't support scanning and creating a connection
      at the same time. So we should always stop scanning in order to
      establish the connection.
      
      Since we may prematurely stop the discovery procedure in favor of
      the connection establishment, we should also cancel hdev->le_scan_
      disable delayed work and set the discovery state to DISCOVERY_STOPPED.
      
      This change does a small improvement since it is not mandatory the
      user stops scanning before connecting anymore. Moreover, this change
      is required by upcoming LE auto connection mechanism in order to work
      properly with controllers that don't support background scanning and
      connection establishment at the same time.
      
      In future, we might want to do a small optimization by checking if
      controller is able to scan and connect at the same time. For now,
      we want the simplest approach so we always stop scanning (even if
      the controller is able to carry out both operations).
      Signed-off-by: NAndre Guedes <andre.guedes@openbossa.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      2acf3d90
    • A
      Bluetooth: Declare le_conn_failed in hci_core.h · 06c053fb
      Andre Guedes 提交于
      This patch adds the "hci_" prefix to le_conn_failed() helper and
      declares it in hci_core.h so it can be reused in hci_event.c.
      Signed-off-by: NAndre Guedes <andre.guedes@openbossa.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      06c053fb
  9. 24 2月, 2014 3 次提交
  10. 19 2月, 2014 3 次提交
  11. 13 2月, 2014 7 次提交
  12. 19 10月, 2013 2 次提交
  13. 17 10月, 2013 2 次提交
  14. 13 10月, 2013 3 次提交
  15. 12 10月, 2013 1 次提交
  16. 11 10月, 2013 2 次提交