diff --git a/wireless/ieee802154/Kconfig b/wireless/ieee802154/Kconfig index b5360ab782b..1894dddaafd 100644 --- a/wireless/ieee802154/Kconfig +++ b/wireless/ieee802154/Kconfig @@ -47,7 +47,7 @@ config MAC802154_NNOTIF ---help--- This value must be larger than CONFIG_IEEE802154_NTDESC. -config IEEE802154_NTXDESC +config MAC802154_NTXDESC int "Number or TX descriptors" default 3 ---help--- @@ -56,7 +56,7 @@ config IEEE802154_NTXDESC When used with 6LoWPAN, the descriptor allocator runs on a work and must avoid blocking if possible. Each frame will be provided in an IOB and each TX frame will need a TX descriptor. So the safe - thing to do is set CONFIG_IEEE802154_NTXDESC to CONFIG_IOB_NBUFFERS. + thing to do is set CONFIG_MAC802154_NTXDESC to CONFIG_IOB_NBUFFERS. Then there should be the maximum pre-allocated buffers for each possible TX frame. diff --git a/wireless/ieee802154/mac802154.c b/wireless/ieee802154/mac802154.c index 012139204f3..70e44b68f5c 100644 --- a/wireless/ieee802154/mac802154.c +++ b/wireless/ieee802154/mac802154.c @@ -126,12 +126,12 @@ static void mac802154_resetqueues(FAR struct ieee802154_privmac_s *priv) /* Initialize the tx descriptor allocation pool */ sq_init(&priv->txdesc_queue); - for (i = 0; i < CONFIG_IEEE802154_NTXDESC; i++) + for (i = 0; i < CONFIG_MAC802154_NTXDESC; i++) { sq_addlast((FAR sq_entry_t *)&priv->txdesc_pool[i], &priv->txdesc_queue); } - sem_init(&priv->txdesc_sem, 0, CONFIG_IEEE802154_NTXDESC); + sem_init(&priv->txdesc_sem, 0, CONFIG_MAC802154_NTXDESC); /* Initialize the notifcation allocation pool */ diff --git a/wireless/ieee802154/mac802154_internal.h b/wireless/ieee802154/mac802154_internal.h index d9df64d8516..de9f4c7faec 100644 --- a/wireless/ieee802154/mac802154_internal.h +++ b/wireless/ieee802154/mac802154_internal.h @@ -177,13 +177,13 @@ # define CONFIG_MAC802154_NNOTIF 6 #endif -#if !defined(CONFIG_IEEE802154_NTXDESC) || CONFIG_IEEE802154_NTXDESC <= 0 -# undef CONFIG_IEEE802154_NTXDESC -# define CONFIG_IEEE802154_NTXDESC 3 +#if !defined(CONFIG_MAC802154_NTXDESC) || CONFIG_MAC802154_NTXDESC <= 0 +# undef CONFIG_MAC802154_NTXDESC +# define CONFIG_MAC802154_NTXDESC 3 #endif -#if CONFIG_IEEE802154_NTXDESC > CONFIG_MAC802154_NNOTIF -# error CONFIG_MAC802154_NNOTIF must be greater than CONFIG_IEEE802154_NTXDESC +#if CONFIG_MAC802154_NTXDESC > CONFIG_MAC802154_NNOTIF +# error CONFIG_MAC802154_NNOTIF must be greater than CONFIG_MAC802154_NTXDESC #endif #if !defined(CONFIG_IEEE802154_DEFAULT_EADDR) @@ -258,7 +258,7 @@ struct ieee802154_privmac_s struct mac802154_notif_s notif_pool[CONFIG_MAC802154_NNOTIF]; sem_t notif_sem; - struct ieee802154_txdesc_s txdesc_pool[CONFIG_IEEE802154_NTXDESC]; + struct ieee802154_txdesc_s txdesc_pool[CONFIG_MAC802154_NTXDESC]; sem_t txdesc_sem; sq_queue_t txdesc_queue; sq_queue_t txdone_queue;