Skip to content

Commit a549574

Browse files
Mat MartineauGustavo Padovan
authored andcommitted
Bluetooth: Ignore BR/EDR packet size constraints when fragmenting for AMP
When operating over BR/EDR, ERTM accounts for the maximum over-the-air packet size when setting the PDU size. AMP controllers do not use the same over-the-air packets, so the PDU size should only be based on the HCI MTU of the AMP controller. Signed-off-by: Mat Martineau <mathewm@codeaurora.org> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
1 parent 36c86c8 commit a549574

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎net/bluetooth/l2cap_core.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2272,7 +2272,9 @@ static int l2cap_segment_sdu(struct l2cap_chan *chan,
22722272
/* PDU size is derived from the HCI MTU */
22732273
pdu_len = chan->conn->mtu;
22742274

2275-
pdu_len = min_t(size_t, pdu_len, L2CAP_BREDR_MAX_PAYLOAD);
2275+
/* Constrain PDU size for BR/EDR connections */
2276+
if (!chan->hs_hcon)
2277+
pdu_len = min_t(size_t, pdu_len, L2CAP_BREDR_MAX_PAYLOAD);
22762278

22772279
/* Adjust for largest possible L2CAP overhead. */
22782280
if (chan->fcs)

0 commit comments

Comments
 (0)