From 47ff8535209235c4089b41706732a72b37ce2dba Mon Sep 17 00:00:00 2001 From: Zhou Xiao Date: Thu, 17 Apr 2025 10:54:33 +0800 Subject: [PATCH] feat(ble): support configurable rxbuf opt feat on ESP32-C6 (cherry picked from commit 5fbbec86551ac6d015045a5c5d6b2e293b8e9b1a) Co-authored-by: cjin --- components/bt/controller/esp32c6/Kconfig.in | 4 ++++ components/bt/controller/esp32c6/ble.c | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/components/bt/controller/esp32c6/Kconfig.in b/components/bt/controller/esp32c6/Kconfig.in index a9e59ae032..d0120d6f82 100644 --- a/components/bt/controller/esp32c6/Kconfig.in +++ b/components/bt/controller/esp32c6/Kconfig.in @@ -818,3 +818,7 @@ config BT_LE_CTRL_ADV_DATA_LENGTH_ZERO_AUX When this option is enabled, auxiliary packets will be present in the events of 'Non-Connectable and Non-Scannable' regardless of whether the advertising length is 0. If this option is not enabled, auxiliary packets will only be present when the advertising length is not 0. + +config BT_LE_RXBUF_OPT_ENABLED + bool "Enable rxbuf optimization feature" + default y diff --git a/components/bt/controller/esp32c6/ble.c b/components/bt/controller/esp32c6/ble.c index f93f15e9b8..a1eb137489 100644 --- a/components/bt/controller/esp32c6/ble.c +++ b/components/bt/controller/esp32c6/ble.c @@ -47,6 +47,9 @@ void adv_stack_enableScanReqRxdVsEvent(bool en); void conn_stack_enableChanMapUpdCompVsEvent(bool en); void sleep_stack_enableWakeupVsEvent(bool en); #endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED) +#if CONFIG_BT_LE_RXBUF_OPT_ENABLED +extern void mmgmt_enableRxbufOptFeature(void); +#endif // CONFIG_BT_LE_RXBUF_OPT_ENABLED /* Local functions definition *************************************************************************** @@ -143,6 +146,10 @@ int ble_stack_enable(void) ble_stack_enableVsEvents(true); #endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED) +#if CONFIG_BT_LE_RXBUF_OPT_ENABLED + mmgmt_enableRxbufOptFeature(); +#endif // CONFIG_BT_LE_RXBUF_OPT_ENABLED + return 0; }