1. 21 8月, 2014 1 次提交
    • J
      Bluetooth: Fix hci_conn reference counting for auto-connections · f161dd41
      Johan Hedberg 提交于
      Recently the LE passive scanning and auto-connections feature was
      introduced. It uses the hci_connect_le() API which returns a hci_conn
      along with a reference count to that object. All previous users would
      tie this returned reference to some existing object, such as an L2CAP
      channel, and there'd be no leaked references this way. For
      auto-connections however the reference was returned but not stored
      anywhere, leaving established connections with one higher reference
      count than they should have.
      
      Instead of playing special tricks with hci_conn_hold/drop this patch
      associates the returned reference from hci_connect_le() with the object
      that in practice does own this reference, i.e. the hci_conn_params
      struct that caused us to initiate a connection in the first place. Once
      the connection is established or fails to establish this reference is
      removed appropriately.
      
      One extra thing needed is to call hci_pend_le_actions_clear() before
      calling hci_conn_hash_flush() so that the reference is cleared before
      the hci_conn objects are fully removed.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      f161dd41
  2. 27 7月, 2014 1 次提交
  3. 24 7月, 2014 1 次提交
    • M
      Bluetooth: Fix issue with ADV_IND reports and auto-connection handling · 4b9e7e75
      Marcel Holtmann 提交于
      When adding remote devices to the kernel using the Add Device management
      command, these devices are explicitly allowed to connect. This kind of
      incoming connections are possible even when the controller itself is
      not connectable.
      
      For BR/EDR this distinction is pretty simple since there is only one
      type of incoming connections. With LE this is not that simple anymore
      since there are ADV_IND and ADV_DIRECT_IND advertising events.
      
      The ADV_DIRECT_IND advertising events are send for incoming (slave
      initiated) connections only. And this is the only thing the kernel
      should allow when adding devices using action 0x01. This meaning
      of incoming connections is coming from BR/EDR and needs to be
      mapped to LE the same way.
      
      Supporting the auto-connection of devices using ADV_IND advertising
      events is an important feature as well. However it does not map to
      incoming connections. So introduce a new action 0x02 that allows
      the kernel to connect to devices using ADV_DIRECT_IND and in addition
      ADV_IND advertising reports.
      
      This difference is represented by the new HCI_AUTO_CONN_DIRECT value
      for only connecting to ADV_DIRECT_IND. For connection to ADV_IND and
      ADV_DIRECT_IND the old value HCI_AUTO_CONN_ALWAYS is used.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      4b9e7e75
  4. 17 7月, 2014 2 次提交
  5. 16 7月, 2014 4 次提交
  6. 11 7月, 2014 4 次提交
  7. 10 7月, 2014 3 次提交
  8. 09 7月, 2014 3 次提交
  9. 08 7月, 2014 1 次提交
  10. 07 7月, 2014 2 次提交
  11. 06 7月, 2014 2 次提交
  12. 05 7月, 2014 1 次提交
  13. 04 7月, 2014 7 次提交
  14. 03 7月, 2014 8 次提交