From cae60fb4a00251e738a0a7fc9a4be1abf65b88aa Mon Sep 17 00:00:00 2001 From: chengkai Date: Mon, 25 Dec 2023 17:46:02 +0800 Subject: [PATCH] bluetooth: increase HCI RX buffer size. BLUETOOTH_MAX_FRAMELEN buffer size is only for LE only mode. then we need to increase HCI buffer size in BR/EDR and LE mode. Signed-off-by: chengkai --- drivers/wireless/bluetooth/Kconfig | 6 ++++++ drivers/wireless/bluetooth/bt_uart.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/wireless/bluetooth/Kconfig b/drivers/wireless/bluetooth/Kconfig index 5c07b46856c..bdcad8f9ff5 100644 --- a/drivers/wireless/bluetooth/Kconfig +++ b/drivers/wireless/bluetooth/Kconfig @@ -51,6 +51,12 @@ config BLUETOOTH_UART_DUMP ---help--- Dump the full content of all outgoing and incoming messages. +config BLUETOOTH_UART_RXBUFSIZE + int "Bluetooth UART RX Buffer size" + default 2048 + ---help--- + Bluetooth UART RX Buffer size. Default: 2048 + endif # BLUETOOTH_UART config BLUETOOTH_BRIDGE diff --git a/drivers/wireless/bluetooth/bt_uart.c b/drivers/wireless/bluetooth/bt_uart.c index 4b0a87e9bdb..3f15c1e9997 100644 --- a/drivers/wireless/bluetooth/bt_uart.c +++ b/drivers/wireless/bluetooth/bt_uart.c @@ -102,7 +102,7 @@ static ssize_t btuart_read(FAR struct btuart_upperhalf_s *upper, static void btuart_rxwork(FAR void *arg) { FAR struct btuart_upperhalf_s *upper; - uint8_t data[BLUETOOTH_MAX_FRAMELEN]; + uint8_t data[CONFIG_BLUETOOTH_UART_RXBUFSIZE]; enum bt_buf_type_e type; unsigned int hdrlen; unsigned int pktlen;