Skip to content

Commit

Permalink
Merge branch 'bugfix/coex_enable_disable_not_in_pairs_v4.4' into 'rel…
Browse files Browse the repository at this point in the history
…ease/v4.4'

bluetooth: fix that functions "coex_enable" and "coex_disable" are not used in pairs(backport v4.4)

See merge request espressif/esp-idf!22095
  • Loading branch information
jack0c committed Feb 3, 2023
2 parents 56083a1 + 86b2779 commit a60b89b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion components/bt/controller/esp32c3/bt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,7 @@ static void bt_controller_deinit_internal(void)

esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
{
int ret = ESP_OK;
esp_err_t ret = ESP_OK;

if (btdm_controller_status != ESP_BT_CONTROLLER_STATUS_INITED) {
return ESP_ERR_INVALID_STATE;
Expand Down Expand Up @@ -1437,6 +1437,9 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
#endif
} while (0);

#if CONFIG_SW_COEXIST_ENABLE
coex_disable();
#endif
return ret;
}

Expand Down
5 changes: 4 additions & 1 deletion components/bt/controller/esp32s3/bt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,7 @@ static void bt_controller_deinit_internal(void)

esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
{
int ret = ESP_OK;
esp_err_t ret = ESP_OK;

if (btdm_controller_status != ESP_BT_CONTROLLER_STATUS_INITED) {
return ESP_ERR_INVALID_STATE;
Expand Down Expand Up @@ -1483,6 +1483,9 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
#endif
} while (0);

#if CONFIG_SW_COEXIST_ENABLE
coex_disable();
#endif
return ret;
}

Expand Down

0 comments on commit a60b89b

Please sign in to comment.