提交 069cb270 编写于 作者: L Lukasz Rymanowski 提交者: Marcel Holtmann

Bluetooth: Improve data packing in SAR mode

There is no need to decrease pdu size with L2CAP SDU lenght in Start
L2CAP SDU frame. Start packtet is just 2 bytes longer as specified and
we can keep payload as long as possible.

When testing SAR L2CAP against PTS, L2CAP channel is usually configured
in that way, that SDU = MPS * 3. PTS expets then 3 I-Frames from IUT: Start,
Continuation and End frame.

Without this fix, we sent 4 I-Frames. We could pass a test by using -b
option in l2test and send just two bytes less than SDU length. With this
patch no need to use -b option.
Signed-off-by: NLukasz Rymanowski <lukasz.rymanowski@tieto.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 3bbaf812
...@@ -2275,7 +2275,6 @@ static int l2cap_segment_sdu(struct l2cap_chan *chan, ...@@ -2275,7 +2275,6 @@ static int l2cap_segment_sdu(struct l2cap_chan *chan,
} else { } else {
sar = L2CAP_SAR_START; sar = L2CAP_SAR_START;
sdu_len = len; sdu_len = len;
pdu_len -= L2CAP_SDULEN_SIZE;
} }
while (len > 0) { while (len > 0) {
...@@ -2290,10 +2289,8 @@ static int l2cap_segment_sdu(struct l2cap_chan *chan, ...@@ -2290,10 +2289,8 @@ static int l2cap_segment_sdu(struct l2cap_chan *chan,
__skb_queue_tail(seg_queue, skb); __skb_queue_tail(seg_queue, skb);
len -= pdu_len; len -= pdu_len;
if (sdu_len) { if (sdu_len)
sdu_len = 0; sdu_len = 0;
pdu_len += L2CAP_SDULEN_SIZE;
}
if (len <= pdu_len) { if (len <= pdu_len) {
sar = L2CAP_SAR_END; sar = L2CAP_SAR_END;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册