Skip to content

Commit

Permalink
Merge branch 'bugfix/coex_cfg_option_invisible' into 'master'
Browse files Browse the repository at this point in the history
fix(esp_coex): Fix dependency errors in coexist configuration

Closes BT-3435

See merge request espressif/esp-idf!26484
  • Loading branch information
jack0c committed Oct 18, 2023
2 parents 9f413d5 + 11efe6e commit 249e45a
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 53 deletions.
4 changes: 2 additions & 2 deletions components/bt/controller/esp32c2/Kconfig.in
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ config BT_LE_MAX_CONNECTIONS
choice BT_LE_COEX_PHY_CODED_TX_RX_TLIM
prompt "Coexistence: limit on MAX Tx/Rx time for coded-PHY connection"
default BT_LE_COEX_PHY_CODED_TX_RX_TLIM_DIS
depends on !BT_NIMBLE_ENABLED
depends on ESP_COEX_SW_COEXIST_ENABLE
help
When using PHY-Coded in BLE connection, limitation on max tx/rx time can be applied to
better avoid dramatic performance deterioration of Wi-Fi.
Expand All @@ -376,7 +376,7 @@ endchoice

config BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
int
depends on !BT_NIMBLE_ENABLED
default 0 if !ESP_COEX_SW_COEXIST_ENABLE
default 1 if BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EN
default 0 if BT_LE_COEX_PHY_CODED_TX_RX_TLIM_DIS

Expand Down
7 changes: 2 additions & 5 deletions components/bt/controller/esp32c2/esp_bt_cfg.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -40,7 +40,6 @@ extern "C" {
#define DEFAULT_BT_NIMBLE_WHITELIST_SIZE MYNEWT_VAL(BLE_LL_WHITELIST_SIZE)
#define DEFAULT_BT_LE_HCI_EVT_HI_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_COUNT)
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_DISCARDABLE_COUNT)
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_NIMBLE_COEX_PHY_CODED_TX_RX_TLIM_EFF

#else

Expand Down Expand Up @@ -116,11 +115,9 @@ extern "C" {
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT (8)
#endif

#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF

#endif


#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF

#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
#define HCI_UART_EN CONFIG_BT_LE_HCI_INTERFACE_USE_UART
Expand Down
4 changes: 2 additions & 2 deletions components/bt/controller/esp32c3/Kconfig.in
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ config BT_CTRL_MESH_DUPL_SCAN_CACHE_SIZE
choice BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM
prompt "Coexistence: limit on MAX Tx/Rx time for coded-PHY connection"
default BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS
depends on ESP_WIFI_SW_COEXIST_ENABLE
depends on ESP_COEX_SW_COEXIST_ENABLE
help
When using PHY-Coded in BLE connection, limitation on max tx/rx time can be applied to
better avoid dramatic performance deterioration of Wi-Fi.
Expand All @@ -364,7 +364,7 @@ endchoice

config BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EFF
int
default 0 if (!ESP_WIFI_SW_COEXIST_ENABLE)
default 0 if !ESP_COEX_SW_COEXIST_ENABLE
default 1 if BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EN
default 0 if BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS

Expand Down
4 changes: 2 additions & 2 deletions components/bt/controller/esp32c6/Kconfig.in
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ config BT_LE_MAX_CONNECTIONS
choice BT_LE_COEX_PHY_CODED_TX_RX_TLIM
prompt "Coexistence: limit on MAX Tx/Rx time for coded-PHY connection"
default BT_LE_COEX_PHY_CODED_TX_RX_TLIM_DIS
depends on !BT_NIMBLE_ENABLED
depends on ESP_COEX_SW_COEXIST_ENABLE
help
When using PHY-Coded in BLE connection, limitation on max tx/rx time can be applied to
better avoid dramatic performance deterioration of Wi-Fi.
Expand All @@ -383,7 +383,7 @@ endchoice

config BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
int
depends on !BT_NIMBLE_ENABLED
default 0 if !ESP_COEX_SW_COEXIST_ENABLE
default 1 if BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EN
default 0 if BT_LE_COEX_PHY_CODED_TX_RX_TLIM_DIS

Expand Down
5 changes: 1 addition & 4 deletions components/bt/controller/esp32c6/esp_bt_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ extern "C" {
#define DEFAULT_BT_NIMBLE_WHITELIST_SIZE MYNEWT_VAL(BLE_LL_WHITELIST_SIZE)
#define DEFAULT_BT_LE_HCI_EVT_HI_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_COUNT)
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_DISCARDABLE_COUNT)
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_NIMBLE_COEX_PHY_CODED_TX_RX_TLIM_EFF
#define DEFAULT_BT_LE_POWER_CONTROL_ENABLED MYNEWT_VAL(BLE_POWER_CONTROL)
#else

Expand Down Expand Up @@ -115,16 +114,14 @@ extern "C" {
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT (8)
#endif

#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF

#if defined(CONFIG_BT_LE_POWER_CONTROL_ENABLED)
#define DEFAULT_BT_LE_POWER_CONTROL_ENABLED (CONFIG_BT_LE_POWER_CONTROL_ENABLED)
#else
#define DEFAULT_BT_LE_POWER_CONTROL_ENABLED (0)
#endif
#endif


#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF

#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
#define HCI_UART_EN CONFIG_BT_LE_HCI_INTERFACE_USE_UART
Expand Down
4 changes: 2 additions & 2 deletions components/bt/controller/esp32h2/Kconfig.in
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ config BT_LE_MAX_CONNECTIONS
choice BT_LE_COEX_PHY_CODED_TX_RX_TLIM
prompt "Coexistence: limit on MAX Tx/Rx time for coded-PHY connection"
default BT_LE_COEX_PHY_CODED_TX_RX_TLIM_DIS
depends on !BT_NIMBLE_ENABLED
depends on ESP_COEX_SW_COEXIST_ENABLE
help
When using PHY-Coded in BLE connection, limitation on max tx/rx time can be applied to
better avoid dramatic performance deterioration of Wi-Fi.
Expand All @@ -383,7 +383,7 @@ endchoice

config BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
int
depends on !BT_NIMBLE_ENABLED
default 0 if !ESP_COEX_SW_COEXIST_ENABLE
default 1 if BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EN
default 0 if BT_LE_COEX_PHY_CODED_TX_RX_TLIM_DIS

Expand Down
5 changes: 1 addition & 4 deletions components/bt/controller/esp32h2/esp_bt_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ extern "C" {
#define DEFAULT_BT_NIMBLE_WHITELIST_SIZE MYNEWT_VAL(BLE_LL_WHITELIST_SIZE)
#define DEFAULT_BT_LE_HCI_EVT_HI_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_COUNT)
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_DISCARDABLE_COUNT)
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_NIMBLE_COEX_PHY_CODED_TX_RX_TLIM_EFF
#define DEFAULT_BT_LE_POWER_CONTROL_ENABLED MYNEWT_VAL(BLE_POWER_CONTROL)
#else

Expand Down Expand Up @@ -115,16 +114,14 @@ extern "C" {
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT (8)
#endif

#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF

#if defined(CONFIG_BT_LE_POWER_CONTROL_ENABLED)
#define DEFAULT_BT_LE_POWER_CONTROL_ENABLED (CONFIG_BT_LE_POWER_CONTROL_ENABLED)
#else
#define DEFAULT_BT_LE_POWER_CONTROL_ENABLED (0)
#endif
#endif


#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF

#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
#define HCI_UART_EN CONFIG_BT_LE_HCI_INTERFACE_USE_UART
Expand Down
26 changes: 0 additions & 26 deletions components/bt/host/nimble/Kconfig.in
Original file line number Diff line number Diff line change
Expand Up @@ -611,32 +611,6 @@ config BT_NIMBLE_PERIODIC_ADV_ENH
help
Enable the periodic advertising enhancements

choice BT_NIMBLE_COEX_PHY_CODED_TX_RX_TLIM
prompt "Coexistence: limit on MAX Tx/Rx time for coded-PHY connection"
default BT_NIMBLE_COEX_PHY_CODED_TX_RX_TLIM_DIS
depends on ESP_WIFI_SW_COEXIST_ENABLE && BT_NIMBLE_ENABLED
help
When using PHY-Coded in BLE connection, limitation on max tx/rx time can be applied to
better avoid dramatic performance deterioration of Wi-Fi.

config BT_NIMBLE_COEX_PHY_CODED_TX_RX_TLIM_EN
bool "Force Enable"
help
Always enable the limitation on max tx/rx time for Coded-PHY connection

config BT_NIMBLE_COEX_PHY_CODED_TX_RX_TLIM_DIS
bool "Force Disable"
help
Disable the limitation on max tx/rx time for Coded-PHY connection
endchoice

config BT_NIMBLE_COEX_PHY_CODED_TX_RX_TLIM_EFF
int
default 0 if !(ESP_WIFI_SW_COEXIST_ENABLE && BT_NIMBLE_ENABLED)
default 1 if BT_NIMBLE_COEX_PHY_CODED_TX_RX_TLIM_EN
default 0 if BT_NIMBLE_COEX_PHY_CODED_TX_RX_TLIM_DIS


config BT_NIMBLE_WHITELIST_SIZE
int "BLE white list size"
depends on BT_NIMBLE_ENABLED
Expand Down
7 changes: 2 additions & 5 deletions components/bt/include/esp32h4/include/esp_bt_cfg.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -41,7 +41,6 @@ extern "C" {
#define DEFAULT_BT_NIMBLE_WHITELIST_SIZE MYNEWT_VAL(BLE_LL_WHITELIST_SIZE)
#define DEFAULT_BT_LE_HCI_EVT_HI_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_COUNT)
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_DISCARDABLE_COUNT)
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_NIMBLE_COEX_PHY_CODED_TX_RX_TLIM_EFF

#else

Expand Down Expand Up @@ -117,11 +116,9 @@ extern "C" {
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT (8)
#endif

#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF

#endif


#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF

#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
#define HCI_UART_EN CONFIG_BT_LE_HCI_INTERFACE_USE_UART
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ CONFIG_SPIRAM_IGNORE_NOTFOUND=y
#
# Wi-Fi
#
CONFIG_ESP_WIFI_SW_COEXIST_ENABLE=y
CONFIG_ESP_COEX_SW_COEXIST_ENABLE=y
CONFIG_ESP_WIFI_SW_COEXIST_PREFERENCE_BALANCE=y
CONFIG_ESP_WIFI_SW_COEXIST_PREFERENCE_VALUE=2
CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=16
Expand Down

0 comments on commit 249e45a

Please sign in to comment.