mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-07 13:42:43 +00:00
fix(esp_phy): Add protection of consecutive disable operations by single modem source
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -134,8 +134,9 @@ void esp_phy_disable(esp_phy_modem_t modem)
|
||||
#if CONFIG_ESP_PHY_RECORD_USED_TIME
|
||||
phy_record_time(false, modem);
|
||||
#endif
|
||||
esp_phy_modem_t saved_modem = phy_get_modem_flag();
|
||||
phy_clr_modem_flag(modem);
|
||||
if (phy_get_modem_flag() == 0) {
|
||||
if (saved_modem == modem) {
|
||||
|
||||
#if !CONFIG_ESP_PHY_DISABLE_PLL_TRACK
|
||||
phy_track_pll_deinit();
|
||||
|
Reference in New Issue
Block a user