drivers: ieee802154: do not use net stack API
Use log_stack_usage() instead, which does the same thing, safely. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
428261945b
commit
00f46df6ad
|
@ -496,9 +496,7 @@ static void cc1200_rx(struct device *dev)
|
|||
goto out;
|
||||
}
|
||||
|
||||
net_analyze_stack("CC1200 Rx Fiber stack",
|
||||
Z_THREAD_STACK_BUFFER(cc1200->rx_stack),
|
||||
K_THREAD_STACK_SIZEOF(cc1200->rx_stack));
|
||||
log_stack_usage(&cc1200->rx_thread);
|
||||
continue;
|
||||
flush:
|
||||
LOG_DBG("Flushing RX");
|
||||
|
@ -810,6 +808,7 @@ static int cc1200_init(struct device *dev)
|
|||
CONFIG_IEEE802154_CC1200_RX_STACK_SIZE,
|
||||
(k_thread_entry_t)cc1200_rx,
|
||||
dev, NULL, NULL, K_PRIO_COOP(2), 0, K_NO_WAIT);
|
||||
k_thread_name_set(&cc1200->rx_thread, "cc1200_rx");
|
||||
|
||||
LOG_INF("CC1200 initialized");
|
||||
|
||||
|
|
|
@ -660,9 +660,7 @@ static void cc2520_rx(int arg)
|
|||
goto out;
|
||||
}
|
||||
|
||||
net_analyze_stack("CC2520 Rx Fiber stack",
|
||||
Z_THREAD_STACK_BUFFER(cc2520->cc2520_rx_stack),
|
||||
K_THREAD_STACK_SIZEOF(cc2520->cc2520_rx_stack));
|
||||
log_stack_usage(&cc2520->cc2520_rx_thread);
|
||||
continue;
|
||||
flush:
|
||||
cc2520_print_exceptions(cc2520);
|
||||
|
@ -1105,6 +1103,7 @@ static int cc2520_init(struct device *dev)
|
|||
CONFIG_IEEE802154_CC2520_RX_STACK_SIZE,
|
||||
(k_thread_entry_t)cc2520_rx,
|
||||
dev, NULL, NULL, K_PRIO_COOP(2), 0, K_NO_WAIT);
|
||||
k_thread_name_set(&cc2520->cc2520_rx_thread, "cc2520_rx");
|
||||
|
||||
LOG_INF("CC2520 initialized");
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
|||
#include <sys/byteorder.h>
|
||||
#include <string.h>
|
||||
#include <random/rand32.h>
|
||||
#include <debug/stack.h>
|
||||
|
||||
#include <drivers/gpio.h>
|
||||
|
||||
|
@ -578,9 +579,7 @@ static inline void mcr20a_rx(struct mcr20a_context *mcr20a, u8_t len)
|
|||
goto out;
|
||||
}
|
||||
|
||||
net_analyze_stack("MCR20A Rx Fiber stack",
|
||||
Z_THREAD_STACK_BUFFER(mcr20a->mcr20a_rx_stack),
|
||||
K_THREAD_STACK_SIZEOF(mcr20a->mcr20a_rx_stack));
|
||||
log_stack_usage(&mcr20a->mcr20a_rx_thread);
|
||||
return;
|
||||
out:
|
||||
if (pkt) {
|
||||
|
@ -1429,6 +1428,7 @@ static int mcr20a_init(struct device *dev)
|
|||
CONFIG_IEEE802154_MCR20A_RX_STACK_SIZE,
|
||||
(k_thread_entry_t)mcr20a_thread_main,
|
||||
dev, NULL, NULL, K_PRIO_COOP(2), 0, K_NO_WAIT);
|
||||
k_thread_name_set(&mcr20a->mcr20a_rx_thread, "mcr20a_rx");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -122,10 +122,7 @@ static void nrf5_rx_thread(void *arg1, void *arg2, void *arg3)
|
|||
rx_frame->psdu = NULL;
|
||||
|
||||
if (LOG_LEVEL >= LOG_LEVEL_DBG) {
|
||||
net_analyze_stack(
|
||||
"nRF5 rx stack",
|
||||
Z_THREAD_STACK_BUFFER(nrf5_radio->rx_stack),
|
||||
K_THREAD_STACK_SIZEOF(nrf5_radio->rx_stack));
|
||||
log_stack_usage(&nrf5_radio->rx_thread);
|
||||
}
|
||||
|
||||
continue;
|
||||
|
|
|
@ -203,9 +203,7 @@ static void rf2xx_trx_rx(struct device *dev)
|
|||
}
|
||||
|
||||
if (LOG_LEVEL >= LOG_LEVEL_DBG) {
|
||||
net_analyze_stack("RF2XX Rx stack",
|
||||
Z_THREAD_STACK_BUFFER(ctx->trx_stack),
|
||||
K_THREAD_STACK_SIZEOF(ctx->trx_stack));
|
||||
log_stack_usage(&ctx->trx_thread);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue