From 4528d2299d9b23587f67e4dee6e520cf6d4ace39 Mon Sep 17 00:00:00 2001 From: xiaqilin Date: Mon, 25 Mar 2024 15:50:48 +0800 Subject: [PATCH 1/2] fix(ieee802154): fix ieee802154 include header file issue and unused value issue --- .../ieee802154/private_include/esp_ieee802154_util.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/components/ieee802154/private_include/esp_ieee802154_util.h b/components/ieee802154/private_include/esp_ieee802154_util.h index 0d0268f422..44ca598061 100644 --- a/components/ieee802154/private_include/esp_ieee802154_util.h +++ b/components/ieee802154/private_include/esp_ieee802154_util.h @@ -8,6 +8,8 @@ #include #include +#include "sdkconfig.h" +#include "soc/soc_caps.h" #include "esp_ieee802154_dev.h" #include "hal/ieee802154_ll.h" #include "esp_timer.h" @@ -172,7 +174,7 @@ extern ieee802154_probe_info_t g_ieee802154_probe; */ void ieee802154_assert_print(void); #define IEEE802154_ASSERT(a) do { \ - if(!(a)) { \ + if(unlikely(!(a))) { \ ieee802154_assert_print(); \ assert(a); \ } \ @@ -280,9 +282,9 @@ void ieee802154_set_txrx_pti(ieee802154_txrx_scene_t txrx_scene); #endif // !CONFIG_IEEE802154_TEST && CONFIG_ESP_COEX_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE /** - * @brief Convert the frequence to the index of channel. + * @brief Convert the frequency to the index of channel. * - * @param[in] freq The frequence where the radio is processing. + * @param[in] freq The frequency where the radio is processing. * * @return * The channel index. @@ -291,12 +293,12 @@ void ieee802154_set_txrx_pti(ieee802154_txrx_scene_t txrx_scene); uint8_t ieee802154_freq_to_channel(uint8_t freq); /** - * @brief Convert the index of channel to the frequence. + * @brief Convert the index of channel to the frequency. * * @param[in] channel The index of channel where the radio is processing. * * @return - * The frequence. + * The frequency. * */ uint8_t ieee802154_channel_to_freq(uint8_t channel); From f0d0463a937005ee0ab5034252d0df4a383365be Mon Sep 17 00:00:00 2001 From: xiaqilin Date: Mon, 15 Apr 2024 21:39:13 +0800 Subject: [PATCH 2/2] fix(ieee802154): fix ieee802154 next operation acquire lock in interrupt --- components/ieee802154/driver/esp_ieee802154_dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/ieee802154/driver/esp_ieee802154_dev.c b/components/ieee802154/driver/esp_ieee802154_dev.c index 803d387246..2da1d69c0e 100644 --- a/components/ieee802154/driver/esp_ieee802154_dev.c +++ b/components/ieee802154/driver/esp_ieee802154_dev.c @@ -362,7 +362,9 @@ static IRAM_ATTR void next_operation(void) enable_rx(); } else { ieee802154_set_state(IEEE802154_STATE_IDLE); +#if !CONFIG_IEEE802154_TEST ieee802154_sleep(); +#endif } } }