fix(bt): Update bt lib for ESP32(dc1cd581)

- Remove unused functions in the controller
- Add an SDK config for the minimum size of encryption key
This commit is contained in:
chenjianhua
2025-03-11 20:53:26 +08:00
parent 8685219916
commit b1f85271ff
4 changed files with 49 additions and 14 deletions

View File

@@ -252,7 +252,16 @@ extern uint32_t _bt_controller_data_end;
extern void config_bt_funcs_reset(void);
extern void config_ble_funcs_reset(void);
extern void config_btdm_funcs_reset(void);
extern void config_ble_vs_qa_funcs_reset(void);
#ifdef CONFIG_BT_BLUEDROID_ENABLED
extern void bt_stack_enableSecCtrlVsCmd(bool en);
#endif // CONFIG_BT_BLUEDROID_ENABLED
#if defined(CONFIG_BT_NIMBLE_ENABLED) || defined(CONFIG_BT_BLUEDROID_ENABLED)
extern void bt_stack_enableCoexVsCmd(bool en);
extern void scan_stack_enableAdvFlowCtrlVsCmd(bool en);
extern void adv_stack_enableClearLegacyAdvVsCmd(bool en);
extern void advFilter_stack_enableDupExcListVsCmd(bool en);
#endif // (CONFIG_BT_NIMBLE_ENABLED) || (CONFIG_BT_BLUEDROID_ENABLED)
/* Local Function Declare
*********************************************************************
@@ -1703,6 +1712,16 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
goto error;
}
#ifdef CONFIG_BT_BLUEDROID_ENABLED
bt_stack_enableSecCtrlVsCmd(true);
#endif // CONFIG_BT_BLUEDROID_ENABLED
#if defined(CONFIG_BT_NIMBLE_ENABLED) || defined(CONFIG_BT_BLUEDROID_ENABLED)
bt_stack_enableCoexVsCmd(true);
scan_stack_enableAdvFlowCtrlVsCmd(true);
adv_stack_enableClearLegacyAdvVsCmd(true);
advFilter_stack_enableDupExcListVsCmd(true);
#endif // (CONFIG_BT_NIMBLE_ENABLED) || (CONFIG_BT_BLUEDROID_ENABLED)
btdm_controller_status = ESP_BT_CONTROLLER_STATUS_INITED;
return ESP_OK;
@@ -1728,6 +1747,16 @@ esp_err_t esp_bt_controller_deinit(void)
bt_controller_deinit_internal();
#ifdef CONFIG_BT_BLUEDROID_ENABLED
bt_stack_enableSecCtrlVsCmd(false);
#endif // CONFIG_BT_BLUEDROID_ENABLED
#if defined(CONFIG_BT_NIMBLE_ENABLED) || defined(CONFIG_BT_BLUEDROID_ENABLED)
bt_stack_enableCoexVsCmd(false);
scan_stack_enableAdvFlowCtrlVsCmd(false);
adv_stack_enableClearLegacyAdvVsCmd(false);
advFilter_stack_enableDupExcListVsCmd(false);
#endif // (CONFIG_BT_NIMBLE_ENABLED) || (CONFIG_BT_BLUEDROID_ENABLED)
return ESP_OK;
}
@@ -1812,10 +1841,6 @@ static void patch_apply(void)
#ifndef CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY
config_ble_funcs_reset();
#endif
#ifdef CONFIG_BTDM_BLE_VS_QA_SUPPORT
config_ble_vs_qa_funcs_reset();
#endif
}
esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)