diff --git a/include/openthread/link.h b/include/openthread/link.h index 978840e1d..d4abe9836 100644 --- a/include/openthread/link.h +++ b/include/openthread/link.h @@ -454,6 +454,44 @@ otError otLinkSetPollPeriod(otInstance *aInstance, uint32_t aPollPeriod); */ otShortAddress otLinkGetShortAddress(otInstance *aInstance); +/** + * This method returns the maximum number of frame retries during direct transmission. + * + * @param[in] aInstance A pointer to an OpenThread instance. + * + * @returns The maximum number of retries during direct transmission. + * + */ +uint8_t otLinkGetMaxFrameRetriesDirect(otInstance *aInstance); + +/** + * This method sets the maximum number of frame retries during direct transmission. + * + * @param[in] aInstance A pointer to an OpenThread instance. + * @param[in] aMaxFrameRetriesDirect The maximum number of retries during direct transmission. + * + */ +void otLinkSetMaxFrameRetriesDirect(otInstance *aInstance, uint8_t aMaxFrameRetriesDirect); + +/** + * This method returns the maximum number of frame retries during indirect transmission. + * + * @param[in] aInstance A pointer to an OpenThread instance. + * + * @returns The maximum number of retries during indirect transmission. + * + */ +uint8_t otLinkGetMaxFrameRetriesIndirect(otInstance *aInstance); + +/** + * This method sets the maximum number of frame retries during indirect transmission. + * + * @param[in] aInstance A pointer to an OpenThread instance. + * @param[in] aMaxFrameRetriesIndirect The maximum number of retries during indirect transmission. + * + */ +void otLinkSetMaxFrameRetriesIndirect(otInstance *aInstance, uint8_t aMaxFrameRetriesIndirect); + /** * This function gets the address mode of MAC filter. * diff --git a/src/cli/README.md b/src/cli/README.md index fa3b69108..2ba7a3f48 100644 --- a/src/cli/README.md +++ b/src/cli/README.md @@ -39,6 +39,7 @@ OpenThread test scripts use the CLI to execute test cases. * [leaderweight](#leaderweight) * [linkquality](#linkquality-extaddr) * [logfilename](#logfilename-filename) +* [mac](#mac-retries-direct) * [macfilter](#macfilter) * [masterkey](#masterkey) * [mode](#mode) @@ -1373,6 +1374,44 @@ OPENTHREAD/gf4f2f04; Jul 1 2016 17:00:09 Done ``` +### mac retries direct + +Get the number of direct TX retries on the MAC layer. + +```bash +> mac retries direct +3 +Done +``` + +### mac retries direct \ + +Set the number of direct TX retries on the MAC layer. + +```bash +> mac retries direct 5 +Done +``` + +### mac retries indirect + +Get the number of indirect TX retries on the MAC layer. + +```bash +> mac retries indirect +3 +Done +``` + +### mac retries indirect \ + +Set the number of indirect TX retries on the MAC layer. + +```bash +> mac retries indirect 5 +Done +``` + ### macfilter List the macfilter status, including address and received signal strength filter settings. diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp index 0f4074f85..ef3cf7231 100644 --- a/src/cli/cli.cpp +++ b/src/cli/cli.cpp @@ -155,6 +155,7 @@ const struct Command Interpreter::sCommands[] = { {"leaderpartitionid", &Interpreter::ProcessLeaderPartitionId}, {"leaderweight", &Interpreter::ProcessLeaderWeight}, #endif + {"mac", &Interpreter::ProcessMac}, #if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE {"macfilter", &Interpreter::ProcessMacFilter}, #endif @@ -3491,6 +3492,74 @@ exit: #endif // OPENTHREAD_CONFIG_MAC_FILTER_ENABLE +void Interpreter::ProcessMac(int argc, char *argv[]) +{ + otError error = OT_ERROR_NONE; + + VerifyOrExit(argc > 0, error = OT_ERROR_INVALID_ARGS); + + if (strcmp(argv[0], "retries") == 0) + { + error = ProcessMacRetries(argc - 1, argv + 1); + } + else + { + error = OT_ERROR_INVALID_ARGS; + } + +exit: + AppendResult(error); +} + +otError Interpreter::ProcessMacRetries(int argc, char *argv[]) +{ + otError error = OT_ERROR_NONE; + + VerifyOrExit(argc > 0 && argc <= 2, error = OT_ERROR_INVALID_ARGS); + + if (strcmp(argv[0], "direct") == 0) + { + if (argc == 1) + { + mServer->OutputFormat("%d\r\n", otLinkGetMaxFrameRetriesDirect(mInstance)); + } + else + { + unsigned long value; + + SuccessOrExit(error = ParseUnsignedLong(argv[1], value)); + VerifyOrExit(value <= 0xff, error = OT_ERROR_INVALID_ARGS); + + otLinkSetMaxFrameRetriesDirect(mInstance, static_cast(value)); + } + } +#ifdef OPENTHREAD_FTD + else if (strcmp(argv[0], "indirect") == 0) + { + if (argc == 1) + { + mServer->OutputFormat("%d\r\n", otLinkGetMaxFrameRetriesIndirect(mInstance)); + } + else + { + unsigned long value; + + SuccessOrExit(error = ParseUnsignedLong(argv[1], value)); + VerifyOrExit(value <= 0xff, error = OT_ERROR_INVALID_ARGS); + + otLinkSetMaxFrameRetriesIndirect(mInstance, static_cast(value)); + } + } +#endif + else + { + error = OT_ERROR_INVALID_ARGS; + } + +exit: + return error; +} + #if OPENTHREAD_CONFIG_DIAG_ENABLE void Interpreter::ProcessDiag(int argc, char *argv[]) { diff --git a/src/cli/cli.hpp b/src/cli/cli.hpp index ce89800fc..af032cf5f 100644 --- a/src/cli/cli.hpp +++ b/src/cli/cli.hpp @@ -336,6 +336,8 @@ private: otError ProcessMacFilterAddress(int argc, char *argv[]); otError ProcessMacFilterRss(int argc, char *argv[]); #endif // OPENTHREAD_CONFIG_MAC_FILTER_ENABLE + void ProcessMac(int argc, char *argv[]); + otError ProcessMacRetries(int argc, char *argv[]); static void HandleIcmpReceive(void * aContext, otMessage * aMessage, diff --git a/src/core/api/link_api.cpp b/src/core/api/link_api.cpp index bc0e4d169..9e89f3aeb 100644 --- a/src/core/api/link_api.cpp +++ b/src/core/api/link_api.cpp @@ -187,6 +187,38 @@ otShortAddress otLinkGetShortAddress(otInstance *aInstance) return instance.Get().GetShortAddress(); } +uint8_t otLinkGetMaxFrameRetriesDirect(otInstance *aInstance) +{ + Instance &instance = *static_cast(aInstance); + + return instance.Get().GetMaxFrameRetriesDirect(); +} + +void otLinkSetMaxFrameRetriesDirect(otInstance *aInstance, uint8_t aMaxFrameRetriesDirect) +{ + Instance &instance = *static_cast(aInstance); + + instance.Get().SetMaxFrameRetriesDirect(aMaxFrameRetriesDirect); +} + +#if OPENTHREAD_FTD + +uint8_t otLinkGetMaxFrameRetriesIndirect(otInstance *aInstance) +{ + Instance &instance = *static_cast(aInstance); + + return instance.Get().GetMaxFrameRetriesIndirect(); +} + +void otLinkSetMaxFrameRetriesIndirect(otInstance *aInstance, uint8_t aMaxFrameRetriesIndirect) +{ + Instance &instance = *static_cast(aInstance); + + instance.Get().SetMaxFrameRetriesIndirect(aMaxFrameRetriesIndirect); +} + +#endif // OPENTHREAD_FTD + #if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE otMacFilterAddressMode otLinkFilterGetAddressMode(otInstance *aInstance) diff --git a/src/core/config/mac.h b/src/core/config/mac.h index f2cceee1b..f9b2c89c3 100644 --- a/src/core/config/mac.h +++ b/src/core/config/mac.h @@ -60,27 +60,27 @@ #endif /** - * @def OPENTHREAD_CONFIG_MAC_MAX_FRAME_RETRIES_DIRECT + * @def OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_DIRECT * - * The maximum number of retries allowed after a transmission failure for direct transmissions. + * The default maximum number of retries allowed after a transmission failure for direct transmissions. * * Equivalent to macMaxFrameRetries, default value is 3. * */ -#ifndef OPENTHREAD_CONFIG_MAC_MAX_FRAME_RETRIES_DIRECT -#define OPENTHREAD_CONFIG_MAC_MAX_FRAME_RETRIES_DIRECT 3 +#ifndef OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_DIRECT +#define OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_DIRECT 3 #endif /** - * @def OPENTHREAD_CONFIG_MAC_MAX_FRAME_RETRIES_INDIRECT + * @def OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_INDIRECT * - * The maximum number of retries allowed after a transmission failure for indirect transmissions. + * The default maximum number of retries allowed after a transmission failure for indirect transmissions. * * Equivalent to macMaxFrameRetries, default value is 0. * */ -#ifndef OPENTHREAD_CONFIG_MAC_MAX_FRAME_RETRIES_INDIRECT -#define OPENTHREAD_CONFIG_MAC_MAX_FRAME_RETRIES_INDIRECT 0 +#ifndef OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_INDIRECT +#define OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_INDIRECT 0 #endif /** @@ -94,7 +94,7 @@ * Takes the place of macTransactionPersistenceTime. The time period is specified in units of IEEE 802.15.4 Data * Request receptions, rather than being governed by macBeaconOrder. * - * @sa OPENTHREAD_CONFIG_MAC_MAX_FRAME_RETRIES_INDIRECT + * @sa OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_INDIRECT * */ #ifndef OPENTHREAD_CONFIG_MAC_MAX_TX_ATTEMPTS_INDIRECT_POLLS diff --git a/src/core/config/openthread-core-config-check.h b/src/core/config/openthread-core-config-check.h index a46d9b60b..176fca992 100644 --- a/src/core/config/openthread-core-config-check.h +++ b/src/core/config/openthread-core-config-check.h @@ -441,4 +441,14 @@ "OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_METRICS_ENABLE was replaced by OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE." #endif +#ifdef OPENTHREAD_CONFIG_MAC_MAX_FRAME_RETRIES_DIRECT +#error \ + "OPENTHREAD_CONFIG_MAC_MAX_FRAME_RETRIES_DIRECT was replaced by OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_DIRECT." +#endif + +#ifdef OPENTHREAD_CONFIG_MAC_MAX_FRAME_RETRIES_INDIRECT +#error \ + "OPENTHREAD_CONFIG_MAC_MAX_FRAME_RETRIES_INDIRECT was replaced by OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_INDIRECT." +#endif + #endif // OPENTHREAD_CORE_CONFIG_CHECK_H_ diff --git a/src/core/mac/mac.cpp b/src/core/mac/mac.cpp index 29f99d961..860728ff7 100644 --- a/src/core/mac/mac.cpp +++ b/src/core/mac/mac.cpp @@ -101,6 +101,10 @@ Mac::Mac(Instance &aInstance) , mScanChannel(Radio::kChannelMin) , mScanDuration(0) , mScanChannelMask() + , mMaxFrameRetriesDirect(kDefaultMaxFrameRetriesDirect) +#if OPENTHREAD_FTD + , mMaxFrameRetriesIndirect(kDefaultMaxFrameRetriesIndirect) +#endif , mActiveScanHandler(NULL) /* Initialize `mActiveScanHandler` and `mEnergyScanHandler` union */ , mSubMac(aInstance) , mOperationTask(aInstance, &Mac::HandleOperationTask, this) @@ -1027,7 +1031,7 @@ void Mac::BeginTransmit(void) PrepareBeaconRequest(sendFrame); sendFrame.SetSequence(0); sendFrame.SetMaxCsmaBackoffs(kMaxCsmaBackoffsDirect); - sendFrame.SetMaxFrameRetries(kMaxFrameRetriesDirect); + sendFrame.SetMaxFrameRetries(mMaxFrameRetriesDirect); break; case kOperationTransmitBeacon: @@ -1035,7 +1039,7 @@ void Mac::BeginTransmit(void) PrepareBeacon(sendFrame); sendFrame.SetSequence(mBeaconSequence++); sendFrame.SetMaxCsmaBackoffs(kMaxCsmaBackoffsDirect); - sendFrame.SetMaxFrameRetries(kMaxFrameRetriesDirect); + sendFrame.SetMaxFrameRetries(mMaxFrameRetriesDirect); break; case kOperationTransmitPoll: @@ -1043,13 +1047,13 @@ void Mac::BeginTransmit(void) SuccessOrExit(error = PrepareDataRequest(sendFrame)); sendFrame.SetSequence(mDataSequence++); sendFrame.SetMaxCsmaBackoffs(kMaxCsmaBackoffsDirect); - sendFrame.SetMaxFrameRetries(kMaxFrameRetriesDirect); + sendFrame.SetMaxFrameRetries(mMaxFrameRetriesDirect); break; case kOperationTransmitDataDirect: sendFrame.SetChannel(mRadioChannel); sendFrame.SetMaxCsmaBackoffs(kMaxCsmaBackoffsDirect); - sendFrame.SetMaxFrameRetries(kMaxFrameRetriesDirect); + sendFrame.SetMaxFrameRetries(mMaxFrameRetriesDirect); SuccessOrExit(error = Get().HandleFrameRequest(sendFrame)); sendFrame.SetSequence(mDataSequence++); break; @@ -1058,7 +1062,7 @@ void Mac::BeginTransmit(void) case kOperationTransmitDataIndirect: sendFrame.SetChannel(mRadioChannel); sendFrame.SetMaxCsmaBackoffs(kMaxCsmaBackoffsIndirect); - sendFrame.SetMaxFrameRetries(kMaxFrameRetriesIndirect); + sendFrame.SetMaxFrameRetries(mMaxFrameRetriesIndirect); SuccessOrExit(error = Get().HandleFrameRequest(sendFrame)); // If the frame is marked as a retransmission, then data sequence number is already set. diff --git a/src/core/mac/mac.hpp b/src/core/mac/mac.hpp index ebb47f27f..0d5b2a07f 100644 --- a/src/core/mac/mac.hpp +++ b/src/core/mac/mac.hpp @@ -82,10 +82,11 @@ enum kMaxCsmaBackoffsIndirect = OPENTHREAD_CONFIG_MAC_MAX_CSMA_BACKOFFS_INDIRECT, ///< macMaxCsmaBackoffs for indirect transmissions - kMaxFrameRetriesDirect = - OPENTHREAD_CONFIG_MAC_MAX_FRAME_RETRIES_DIRECT, ///< macMaxFrameRetries for direct transmissions - kMaxFrameRetriesIndirect = - OPENTHREAD_CONFIG_MAC_MAX_FRAME_RETRIES_INDIRECT, ///< macMaxFrameRetries for indirect transmissions + kDefaultMaxFrameRetriesDirect = + OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_DIRECT, ///< macDefaultMaxFrameRetries for direct transmissions + kDefaultMaxFrameRetriesIndirect = + OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_INDIRECT, ///< macDefaultMaxFrameRetries for indirect + ///< transmissions kTxNumBcast = OPENTHREAD_CONFIG_MAC_TX_NUM_BCAST ///< Number of times each broadcast frame is transmitted }; @@ -426,6 +427,43 @@ public: */ void SetExtendedPanId(const ExtendedPanId &aExtendedPanId); + /** + * This method returns the maximum number of frame retries during direct transmission. + * + * @returns The maximum number of retries during direct transmission. + * + */ + uint8_t GetMaxFrameRetriesDirect(void) const { return mMaxFrameRetriesDirect; } + + /** + * This method sets the maximum number of frame retries during direct transmission. + * + * @param[in] aMaxFrameRetriesDirect The maximum number of retries during direct transmission. + * + */ + void SetMaxFrameRetriesDirect(uint8_t aMaxFrameRetriesDirect) { mMaxFrameRetriesDirect = aMaxFrameRetriesDirect; } + +#if OPENTHREAD_FTD + /** + * This method returns the maximum number of frame retries during indirect transmission. + * + * @returns The maximum number of retries during indirect transmission. + * + */ + uint8_t GetMaxFrameRetriesIndirect(void) const { return mMaxFrameRetriesIndirect; } + + /** + * This method sets the maximum number of frame retries during indirect transmission. + * + * @param[in] aMaxFrameRetriesIndirect The maximum number of retries during indirect transmission. + * + */ + void SetMaxFrameRetriesIndirect(uint8_t aMaxFrameRetriesIndirect) + { + mMaxFrameRetriesIndirect = aMaxFrameRetriesIndirect; + } +#endif + /** * This method is called to handle a received frame. * @@ -714,6 +752,10 @@ private: uint8_t mScanChannel; uint16_t mScanDuration; ChannelMask mScanChannelMask; + uint8_t mMaxFrameRetriesDirect; +#if OPENTHREAD_FTD + uint8_t mMaxFrameRetriesIndirect; +#endif union { ActiveScanHandler mActiveScanHandler; diff --git a/src/ncp/ncp_base_dispatcher.cpp b/src/ncp/ncp_base_dispatcher.cpp index 391be23b8..1ec487914 100644 --- a/src/ncp/ncp_base_dispatcher.cpp +++ b/src/ncp/ncp_base_dispatcher.cpp @@ -168,6 +168,9 @@ NcpBase::PropertyHandler NcpBase::FindGetPropertyHandler(spinel_prop_key_t aKey) case SPINEL_PROP_MAC_CCA_FAILURE_RATE: handler = &NcpBase::HandlePropertyGet; break; + case SPINEL_PROP_MAC_MAX_RETRY_NUMBER_DIRECT: + handler = &NcpBase::HandlePropertyGet; + break; #if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE case SPINEL_PROP_MAC_BLACKLIST: handler = &NcpBase::HandlePropertyGet; @@ -547,6 +550,9 @@ NcpBase::PropertyHandler NcpBase::FindGetPropertyHandler(spinel_prop_key_t aKey) // FTD Only Properties (Get Handler) #if OPENTHREAD_FTD + case SPINEL_PROP_MAC_MAX_RETRY_NUMBER_INDIRECT: + handler = &NcpBase::HandlePropertyGet; + break; case SPINEL_PROP_NET_PSKC: handler = &NcpBase::HandlePropertyGet; break; @@ -745,6 +751,9 @@ NcpBase::PropertyHandler NcpBase::FindSetPropertyHandler(spinel_prop_key_t aKey) case SPINEL_PROP_MAC_DATA_POLL_PERIOD: handler = &NcpBase::HandlePropertySet; break; + case SPINEL_PROP_MAC_MAX_RETRY_NUMBER_DIRECT: + handler = &NcpBase::HandlePropertySet; + break; case SPINEL_PROP_NET_IF_UP: handler = &NcpBase::HandlePropertySet; break; @@ -903,6 +912,9 @@ NcpBase::PropertyHandler NcpBase::FindSetPropertyHandler(spinel_prop_key_t aKey) // FTD Only Properties (Set Handler) #if OPENTHREAD_FTD + case SPINEL_PROP_MAC_MAX_RETRY_NUMBER_INDIRECT: + handler = &NcpBase::HandlePropertySet; + break; case SPINEL_PROP_NET_PSKC: handler = &NcpBase::HandlePropertySet; break; diff --git a/src/ncp/ncp_base_ftd.cpp b/src/ncp/ncp_base_ftd.cpp index 6ba41fdec..516b03f97 100644 --- a/src/ncp/ncp_base_ftd.cpp +++ b/src/ncp/ncp_base_ftd.cpp @@ -310,6 +310,23 @@ exit: return error; } +template <> otError NcpBase::HandlePropertyGet(void) +{ + return mEncoder.WriteUint8(otLinkGetMaxFrameRetriesIndirect(mInstance)); +} + +template <> otError NcpBase::HandlePropertySet(void) +{ + uint8_t maxFrameRetriesIndirect; + otError error = OT_ERROR_NONE; + + SuccessOrExit(error = mDecoder.ReadUint8(maxFrameRetriesIndirect)); + otLinkSetMaxFrameRetriesIndirect(mInstance, maxFrameRetriesIndirect); + +exit: + return error; +} + template <> otError NcpBase::HandlePropertyGet(void) { return mEncoder.WriteData(otThreadGetPskc(mInstance)->m8, sizeof(spinel_net_pskc_t)); diff --git a/src/ncp/ncp_base_mtd.cpp b/src/ncp/ncp_base_mtd.cpp index cfdd9b92c..1d3cd4518 100644 --- a/src/ncp/ncp_base_mtd.cpp +++ b/src/ncp/ncp_base_mtd.cpp @@ -213,6 +213,23 @@ template <> otError NcpBase::HandlePropertyGet(vo return mEncoder.WriteEui64(*otLinkGetExtendedAddress(mInstance)); } +template <> otError NcpBase::HandlePropertyGet(void) +{ + return mEncoder.WriteUint8(otLinkGetMaxFrameRetriesDirect(mInstance)); +} + +template <> otError NcpBase::HandlePropertySet(void) +{ + uint8_t maxFrameRetriesDirect; + otError error = OT_ERROR_NONE; + + SuccessOrExit(error = mDecoder.ReadUint8(maxFrameRetriesDirect)); + otLinkSetMaxFrameRetriesDirect(mInstance, maxFrameRetriesDirect); + +exit: + return error; +} + template <> otError NcpBase::HandlePropertyGet(void) { uint32_t freq_khz(0); diff --git a/src/ncp/ncp_base_radio.cpp b/src/ncp/ncp_base_radio.cpp index a6029b311..25d91207c 100644 --- a/src/ncp/ncp_base_radio.cpp +++ b/src/ncp/ncp_base_radio.cpp @@ -371,7 +371,7 @@ otError NcpBase::DecodeStreamRawTxRequest(otRadioFrame &aFrame) // Set the default value for all optional parameters. aFrame.mInfo.mTxInfo.mMaxCsmaBackoffs = OPENTHREAD_CONFIG_MAC_MAX_CSMA_BACKOFFS_DIRECT; - aFrame.mInfo.mTxInfo.mMaxFrameRetries = OPENTHREAD_CONFIG_MAC_MAX_FRAME_RETRIES_DIRECT; + aFrame.mInfo.mTxInfo.mMaxFrameRetries = OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_DIRECT; aFrame.mInfo.mTxInfo.mCsmaCaEnabled = true; // All the next parameters are optional. Note that even if the diff --git a/src/ncp/spinel.c b/src/ncp/spinel.c index 08cf5e8fa..e4c0c8e97 100644 --- a/src/ncp/spinel.c +++ b/src/ncp/spinel.c @@ -1499,6 +1499,14 @@ const char *spinel_prop_key_to_cstr(spinel_prop_key_t prop_key) ret = "MAC_CCA_FAILURE_RATE"; break; + case SPINEL_PROP_MAC_MAX_RETRY_NUMBER_DIRECT: + ret = "MAC_MAX_RETRY_NUMBER_DIRECT"; + break; + + case SPINEL_PROP_MAC_MAX_RETRY_NUMBER_INDIRECT: + ret = "MAC_MAX_RETRY_NUMBER_INDIRECT"; + break; + case SPINEL_PROP_NET_SAVED: ret = "NET_SAVED"; break; diff --git a/src/ncp/spinel.h b/src/ncp/spinel.h index 6097cdc0a..43fdf8c93 100644 --- a/src/ncp/spinel.h +++ b/src/ncp/spinel.h @@ -1927,6 +1927,23 @@ typedef enum */ SPINEL_PROP_MAC_CCA_FAILURE_RATE = SPINEL_PROP_MAC_EXT__BEGIN + 9, + /// MAC Max direct retry number + /** Format: `C` + * + * The maximum (user-specified) number of direct frame transmission retries. + * + */ + SPINEL_PROP_MAC_MAX_RETRY_NUMBER_DIRECT = SPINEL_PROP_MAC_EXT__BEGIN + 10, + + /// MAC Max indirect retry number + /** Format: `C` + * Required capability: `SPINEL_CAP_CONFIG_FTD` + * + * The maximum (user-specified) number of indirect frame transmission retries. + * + */ + SPINEL_PROP_MAC_MAX_RETRY_NUMBER_INDIRECT = SPINEL_PROP_MAC_EXT__BEGIN + 11, + SPINEL_PROP_MAC_EXT__END = 0x1400, SPINEL_PROP_NET__BEGIN = 0x40,