[PATCH v2] src/device.c : Fix BREDR-ATT MTU issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For BREDR-ATT, according to spec, ATT MTU is same has
L2CAP configured MTU on which ATT is running and there won't be
ATT MTU exchange procedure. So, set the MTU to L2CAP MTU for
BREDR-ATT and for LE-ATT adjust the ATT MTU based on
EXCHANGE_MTU request and response.
---
 src/device.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/device.c b/src/device.c
index f693b70..02bdd7c 100644
--- a/src/device.c
+++ b/src/device.c
@@ -4922,7 +4922,10 @@ bool device_attach_att(struct btd_device *dev, GIOChannel *io)
 	}
 
 	dev->att_mtu = MIN(mtu, BT_ATT_MAX_LE_MTU);
-	attrib = g_attrib_new(io, BT_ATT_DEFAULT_LE_MTU, false);
+	if (cid == ATT_CID)
+		attrib = g_attrib_new(io, BT_ATT_DEFAULT_LE_MTU, false);
+	else
+		attrib = g_attrib_new(io, dev->att_mtu, false);
 	if (!attrib) {
 		error("Unable to create new GAttrib instance");
 		return false;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux