From 968f29cdb07f0b0613ce8313375375a962b8e20b Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Wed, 22 Dec 2021 13:10:24 -0800 Subject: [PATCH] [cli] limit `radiofilter` command to when 15.4 radio link is enabled (#7239) This commit adds `OPENTHREAD_CONFIG_RADIO_LINK_IEEE_802_15_4_ENABLE` check to CLI processing methods related to `radiofilter` command which ensures that this is only available when 15.4 radio is enabled. This allows us to build CLI app successfully with TREL radio only. --- src/cli/cli.cpp | 2 +- src/cli/cli.hpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp index 0682355ad..e38700223 100644 --- a/src/cli/cli.cpp +++ b/src/cli/cli.cpp @@ -3681,7 +3681,7 @@ otError Interpreter::ProcessPreferRouterId(Arg aArgs[]) } #endif -#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE +#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE && OPENTHREAD_CONFIG_RADIO_LINK_IEEE_802_15_4_ENABLE otError Interpreter::ProcessRadioFilter(Arg aArgs[]) { otError error = OT_ERROR_NONE; diff --git a/src/cli/cli.hpp b/src/cli/cli.hpp index d3c502585..227a319a3 100644 --- a/src/cli/cli.hpp +++ b/src/cli/cli.hpp @@ -512,7 +512,9 @@ private: otError ProcessPskcRef(Arg aArgs[]); #endif #endif +#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE && OPENTHREAD_CONFIG_RADIO_LINK_IEEE_802_15_4_ENABLE otError ProcessRadioFilter(Arg aArgs[]); +#endif otError ProcessRcp(Arg aArgs[]); otError ProcessRegion(Arg aArgs[]); #if OPENTHREAD_FTD @@ -819,7 +821,7 @@ private: {"pskcref", &Interpreter::ProcessPskcRef}, #endif #endif -#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE +#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE && OPENTHREAD_CONFIG_RADIO_LINK_IEEE_802_15_4_ENABLE {"radiofilter", &Interpreter::ProcessRadioFilter}, #endif {"rcp", &Interpreter::ProcessRcp},