From: Nagaraj D R Date: Thu, 17 May 2018 10:50:05 +0000 (+0530) Subject: src/device.c : Fix BREDR-ATT MTU issue X-Git-Tag: submit/tizen/20180531.061844~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F89%2F179389%2F2;p=platform%2Fupstream%2Fbluez.git src/device.c : Fix BREDR-ATT MTU issue 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. Change-Id: Icd402edbfa7ddb82e808ebf695096b7a872ebc14 --- diff --git a/src/device.c b/src/device.c index bd1b87e..08a0234 100644 --- a/src/device.c +++ b/src/device.c @@ -7142,7 +7142,9 @@ bool device_attach_att(struct btd_device *dev, GIOChannel *io) #endif dev->att_mtu = MIN(mtu, BT_ATT_MAX_LE_MTU); - attrib = g_attrib_new(io, BT_ATT_DEFAULT_LE_MTU, false); + attrib = g_attrib_new(io, + cid == ATT_CID ? BT_ATT_DEFAULT_LE_MTU : dev->att_mtu, + false); if (!attrib) { error("Unable to create new GAttrib instance"); return false;