aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMat Martineau <mathewm@codeaurora.org>2012-10-23 18:24:21 -0400
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-10-23 22:25:50 -0400
commita549574da39f0a6df68ffdb72dd015d04a8486de (patch)
tree337d782429480806fa91ce6b1fd587fa6189ff9d
parent36c86c8566cec67924ae6f372d9066cc9e92ad0e (diff)
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>
-rw-r--r--net/bluetooth/l2cap_core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 6662ee34e754..ef86ebb92a00 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -2272,7 +2272,9 @@ static int l2cap_segment_sdu(struct l2cap_chan *chan,
2272 /* PDU size is derived from the HCI MTU */ 2272 /* PDU size is derived from the HCI MTU */
2273 pdu_len = chan->conn->mtu; 2273 pdu_len = chan->conn->mtu;
2274 2274
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);
2276 2278
2277 /* Adjust for largest possible L2CAP overhead. */ 2279 /* Adjust for largest possible L2CAP overhead. */
2278 if (chan->fcs) 2280 if (chan->fcs)