Skip to content

Commit a5c32a5

Browse files
feat(ble): support configurable rxbuf opt feat on ESP32-C5
1 parent 5fbbec8 commit a5c32a5

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

components/bt/controller/esp32c5/Kconfig.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,3 +784,7 @@ config BT_LE_CTRL_ADV_DATA_LENGTH_ZERO_AUX
784784
When this option is enabled, auxiliary packets will be present in the events of
785785
'Non-Connectable and Non-Scannable' regardless of whether the advertising length is 0.
786786
If this option is not enabled, auxiliary packets will only be present when the advertising length is not 0.
787+
788+
config BT_LE_RXBUF_OPT_ENABLED
789+
bool "Enable rxbuf optimization feature"
790+
default y

components/bt/controller/esp32c5/ble.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ void adv_stack_enableScanReqRxdVsEvent(bool en);
4444
void conn_stack_enableChanMapUpdCompVsEvent(bool en);
4545
void sleep_stack_enableWakeupVsEvent(bool en);
4646
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
47+
#if CONFIG_BT_LE_RXBUF_OPT_ENABLED
48+
extern void mmgmt_enableRxbufOptFeature(void);
49+
#endif // CONFIG_BT_LE_RXBUF_OPT_ENABLED
4750

4851
/* Local functions definition
4952
***************************************************************************
@@ -137,6 +140,10 @@ int ble_stack_enable(void)
137140
ble_stack_enableVsEvents(true);
138141
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
139142

143+
#if CONFIG_BT_LE_RXBUF_OPT_ENABLED
144+
mmgmt_enableRxbufOptFeature();
145+
#endif // CONFIG_BT_LE_RXBUF_OPT_ENABLED
146+
140147
return 0;
141148
}
142149

0 commit comments

Comments
 (0)