Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1212cb07 authored by Matthew Xie's avatar Matthew Xie Committed by Android Git Automerger
Browse files

am 50964e39: Merge "Bluedroid: Fix HCI buffer size issue"

* commit '50964e39':
  Bluedroid: Fix HCI buffer size issue
parents 51ea38e6 50964e39
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -66,9 +66,8 @@
#endif
#endif  // (BTHC_LINUX_BASE_POLICY != SCHED_NORMAL)

#ifndef BTHC_USERIAL_READ_MEM_SIZE
#define BTHC_USERIAL_READ_MEM_SIZE (1024)
#endif
#define HCI_ACL_MAX_SIZE 1024
#define HCI_MAX_FRAME_SIZE (HCI_ACL_MAX_SIZE + 4)

#ifndef BTSNOOPDISP_INCLUDED
#define BTSNOOPDISP_INCLUDED TRUE
+3 −4
Original line number Diff line number Diff line
@@ -58,7 +58,6 @@
#endif

#define MAX_SERIAL_PORT (USERIAL_PORT_3 + 1)
#define READ_LIMIT (BTHC_USERIAL_READ_MEM_SIZE - BT_HC_HDR_SIZE)

enum {
    USERIAL_RX_EXIT,
@@ -255,8 +254,8 @@ static void *userial_read_thread(void *arg)
    {
        if (bt_hc_cbacks)
        {
            p_buf = (HC_BT_HDR *) bt_hc_cbacks->alloc( \
                                                BTHC_USERIAL_READ_MEM_SIZE);
            p_buf = (HC_BT_HDR *) bt_hc_cbacks->alloc(
                        BT_HC_HDR_SIZE + HCI_MAX_FRAME_SIZE + 1); /* H4 HDR = 1 */
        }
        else
            p_buf = NULL;
@@ -267,7 +266,7 @@ static void *userial_read_thread(void *arg)
            p_buf->layer_specific = 0;

            p = (uint8_t *) (p_buf + 1);
            rx_length = select_read(userial_cb.fd, p, READ_LIMIT);
            rx_length = select_read(userial_cb.fd, p, HCI_MAX_FRAME_SIZE + 1);
        }
        else
        {