This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit cae60fb4a00251e738a0a7fc9a4be1abf65b88aa Author: chengkai <[email protected]> AuthorDate: Mon Dec 25 17:46:02 2023 +0800 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 <[email protected]> --- 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 5c07b46856..bdcad8f9ff 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 4b0a87e9bd..3f15c1e999 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;
