From 45b16f747872ee81cd22a8df969d128eb907ef07 Mon Sep 17 00:00:00 2001 From: Harsh Jain Date: Tue, 19 Dec 2023 16:27:50 +0530 Subject: [PATCH] Bluetooth: Increase write data limit in l2cap connection. This patch increases write limit in l2cap connection from 672 Bytes to 4096 Bytes. Change-Id: I7a294036ae963ef1a08b31113674317d388e2a18 Signed-off-by: Harsh Jain --- bt-api/bt-l2cap-le-client.c | 1 + bt-api/bt-l2cap-le-server.c | 1 + 2 files changed, 2 insertions(+) diff --git a/bt-api/bt-l2cap-le-client.c b/bt-api/bt-l2cap-le-client.c index 7c986a3..ede1723 100644 --- a/bt-api/bt-l2cap-le-client.c +++ b/bt-api/bt-l2cap-le-client.c @@ -139,6 +139,7 @@ static gboolean __client_data_received_cb(GIOChannel *chan, GIOCondition cond, } buffer = g_malloc0(BT_L2CAP_LE_BUFFER_LEN + 1); + g_io_channel_set_buffer_size(chan, BT_L2CAP_LE_BUFFER_LEN); status = g_io_channel_read_chars(chan, buffer, BT_L2CAP_LE_BUFFER_LEN, &len, &err); if (status != G_IO_STATUS_NORMAL) { diff --git a/bt-api/bt-l2cap-le-server.c b/bt-api/bt-l2cap-le-server.c index b57e97f..a4e767c 100644 --- a/bt-api/bt-l2cap-le-server.c +++ b/bt-api/bt-l2cap-le-server.c @@ -428,6 +428,7 @@ static gboolean __data_received_cb(GIOChannel *chan, GIOCondition cond, } buffer = g_malloc0(BT_L2CAP_LE_BUFFER_LEN + 1); + g_io_channel_set_buffer_size(chan, BT_L2CAP_LE_BUFFER_LEN); status = g_io_channel_read_chars(chan, buffer, BT_L2CAP_LE_BUFFER_LEN, &len, &err); if (status != G_IO_STATUS_NORMAL) { -- 2.7.4