net/wireless: fix compile warning

fix tasking compile warning isssue
warnning log: unused variable "IEEE802154_STATUS_STRING"

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
This commit is contained in:
gaohedong
2025-08-20 10:28:43 +08:00
committed by Xiang Xiao
parent c825404a2b
commit 51681a6a8b
2 changed files with 39 additions and 29 deletions
@@ -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
*****************************************************************************/
+33 -1
View File
@@ -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
****************************************************************************/
@@ -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)
{