diff --git a/components/ieee802154/driver/esp_ieee802154_debug.c b/components/ieee802154/driver/esp_ieee802154_debug.c index 7dec983213..71847308b6 100644 --- a/components/ieee802154/driver/esp_ieee802154_debug.c +++ b/components/ieee802154/driver/esp_ieee802154_debug.c @@ -375,6 +375,7 @@ void ieee802154_txrx_statistic_print(void) #define IEEE802154_RX_BUFFER_GET_USED_LEVEL(a) (((a) * IEEE802154_RX_BUFFER_USED_TOTAL_LEVEL) / (CONFIG_IEEE802154_RX_BUFFER_SIZE + 1)) static uint16_t s_rx_buffer_used_nums = 0; static uint64_t s_rx_buffer_used_water_level[IEEE802154_RX_BUFFER_USED_TOTAL_LEVEL + 1]; + void ieee802154_rx_buffer_statistic_is_free(bool is_free) { if (is_free) { @@ -394,7 +395,7 @@ void ieee802154_rx_buffer_statistic_clear(void) memset((void*)s_rx_buffer_used_water_level, 0, sizeof(uint64_t)*(IEEE802154_RX_BUFFER_USED_TOTAL_LEVEL + 1)); } -void ieee802154_rx_buffer_statistic_printf(void) +void ieee802154_rx_buffer_statistic_print(void) { uint64_t total_times = 0; for (uint8_t i = 0; i < (IEEE802154_RX_BUFFER_USED_TOTAL_LEVEL + 1); i++) { diff --git a/components/ieee802154/driver/esp_ieee802154_dev.c b/components/ieee802154/driver/esp_ieee802154_dev.c index ad3ce1e2de..62ab86a298 100644 --- a/components/ieee802154/driver/esp_ieee802154_dev.c +++ b/components/ieee802154/driver/esp_ieee802154_dev.c @@ -88,9 +88,7 @@ static void ieee802154_receive_done(uint8_t *data, esp_ieee802154_frame_info_t * { // If the RX done packet is written in the stub buffer, drop it silently. IEEE802154_RX_BUFFER_STAT_IS_FREE(false); - if (s_rx_index == CONFIG_IEEE802154_RX_BUFFER_SIZE) { - esp_rom_printf("receive buffer full, drop the current frame.\n"); - } else { + if (s_rx_index != CONFIG_IEEE802154_RX_BUFFER_SIZE) { // Otherwise, post it to the upper layer. // Ignore bit8 for the frame length, due to the max frame length is 127 based 802.15.4 spec. data[0] = data[0] & 0x7f; diff --git a/components/ieee802154/esp_ieee802154.c b/components/ieee802154/esp_ieee802154.c index 7e9e2bcea5..76cdcfb6f7 100644 --- a/components/ieee802154/esp_ieee802154.c +++ b/components/ieee802154/esp_ieee802154.c @@ -423,9 +423,9 @@ void esp_ieee802154_rx_buffer_statistic_clear(void) ieee802154_rx_buffer_statistic_clear(); } -void esp_ieee802154_rx_buffer_statistic_printf(void) +void esp_ieee802154_rx_buffer_statistic_print(void) { - ieee802154_rx_buffer_statistic_printf(); + ieee802154_rx_buffer_statistic_print(); } #endif // CONFIG_IEEE802154_RX_BUFFER_STATISTIC diff --git a/components/ieee802154/include/esp_ieee802154.h b/components/ieee802154/include/esp_ieee802154.h index 90ffb2b41a..5ad7998d79 100644 --- a/components/ieee802154/include/esp_ieee802154.h +++ b/components/ieee802154/include/esp_ieee802154.h @@ -635,7 +635,7 @@ void esp_ieee802154_rx_buffer_statistic_clear(void); * @brief Clear the current IEEE802.15.4 rx buffer statistic. * */ -void esp_ieee802154_rx_buffer_statistic_printf(void); +void esp_ieee802154_rx_buffer_statistic_print(void); #endif // CONFIG_IEEE802154_RX_BUFFER_STATISTIC #if CONFIG_IEEE802154_RECORD diff --git a/components/ieee802154/private_include/esp_ieee802154_util.h b/components/ieee802154/private_include/esp_ieee802154_util.h index 843e34117c..f33fc5823c 100644 --- a/components/ieee802154/private_include/esp_ieee802154_util.h +++ b/components/ieee802154/private_include/esp_ieee802154_util.h @@ -277,12 +277,12 @@ void ieee802154_rx_buffer_statistic_clear(void); * @brief Print the current IEEE802.15.4 rx buffer statistic. * */ -void ieee802154_rx_buffer_statistic_printf(void); +void ieee802154_rx_buffer_statistic_print(void); #define IEEE802154_RX_BUFFER_STAT_IS_FREE(a) ieee802154_rx_buffer_statistic_is_free(a) #else #define IEEE802154_RX_BUFFER_STAT_IS_FREE(a) -#endif +#endif // CONFIG_IEEE802154_RX_BUFFER_STATISTIC // TODO: replace etm code using common interface diff --git a/examples/ieee802154/ieee802154_cli/components/cmd_ieee802154/ieee802154_cmd.c b/examples/ieee802154/ieee802154_cli/components/cmd_ieee802154/ieee802154_cmd.c index bef801beb4..00d62cf73c 100644 --- a/examples/ieee802154/ieee802154_cli/components/cmd_ieee802154/ieee802154_cmd.c +++ b/examples/ieee802154/ieee802154_cli/components/cmd_ieee802154/ieee802154_cmd.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ diff --git a/examples/ieee802154/ieee802154_cli/components/cmd_ieee802154_stats/ieee802154_stats.c b/examples/ieee802154/ieee802154_cli/components/cmd_ieee802154_stats/ieee802154_stats.c index dbda393bdc..2941be74d4 100644 --- a/examples/ieee802154/ieee802154_cli/components/cmd_ieee802154_stats/ieee802154_stats.c +++ b/examples/ieee802154/ieee802154_cli/components/cmd_ieee802154_stats/ieee802154_stats.c @@ -56,7 +56,7 @@ static int process_rx_buffer_statistic(int argc, char **argv) return 1; } if (rx_buff_stat_args.print->count) { - esp_ieee802154_rx_buffer_statistic_printf(); + esp_ieee802154_rx_buffer_statistic_print(); } if (rx_buff_stat_args.clear->count) { esp_ieee802154_rx_buffer_statistic_clear();