From f52efef0d5a9ebc57f0afd72ffa0f0702bc2368a Mon Sep 17 00:00:00 2001 From: Hyungsin <hskim@berkeley.edu> Date: Wed, 31 Jan 2018 11:58:48 -0800 Subject: [PATCH] netopt: Add NETOPT_ACK_PENDING --- drivers/include/net/netdev/ieee802154.h | 5 +++++ sys/include/net/netopt.h | 6 ++++++ sys/net/crosslayer/netopt/netopt.c | 1 + 3 files changed, 12 insertions(+) diff --git a/drivers/include/net/netdev/ieee802154.h b/drivers/include/net/netdev/ieee802154.h index 5a7726bb0d..c98abbd865 100644 --- a/drivers/include/net/netdev/ieee802154.h +++ b/drivers/include/net/netdev/ieee802154.h @@ -53,6 +53,11 @@ extern "C" { * @brief request ACK from receiver */ #define NETDEV_IEEE802154_ACK_REQ (IEEE802154_FCF_ACK_REQ) + +/** + * @brief set frame pending bit + */ +#define NETDEV_IEEE802154_FRAME_PEND (IEEE802154_FCF_FRAME_PEND) /** * @} */ diff --git a/sys/include/net/netopt.h b/sys/include/net/netopt.h index 2f084a0c8c..65d283e13e 100644 --- a/sys/include/net/netopt.h +++ b/sys/include/net/netopt.h @@ -147,6 +147,12 @@ typedef enum { * the current state */ NETOPT_AUTOACK, /**< en/disable link layer auto ACKs or read * the current state */ + NETOPT_ACK_PENDING, /**< en/disable the frame pending bit of ACKs. + * This bit is copied into the frame pending + * subfield of the ACK if it is the response + * to a data request MAC command frame, which + * lets the data request sender know if the ACK + * sender has pending data or not. */ NETOPT_ACK_REQ, /**< en/disable acknowledgement requests or * read the current state */ NETOPT_RETRANS, /**< get/set the maximum number of diff --git a/sys/net/crosslayer/netopt/netopt.c b/sys/net/crosslayer/netopt/netopt.c index 6df4bd1d14..227559f3cc 100644 --- a/sys/net/crosslayer/netopt/netopt.c +++ b/sys/net/crosslayer/netopt/netopt.c @@ -45,6 +45,7 @@ static const char *_netopt_strmap[] = { [NETOPT_PRELOADING] = "NETOPT_PRELOADING", [NETOPT_PROMISCUOUSMODE] = "NETOPT_PROMISCUOUSMODE", [NETOPT_AUTOACK] = "NETOPT_AUTOACK", + [NETOPT_ACK_PENDING] = "NETOPT_ACK_PENDING", [NETOPT_ACK_REQ] = "NETOPT_ACK_REQ", [NETOPT_RETRANS] = "NETOPT_RETRANS", [NETOPT_PROTO] = "NETOPT_PROTO", -- GitLab