Bluetooth: Increase write data limit in l2cap connection. 44/303244/1
authorHarsh Jain <jain.harsh@samsung.com>
Tue, 19 Dec 2023 10:57:50 +0000 (16:27 +0530)
committerHarsh Jain <jain.harsh@samsung.com>
Fri, 22 Dec 2023 04:53:44 +0000 (10:23 +0530)
This patch increases write limit in l2cap connection
from 672 Bytes to 4096 Bytes.

Change-Id: I7a294036ae963ef1a08b31113674317d388e2a18
Signed-off-by: Harsh Jain <jain.harsh@samsung.com>
bt-api/bt-l2cap-le-client.c
bt-api/bt-l2cap-le-server.c

index 7c986a3adf74215371ae7d374428362fc8cef69f..ede17235c47de90057dc823d51f6a230c1e02953 100644 (file)
@@ -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) {
index b57e97f4b56a2f0ffc8cf3cd922be44435f30d29..a4e767cc130bf6b9f381638614e3f69a705e41bf 100644 (file)
@@ -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) {