1. 03 7月, 2014 11 次提交
  2. 16 5月, 2014 3 次提交
  3. 10 5月, 2014 1 次提交
  4. 08 5月, 2014 1 次提交
  5. 28 3月, 2014 3 次提交
  6. 27 3月, 2014 4 次提交
    • J
      Bluetooth: Store also RSSI for pending advertising reports · ff5cd29f
      Johan Hedberg 提交于
      Especially in crowded environments it can become frequent that we have
      to send out whatever pending event there is stored. Since user space
      has its own filtering of small RSSI changes sending a 0 value will
      essentially force user space to wake up the higher layers (e.g. over
      D-Bus) even though the RSSI didn't actually change more than the
      threshold value.
      
      This patch adds storing also of the RSSI for pending advertising reports
      so that we report an as accurate RSSI as possible when we have to send
      out the stored information to user space.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      ff5cd29f
    • J
      Bluetooth: Fix line splitting of mgmt_device_found parameters · 73cf71d9
      Johan Hedberg 提交于
      The line was incorrectly split between the variable type and its name.
      This patch fixes the issue.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      73cf71d9
    • J
      Bluetooth: Merge ADV_IND/ADV_SCAN_IND and SCAN_RSP together · b9a6328f
      Johan Hedberg 提交于
      To avoid too many events being sent to user space and to help parsing of
      all available remote device data it makes sense for us to wait for the
      scan response and send a single merged Device Found event to user space.
      
      This patch adds a few new variables to hci_dev to track the last
      received ADV_IND/ADV_SCAN_IND, i.e. those which will cause a SCAN_REQ to
      be send in the case of active scanning. When the SCAN_RSP is received
      the pending data is passed together with the SCAN_RSP to the
      mgmt_device_found function which takes care of merging them into a
      single Device Found event.
      
      We also need a bit of extra logic to handle situations where we don't
      receive a SCAN_RSP after caching some data. In such a scenario we simply
      have to send out the pending data as it is and then operate on the new
      report as if there was no pending data.
      
      We also need to send out any pending data when scanning stops as
      well as ensure that the storage is empty at the start of a new active
      scanning session. These both cases are covered by the update to the
      hci_cc_le_set_scan_enable function in this patch.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      b9a6328f
    • J
      Bluetooth: Add scan_rsp parameter to mgmt_device_found() · 5d2e9fad
      Johan Hedberg 提交于
      In preparation for being able to merge ADV_IND/ADV_SCAN_IND and SCAN_RSP
      together into a single device found event add a second parameter to the
      mgmt_device_found function. For now all callers pass NULL as this
      parameters since we don't yet have storing of the last received
      advertising report.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      5d2e9fad
  7. 22 3月, 2014 1 次提交
  8. 20 3月, 2014 1 次提交
  9. 10 3月, 2014 2 次提交
  10. 28 2月, 2014 7 次提交
  11. 27 2月, 2014 6 次提交
    • A
      Bluetooth: Create hci_req_add_le_passive_scan helper · 8ef30fd3
      Andre Guedes 提交于
      This patches creates the public hci_req_add_le_passive_scan helper so
      it can be re-used outside hci_core.c in the next patch.
      Signed-off-by: NAndre Guedes <andre.guedes@openbossa.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      8ef30fd3
    • A
      Bluetooth: Connection parameters and resolvable address · a9b0a04c
      Andre Guedes 提交于
      We should only accept connection parameters from identity addresses
      (public or random static). Thus, we should check the address type
      in hci_conn_params_add().
      
      Additionally, since the IRK is removed during unpair, we should also
      remove the connection parameters from that device.
      Signed-off-by: NAndre Guedes <andre.guedes@openbossa.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      a9b0a04c
    • A
      Bluetooth: Introduce LE auto connect options · 9fcb18ef
      Andre Guedes 提交于
      This patch introduces the LE auto connection options: HCI_AUTO_CONN_
      ALWAYS and HCI_AUTO_CONN_LINK_LOSS. Their working mechanism are
      described as follows:
      
      The HCI_AUTO_CONN_ALWAYS option configures the kernel to always re-
      establish the connection, no matter the reason the connection was
      terminated. This feature is required by some LE profiles such as
      HID over GATT, Health Thermometer and Blood Pressure. These profiles
      require the host autonomously connect to the device as soon as it
      enters in connectable mode (start advertising) so the device is able
      to delivery notifications or indications.
      
      The BT_AUTO_CONN_LINK_LOSS option configures the kernel to re-
      establish the connection in case the connection was terminated due
      to a link loss. This feature is required by the majority of LE
      profiles such as Proximity, Find Me, Cycling Speed and Cadence and
      Time.
      Signed-off-by: NAndre Guedes <andre.guedes@openbossa.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      9fcb18ef
    • 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: Introduce hdev->pend_le_conn list · 77a77a30
      Andre Guedes 提交于
      This patch introduces the hdev->pend_le_conn list which holds the
      device addresses the kernel should autonomously connect. It also
      introduces some helper functions to manipulate the list.
      
      The list and helper functions will be used by the next patch which
      implements the LE auto connection infrastructure.
      Signed-off-by: NAndre Guedes <andre.guedes@openbossa.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      77a77a30
    • 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