From c0700d98257b2a46001566a1cb87a622c97138ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Battrel?= Date: Wed, 27 Mar 2024 10:43:58 +0100 Subject: [PATCH] Bluetooth: L2CAP: Reword K-frame comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The terminology was not following the Spec wording. Signed-off-by: Théo Battrel --- subsys/bluetooth/host/l2cap.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/subsys/bluetooth/host/l2cap.c b/subsys/bluetooth/host/l2cap.c index 0a736112a49..75e8bc396bd 100644 --- a/subsys/bluetooth/host/l2cap.c +++ b/subsys/bluetooth/host/l2cap.c @@ -3072,25 +3072,24 @@ static int bt_l2cap_dyn_chan_send(struct bt_l2cap_le_chan *le_chan, struct net_b return -EINVAL; } - /* Prepend SDU "header". + /* Prepend SDU length. * - * L2CAP LE CoC SDUs are segmented into PDUs and sent over so-called - * K-frames that each have their own L2CAP header (ie channel, PDU - * length). + * L2CAP LE CoC SDUs are segmented and put into K-frames PDUs which have + * their own L2CAP header (i.e. PDU length, channel id). * - * The SDU header is right before the data that will be segmented and is - * only present in the first segment/PDU. Here's an example: + * The SDU length is right before the data that will be segmented and is + * only present in the first PDU. Here's an example: * * Sent data payload of 50 bytes over channel 0x4040 with MPS of 30 bytes: - * First PDU / segment / K-frame: + * First PDU (K-frame): * | L2CAP K-frame header | K-frame payload | - * | PDU length | Channel ID | SDU header | SDU payload | - * | 30 | 0x4040 | 50 | 28 bytes of data | + * | PDU length | Channel ID | SDU length | SDU payload | + * | 0x001e | 0x4040 | 0x0032 | 28 bytes of data | * - * Second and last PDU / segment / K-frame: + * Second and last PDU (K-frame): * | L2CAP K-frame header | K-frame payload | * | PDU length | Channel ID | rest of SDU payload | - * | 22 | 0x4040 | 22 bytes of data | + * | 0x0016 | 0x4040 | 22 bytes of data | */ net_buf_push_le16(buf, sdu_len);