diff --git a/include/nuttx/wireless/ieee802154/ieee802154_mac.h b/include/nuttx/wireless/ieee802154/ieee802154_mac.h index e07210f39fe..98254572571 100644 --- a/include/nuttx/wireless/ieee802154/ieee802154_mac.h +++ b/include/nuttx/wireless/ieee802154/ieee802154_mac.h @@ -313,34 +313,6 @@ enum ieee802154_status_e IEEE802154_STATUS_LIMITREACHED, }; -static const char *IEEE802154_STATUS_STRING[] = -{ - "Success", - "Out of capacity", - "Denied", - "Failure", - "Beacon loss", - "Channel access failure", - "Disable TRX failure", - "Failed security check", - "Frame too long", - "Invalid GTS", - "Invalid handle", - "Invalid parameter", - "No ack", - "No beacon", - "No data", - "No short address", - "PAN ID conflict", - "Realignment", - "Transaction expired", - "Transaction overflow", - "Tx active", - "Unavailable key", - "Unsupported attribute", - "Limit reached", -}; - /* IEEE 802.15.4 PHY/MAC PIB attributes IDs */ enum ieee802154_attr_e @@ -1746,6 +1718,12 @@ extern "C" #define EXTERN extern #endif +/***************************************************************************** + * Public Data + *****************************************************************************/ + +EXTERN FAR const char *g_ieee802154_status_string[]; + /***************************************************************************** * Public Function Prototypes *****************************************************************************/ diff --git a/wireless/ieee802154/mac802154.c b/wireless/ieee802154/mac802154.c index 09a59e5c666..cbfda4c059b 100644 --- a/wireless/ieee802154/mac802154.c +++ b/wireless/ieee802154/mac802154.c @@ -47,6 +47,38 @@ #include #include +/**************************************************************************** + * Public Data + ****************************************************************************/ + +FAR const char *g_ieee802154_status_string[] = +{ + "Success", + "Out of capacity", + "Denied", + "Failure", + "Beacon loss", + "Channel access failure", + "Disable TRX failure", + "Failed security check", + "Frame too long", + "Invalid GTS", + "Invalid handle", + "Invalid parameter", + "No ack", + "No beacon", + "No data", + "No short address", + "PAN ID conflict", + "Realignment", + "Transaction expired", + "Transaction overflow", + "Tx active", + "Unavailable key", + "Unsupported attribute", + "Limit reached", +}; + /**************************************************************************** * Private Function Prototypes ****************************************************************************/ @@ -902,7 +934,7 @@ static void mac802154_txdone_worker(FAR void *arg) primitive = (FAR struct ieee802154_primitive_s *)txdesc->conf; wlinfo("Tx status: %s\n", - IEEE802154_STATUS_STRING[txdesc->conf->status]); + g_ieee802154_status_string[txdesc->conf->status]); switch (txdesc->frametype) {