Skip to content

Bluetooth: LE CoC support

[email protected] linux-bluetooth 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest32 patches 3 repliesIn review
  2. v131 patches 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/32Bluetooth: Remove unnecessary braces from one-line if-statementnet/bluetooth/l2cap_core.c+2 -30 replies
2/32Bluetooth: Add module parameter to enable LE CoC supportinclude/net/bluetooth/l2cap.h net/bluetooth/l2cap_sock.c+13 -60 replies
3/32Bluetooth: Update l2cap_global_chan_by_psm() to take a link typenet/bluetooth/l2cap_core.c+11 -30 replies
4/32Bluetooth: Allow l2cap_chan_check_security() to be used for LE links.net/bluetooth/l2cap_core.c+3 -00 replies
5/32Bluetooth: Pass command length to LE signaling channel handlersnet/bluetooth/l2cap_core.c+6 -60 replies
6/32Bluetooth: Move LE L2CAP initiator procedure to its own functionnet/bluetooth/l2cap_core.c+6 -10 replies
7/32Bluetooth: Add definitions for LE connection oriented channelsinclude/net/bluetooth/l2cap.h+31 -00 replies
8/32Bluetooth: Add initial code for LE L2CAP Connect Requestnet/bluetooth/l2cap_core.c+98 -80 replies
9/32Bluetooth: Add smp_sufficient_security helper functionnet/bluetooth/smp.c net/bluetooth/smp.h+13 -40 replies
10/32Bluetooth: Refactor L2CAP connect rejection to its own functionnet/bluetooth/l2cap_core.c+24 -180 replies
11/32Bluetooth: Add basic LE L2CAP connect request receiving supportinclude/net/bluetooth/l2cap.h net/bluetooth/l2cap_core.c+151 -00 replies
12/32Bluetooth: Fix L2CAP channel closing for LE connectionsnet/bluetooth/l2cap_core.c+4 -20 replies
13/32Bluetooth: Add L2CAP Disconnect suppport for LEnet/bluetooth/l2cap_core.c+7 -00 replies
14/32Bluetooth: Make l2cap_le_sig_cmd logic consistentnet/bluetooth/l2cap_core.c+16 -80 replies
15/32Bluetooth: Add LE L2CAP flow control modeinclude/net/bluetooth/l2cap.h net/bluetooth/l2cap_core.c net/bluetooth/l2cap_sock.c+38 -30 replies
16/32Bluetooth: Track LE L2CAP credits in l2cap_chaninclude/net/bluetooth/l2cap.h net/bluetooth/l2cap_core.c net/bluetooth/l2cap_sock.c+16 -50 replies
17/32Bluetooth: Limit L2CAP_OPTIONS socket option usage with LEnet/bluetooth/l2cap_sock.c+15 -00 replies
18/32Bluetooth: Add new BT_SNDMTU and BT_RCVMTU socket optionsinclude/net/bluetooth/bluetooth.h net/bluetooth/l2cap_sock.c+55 -00 replies
19/32Bluetooth: Implement returning of LE L2CAP creditsnet/bluetooth/l2cap_core.c+26 -00 replies
20/32Bluetooth: Add LE flow control disciplinenet/bluetooth/l2cap_core.c+66 -10 replies
21/32Bluetooth: Reject LE CoC commands when the feature is not enablednet/bluetooth/l2cap_core.c+11 -00 replies
22/32Bluetooth: Introduce L2CAP channel callback for suspendinginclude/net/bluetooth/l2cap.h net/bluetooth/l2cap_sock.c+10 -00 replies
23/32Bluetooth: Add LE L2CAP segmentation support for outgoing datanet/bluetooth/l2cap_core.c+126 -10 replies
24/32Bluetooth: Implement LE L2CAP reassemblynet/bluetooth/l2cap_core.c+76 -30 replies
25/32Bluetooth: Fix LE L2CAP Connect Request handling together with SMPinclude/net/bluetooth/l2cap.h net/bluetooth/l2cap_core.c+4 -00 replies
26/32Bluetooth: Fix suspending the L2CAP socket if we start with 0 creditsnet/bluetooth/l2cap_core.c+3 -00 replies
27/32Bluetooth: Limit LE MPS to the MTU valuenet/bluetooth/l2cap_core.c+14 -40 replies
28/32Bluetooth: Fix clearing of chan->omtu for LE CoC channelsnet/bluetooth/l2cap_core.c+4 -40 replies
29/32Bluetooth: Fix CID ranges for LE CoC CID allocationsinclude/net/bluetooth/l2cap.h net/bluetooth/l2cap_core.c+8 -20 replies
30/32Bluetooth: Fix validating LE PSM valuesnet/bluetooth/l2cap_core.c net/bluetooth/l2cap_sock.c+44 -112 replies
31/32Bluetooth: Add debugfs controls for LE CoC MPS and Creditsnet/bluetooth/l2cap_core.c+12 -40 replies
32/32Bluetooth: Simplify l2cap_chan initialization for LE CoCinclude/net/bluetooth/l2cap.h net/bluetooth/l2cap_core.c net/bluetooth/l2cap_sock.c+13 -250 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/32] Bluetooth: LE CoC support

Hi,

Here's v2 of the patches with all comments taken into account. Additionally I've fixed the permissions of the debugfs files, fixed the credits calculation for max_credits == 1, and added a cleanup patch at the end of the set for simplifying l2cap_chan initialization for LE CoC.

I've also updated user space l2test now to support the new BT_SNDMTU and BT_RCVMTU socket options, i.e. the LE CoC functionality can now be tested using upstream l2test.

Johan

----------------------------------------------------------------
Johan Hedberg (32):
Bluetooth: Remove unnecessary braces from one-line if-statement
Bluetooth: Add module parameter to enable LE CoC support
Bluetooth: Update l2cap_global_chan_by_psm() to take a link type
Bluetooth: Allow l2cap_chan_check_security() to be used for LE links.
Bluetooth: Pass command length to LE signaling channel handlers
Bluetooth: Move LE L2CAP initiator procedure to its own function
Bluetooth: Add definitions for LE connection oriented channels
Bluetooth: Add initial code for LE L2CAP Connect Request
Bluetooth: Add smp_sufficient_security helper function
Bluetooth: Refactor L2CAP connect rejection to its own function
Bluetooth: Add basic LE L2CAP connect request receiving support
Bluetooth: Fix L2CAP channel closing for LE connections
Bluetooth: Add L2CAP Disconnect suppport for LE
Bluetooth: Make l2cap_le_sig_cmd logic consistent
Bluetooth: Add LE L2CAP flow control mode
Bluetooth: Track LE L2CAP credits in l2cap_chan
Bluetooth: Limit L2CAP_OPTIONS socket option usage with LE
Bluetooth: Add new BT_SNDMTU and BT_RCVMTU socket options
Bluetooth: Implement returning of LE L2CAP credits
Bluetooth: Add LE flow control discipline
Bluetooth: Reject LE CoC commands when the feature is not enabled
Bluetooth: Introduce L2CAP channel callback for suspending
Bluetooth: Add LE L2CAP segmentation support for outgoing data
Bluetooth: Implement LE L2CAP reassembly
Bluetooth: Fix LE L2CAP Connect Request handling together with SMP
Bluetooth: Fix suspending the L2CAP socket if we start with 0 credits
Bluetooth: Limit LE MPS to the MTU value
Bluetooth: Fix clearing of chan->omtu for LE CoC channels
Bluetooth: Fix CID ranges for LE CoC CID allocations
Bluetooth: Fix validating LE PSM values
Bluetooth: Add debugfs controls for LE CoC MPS and Credits
Bluetooth: Simplify l2cap_chan initialization for LE CoC

 include/net/bluetooth/bluetooth.h |   3 +
 include/net/bluetooth/l2cap.h     |  45 +++
 net/bluetooth/l2cap_core.c        | 720 ++++++++++++++++++++++++++++++++++---
 net/bluetooth/l2cap_sock.c        | 157 +++++++-
 net/bluetooth/smp.c               |  16 +-
 net/bluetooth/smp.h               |   1 +
 6 files changed, 873 insertions(+), 69 deletions(-)