An error occurred fetching the project authors.
  1. 14 Oct, 2018 2 commits
  2. 27 Sep, 2018 2 commits
  3. 12 Apr, 2017 1 commit
  4. 29 Jan, 2016 1 commit
  5. 05 Nov, 2015 1 commit
  6. 23 Jul, 2015 2 commits
  7. 19 Dec, 2014 1 commit
  8. 09 Dec, 2014 3 commits
  9. 03 Dec, 2014 1 commit
  10. 02 Dec, 2014 1 commit
    • Johan Hedberg's avatar
      Bluetooth: Track both local and remote L2CAP fixed channel mask · 0bd49fc7
      Johan Hedberg authored
      To pave the way for future fixed channels to be added easily we should
      track both the local and remote mask on a per-L2CAP connection (struct
      l2cap_conn) basis. So far the code has used a global variable in a racy
      way which anyway needs fixing.
      
      This patch renames the existing conn->fixed_chan_mask that tracked
      the remote mask to conn->remote_fixed_chan and adds a new variable
      conn->local_fixed_chan to track the local mask. Since the HS support
      info is now available in the local mask we can remove the
      conn->hs_enabled variable.
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      0bd49fc7
  11. 13 Nov, 2014 1 commit
    • Johan Hedberg's avatar
      Bluetooth: Use proper nesting annotation for l2cap_chan lock · abe84903
      Johan Hedberg authored
      By default lockdep considers all L2CAP channels equal. This would mean
      that we get warnings if a channel is locked when another one's lock is
      tried to be acquired in the same thread. This kind of inter-channel
      locking dependencies exist in the form of parent-child channels as well
      as any channel wishing to elevate the security by requesting procedures
      on the SMP channel.
      
      To eliminate the chance for these lockdep warnings we introduce a
      nesting level for each channel and use that when acquiring the channel
      lock. For now there exists the earlier mentioned three identified
      categories: SMP, "normal" channels and parent channels (i.e. those in
      BT_LISTEN state). The nesting level is defined as atomic_t since we need
      access to it before the lock is actually acquired.
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      abe84903
  12. 08 Sep, 2014 4 commits
    • Johan Hedberg's avatar
      Bluetooth: Move identity address update behind a workqueue · f3d82d0c
      Johan Hedberg authored
      The identity address update of all channels for an l2cap_conn needs to
      take the lock for each channel, i.e. it's safest to do this by a
      separate workqueue callback.
      
      Previously this was partially solved by moving the entire SMP key
      distribution behind a workqueue. However, if we want SMP context locking
      to be correct and safe we should always use the l2cap_chan lock when
      accessing it, meaning even smp_distribute_keys needs to take that lock
      which would once again create a dead lock when updating the identity
      address.
      
      The simplest way to solve this is to have l2cap_conn manage the deferred
      work which is what this patch does. A subsequent patch will remove the
      now unnecessary SMP key distribution work struct.
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      f3d82d0c
    • Johan Hedberg's avatar
      Bluetooth: Remove unused l2cap_conn_shutdown API · b04afa0c
      Johan Hedberg authored
      Now that there are no more users of the l2cap_conn_shutdown API (since
      smp.c switched to using hci_disconnect) we can simply remove it along
      with all of it's l2cap_conn variables.
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      b04afa0c
    • Johan Hedberg's avatar
      Bluetooth: Improve *_get() functions to return the object type · 51bb8457
      Johan Hedberg authored
      It's natural to have *_get() functions that increment the reference
      count of an object to return the object type itself. This way it's
      simple to make a copy of the object pointer and increase the reference
      count in a single step. This patch updates two such get() functions,
      namely hci_conn_get() and l2cap_conn_get(), and updates the users to
      take advantage of the new API.
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      51bb8457
    • Johan Hedberg's avatar
      Bluetooth: Fix hci_conn reference counting for fixed channels · c16900cf
      Johan Hedberg authored
      Now that SMP has been converted to use fixed channels we've got a bit of
      a problem with the hci_conn reference counting. So far the L2CAP code
      has kept a reference for each L2CAP channel that was notified of the
      connection. With SMP however this would mean that the connection is
      never dropped even though there are no other users of it. Furthermore,
      SMP already does its own hci_conn reference counting internally,
      starting from a security or pairing request and ending with the key
      distribution.
      
      This patch makes L2CAP fixed channels default to the L2CAP core not
      keeping a hci_conn reference for them. A new FLAG_HOLD_HCI_CONN flag is
      added so that L2CAP users can declare an exception to this rule and hold
      a reference even for their fixed channels. One such exception is the
      L2CAP socket layer which does want a reference for each socket (e.g. an
      ATT socket which uses a fixed channel).
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      c16900cf
  13. 14 Aug, 2014 6 commits
  14. 17 Jul, 2014 1 commit
  15. 13 Jul, 2014 1 commit
  16. 11 Jul, 2014 1 commit
  17. 03 Jul, 2014 5 commits
  18. 18 Feb, 2014 1 commit
  19. 14 Feb, 2014 1 commit
  20. 13 Feb, 2014 3 commits
  21. 11 Dec, 2013 1 commit