Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 6 additions & 28 deletions include/nuttx/wireless/ieee802154/ieee802154_mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1746,6 +1718,12 @@ extern "C"
#define EXTERN extern
#endif

/*****************************************************************************
* Public Data
*****************************************************************************/

EXTERN FAR const char *g_ieee802154_status_string[];

/*****************************************************************************
* Public Function Prototypes
*****************************************************************************/
Expand Down
34 changes: 33 additions & 1 deletion wireless/ieee802154/mac802154.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,38 @@
#include <nuttx/wireless/ieee802154/ieee802154_mac.h>
#include <nuttx/wireless/ieee802154/ieee802154_radio.h>

/****************************************************************************
* 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
****************************************************************************/
Expand Down Expand Up @@ -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)
{
Expand Down
Loading