From ec4bb7b99019fec34ba50eabd06361cd27dc8888 Mon Sep 17 00:00:00 2001 From: Anthony Merlino Date: Wed, 28 Mar 2018 15:50:11 +0000 Subject: [PATCH] Merged in antmerlino/nuttx/mac802154_ackhandling (pull request #619) mac802154: Adds ackreq flag to TX descriptor for use by radio driver. The radio layer is responsible for a full "transaction". Because of differences in radio capabilites, the radio must be responsible for the handling of acks and retransmissions. This commit simply passes the ackreq meta-data flag along to the radio. Approved-by: Gregory Nutt --- include/nuttx/wireless/ieee802154/ieee802154_radio.h | 1 + wireless/ieee802154/mac802154_data.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/nuttx/wireless/ieee802154/ieee802154_radio.h b/include/nuttx/wireless/ieee802154/ieee802154_radio.h index d755118812..eb6f912336 100644 --- a/include/nuttx/wireless/ieee802154/ieee802154_radio.h +++ b/include/nuttx/wireless/ieee802154/ieee802154_radio.h @@ -84,6 +84,7 @@ struct ieee802154_txdesc_s enum ieee802154_frametype_e frametype; + bool ackreq; /* Are we requesting an ACK? */ bool framepending; /* Did the ACK have the frame pending bit set */ uint32_t purgetime; /* Time to purge transaction */ uint8_t retrycount; /* Number of remaining retries. Set to macMaxFrameRetries diff --git a/wireless/ieee802154/mac802154_data.c b/wireless/ieee802154/mac802154_data.c index 04bac7b7b0..86e9e1ea3f 100644 --- a/wireless/ieee802154/mac802154_data.c +++ b/wireless/ieee802154/mac802154_data.c @@ -258,6 +258,7 @@ int mac802154_req_data(MACHANDLE mac, txdesc->conf->handle = meta->handle; txdesc->frame = frame; txdesc->frametype = IEEE802154_FRAME_DATA; + txdesc->ackreq = meta->flags.ackreq; /* If the TxOptions parameter specifies that a GTS transmission is required, * the MAC sublayer will determine whether it has a valid GTS as described