Bluetooth: Fix incorrect LE CoC PDU length restriction based on HCI MTU
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 15 Aug 2014 18:06:51 +0000 (21:06 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Oct 2014 16:38:23 +0000 (09:38 -0700)
commit30861ec2cc9b4a14741facdb4ef2faede0959147
tree08f53383617f1ae2d0f88d71735418bfb04d6385
parent93d192a930c7b5bd97f1f77f90d298703896fdd3
Bluetooth: Fix incorrect LE CoC PDU length restriction based on HCI MTU

commit 72c6fb915ff2d30ae14053edee4f0d30019bad76 upstream.

The l2cap_create_le_flowctl_pdu() function that l2cap_segment_le_sdu()
calls is perfectly capable of doing packet fragmentation if given bigger
PDUs than the HCI buffers allow. Forcing the PDU length based on the HCI
MTU (conn->mtu) would therefore needlessly strict operation on hardware
with limited LE buffers (e.g. both Intel and Broadcom seem to have this
set to just 27 bytes).

This patch removes the restriction and makes it possible to send PDUs of
the full length that the remote MPS value allows.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bluetooth/l2cap_core.c