mirror of
https://github.com/espressif/openthread.git
synced 2026-08-01 00:27:47 +00:00
[config] mac (#4020)
This commit is contained in:
+4
-6
@@ -69,7 +69,8 @@ python --version || die
|
||||
-DOPENTHREAD_CONFIG_DIAG_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_JOINER_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_LINK_RAW_ENABLE=1"
|
||||
-DOPENTHREAD_CONFIG_LINK_RAW_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_MAC_FILTER_ENABLE=1"
|
||||
|
||||
scan-build ./configure \
|
||||
--enable-builtin-mbedtls=no \
|
||||
@@ -80,7 +81,6 @@ python --version || die
|
||||
--enable-ftd \
|
||||
--enable-jam-detection \
|
||||
--enable-legacy \
|
||||
--enable-mac-filter \
|
||||
--enable-mtd \
|
||||
--enable-mtd-network-diagnostic \
|
||||
--enable-ncp \
|
||||
@@ -103,7 +103,6 @@ python --version || die
|
||||
--enable-ftd \
|
||||
--enable-jam-detection \
|
||||
--enable-legacy \
|
||||
--enable-mac-filter \
|
||||
--enable-mtd \
|
||||
--enable-mtd-network-diagnostic \
|
||||
--enable-ncp \
|
||||
@@ -355,7 +354,8 @@ build_samr21() {
|
||||
-DOPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_DIAG_ENABLE=1"
|
||||
-DOPENTHREAD_CONFIG_DIAG_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_MAC_FILTER_ENABLE=1"
|
||||
|
||||
git checkout -- . || die
|
||||
git clean -xfd || die
|
||||
@@ -368,7 +368,6 @@ build_samr21() {
|
||||
--with-examples=posix \
|
||||
--enable-jam-detection \
|
||||
--enable-legacy \
|
||||
--enable-mac-filter \
|
||||
--enable-service \
|
||||
--disable-docs \
|
||||
--disable-tests \
|
||||
@@ -384,7 +383,6 @@ build_samr21() {
|
||||
--with-ncp-bus=spi \
|
||||
--with-examples=posix \
|
||||
--enable-legacy \
|
||||
--enable-mac-filter \
|
||||
--enable-service \
|
||||
--disable-docs \
|
||||
--disable-tests || die
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ OPENTHREAD_COMMON_FLAGS := \
|
||||
-DPACKAGE_TARNAME=\"openthread\" \
|
||||
-DVERSION=\"$(OPENTHREAD_DEFAULT_VERSION)\" \
|
||||
-DPACKAGE_URL=\"http://github.com/openthread/openthread\" \
|
||||
-DOPENTHREAD_ENABLE_MAC_FILTER=1 \
|
||||
-DOPENTHREAD_CONFIG_MAC_FILTER_ENABLE=1 \
|
||||
$(NULL)
|
||||
|
||||
# Enable required features for on-device tests.
|
||||
|
||||
@@ -35,7 +35,6 @@ AM_DISTCHECK_CONFIGURE_FLAGS = \
|
||||
--enable-cert-log \
|
||||
--enable-cli \
|
||||
--enable-ftd \
|
||||
--enable-mac-filter \
|
||||
--enable-mtd \
|
||||
--enable-ncp \
|
||||
--with-ncp-bus=uart \
|
||||
|
||||
@@ -929,38 +929,6 @@ AC_SUBST(OPENTHREAD_ENABLE_JAM_DETECTION)
|
||||
AM_CONDITIONAL([OPENTHREAD_ENABLE_JAM_DETECTION], [test "${enable_jam_detection}" = "yes"])
|
||||
AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_JAM_DETECTION],[${OPENTHREAD_ENABLE_JAM_DETECTION}],[Define to 1 if you want to use jam detection feature])
|
||||
|
||||
#
|
||||
# MAC Filter (include AddressFilter and RssInFilter)
|
||||
#
|
||||
|
||||
AC_ARG_ENABLE(mac_filter,
|
||||
[AS_HELP_STRING([--enable-mac-filter],[Enable MAC filter support @<:@default=no@:>@.])],
|
||||
[
|
||||
case "${enableval}" in
|
||||
|
||||
no|yes)
|
||||
enable_mac_filter=${enableval}
|
||||
;;
|
||||
|
||||
*)
|
||||
AC_MSG_ERROR([Invalid value ${enable_mac_filter} for --enable-mac-filter])
|
||||
;;
|
||||
esac
|
||||
],
|
||||
[enable_mac_filter=no])
|
||||
|
||||
if test "$enable_mac_filter" = "yes"; then
|
||||
OPENTHREAD_ENABLE_MAC_FILTER=1
|
||||
else
|
||||
OPENTHREAD_ENABLE_MAC_FILTER=0
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether to enable mac filter])
|
||||
AC_MSG_RESULT(${enable_mac_filter})
|
||||
AC_SUBST(OPENTHREAD_ENABLE_MAC_FILTER)
|
||||
AM_CONDITIONAL([OPENTHREAD_ENABLE_MAC_FILTER], [test "${enable_mac_filter}" = "yes"])
|
||||
AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_MAC_FILTER],[${OPENTHREAD_ENABLE_MAC_FILTER}],[Define to 1 if you want to use MAC filter feature])
|
||||
|
||||
#
|
||||
# Vendor Extension - Specify a C++ source file which will be built as part of OpenThread core library.
|
||||
#
|
||||
@@ -1599,7 +1567,6 @@ AC_MSG_NOTICE([
|
||||
OpenThread builtin mbedtls support : ${enable_builtin_mbedtls}
|
||||
OpenThread UDP forward support : ${enable_udp_forward}
|
||||
OpenThread Jam Detection support : ${enable_jam_detection}
|
||||
OpenThread MAC Filter support : ${enable_mac_filter}
|
||||
OpenThread Legacy network support : ${enable_legacy}
|
||||
OpenThread SNTP Client support : ${enable_sntp_client}
|
||||
OpenThread Service support : ${enable_service}
|
||||
|
||||
@@ -147,7 +147,7 @@ COMMONCFLAGS += -DOPENTHREAD_CONFIG_LINK_RAW_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(MAC_FILTER),1)
|
||||
configure_OPTIONS += --enable-mac-filter
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_MAC_FILTER_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(MTD_NETDIAG),1)
|
||||
|
||||
@@ -427,7 +427,7 @@ uint32_t otLinkGetPollPeriod(otInstance *aInstance);
|
||||
* @note This function updates only poll period of sleepy end device. To update child timeout the function
|
||||
* `otSetChildTimeout()` shall be called.
|
||||
*
|
||||
* @note Minimal non-zero value should be `OPENTHREAD_CONFIG_MINIMUM_POLL_PERIOD` (10ms).
|
||||
* @note Minimal non-zero value should be `OPENTHREAD_CONFIG_MAC_MINIMUM_POLL_PERIOD` (10ms).
|
||||
* Or zero to clear user-specified poll period.
|
||||
*
|
||||
* @note User-specified value should be no more than the maximal value 0x3FFFFFF ((1 << 26) - 1) allowed,
|
||||
|
||||
+3
-3
@@ -152,7 +152,7 @@ const struct Command Interpreter::sCommands[] = {
|
||||
{"leaderpartitionid", &Interpreter::ProcessLeaderPartitionId},
|
||||
{"leaderweight", &Interpreter::ProcessLeaderWeight},
|
||||
#endif
|
||||
#if OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
{"macfilter", &Interpreter::ProcessMacFilter},
|
||||
#endif
|
||||
{"masterkey", &Interpreter::ProcessMasterKey},
|
||||
@@ -3113,7 +3113,7 @@ exit:
|
||||
}
|
||||
#endif
|
||||
|
||||
#if OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
void Interpreter::ProcessMacFilter(int argc, char *argv[])
|
||||
{
|
||||
otError error = OT_ERROR_NONE;
|
||||
@@ -3404,7 +3404,7 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#endif // OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
|
||||
#if OPENTHREAD_CONFIG_DIAG_ENABLE
|
||||
void Interpreter::ProcessDiag(int argc, char *argv[])
|
||||
|
||||
+2
-2
@@ -324,12 +324,12 @@ private:
|
||||
void ProcessTxPower(int argc, char *argv[]);
|
||||
void ProcessUdp(int argc, char *argv[]);
|
||||
void ProcessVersion(int argc, char *argv[]);
|
||||
#if OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
void ProcessMacFilter(int argc, char *argv[]);
|
||||
void PrintMacFilter(void);
|
||||
otError ProcessMacFilterAddress(int argc, char *argv[]);
|
||||
otError ProcessMacFilterRss(int argc, char *argv[]);
|
||||
#endif // OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#endif // OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
|
||||
static void HandleIcmpReceive(void * aContext,
|
||||
otMessage * aMessage,
|
||||
|
||||
@@ -334,6 +334,7 @@ HEADERS_COMMON = \
|
||||
config/link_quality.h \
|
||||
config/link_raw.h \
|
||||
config/logging.h \
|
||||
config/mac.h \
|
||||
config/openthread-core-config-check.h \
|
||||
config/openthread-core-default-config.h \
|
||||
crypto/aes_ccm.hpp \
|
||||
|
||||
@@ -185,7 +185,7 @@ otShortAddress otLinkGetShortAddress(otInstance *aInstance)
|
||||
return instance.Get<Mac::Mac>().GetShortAddress();
|
||||
}
|
||||
|
||||
#if OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
|
||||
otMacFilterAddressMode otLinkFilterGetAddressMode(otInstance *aInstance)
|
||||
{
|
||||
@@ -295,7 +295,7 @@ int8_t otLinkConvertLinkQualityToRss(otInstance *aInstance, uint8_t aLinkQuality
|
||||
return LinkQualityInfo::ConvertLinkQualityToRss(instance.Get<Mac::Mac>().GetNoiseFloor(), aLinkQuality);
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#endif // OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
|
||||
void otLinkSetPcapCallback(otInstance *aInstance, otLinkPcapCallback aPcapCallback, void *aCallbackContext)
|
||||
{
|
||||
|
||||
@@ -439,7 +439,7 @@ template <> inline Mac::SubMac &Instance::Get(void)
|
||||
return mThreadNetif.mMac.mSubMac;
|
||||
}
|
||||
|
||||
#if OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
template <> inline Mac::Filter &Instance::Get(void)
|
||||
{
|
||||
return mThreadNetif.mMac.mFilter;
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
/*
|
||||
* Copyright (c) 2019, The OpenThread Authors.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the copyright holder nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* This file includes compile-time configurations for the MAC.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_MAC_H_
|
||||
#define CONFIG_MAC_H_
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_MAX_CSMA_BACKOFFS_DIRECT
|
||||
*
|
||||
* The maximum number of backoffs the CSMA-CA algorithm will attempt before declaring a channel access failure.
|
||||
*
|
||||
* Equivalent to macMaxCSMABackoffs in IEEE 802.15.4-2006, default value is 4.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_MAX_CSMA_BACKOFFS_DIRECT
|
||||
#define OPENTHREAD_CONFIG_MAC_MAX_CSMA_BACKOFFS_DIRECT 32
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_MAX_CSMA_BACKOFFS_INDIRECT
|
||||
*
|
||||
* The maximum number of backoffs the CSMA-CA algorithm will attempt before declaring a channel access failure.
|
||||
*
|
||||
* Equivalent to macMaxCSMABackoffs in IEEE 802.15.4-2006, default value is 4.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_MAX_CSMA_BACKOFFS_INDIRECT
|
||||
#define OPENTHREAD_CONFIG_MAC_MAX_CSMA_BACKOFFS_INDIRECT 4
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_MAX_FRAME_RETRIES_DIRECT
|
||||
*
|
||||
* The 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
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_MAX_FRAME_RETRIES_INDIRECT
|
||||
*
|
||||
* The 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
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_MAX_TX_ATTEMPTS_INDIRECT_POLLS
|
||||
*
|
||||
* Maximum number of received IEEE 802.15.4 Data Requests for a queued indirect transaction.
|
||||
*
|
||||
* The indirect frame remains in the transaction queue until it is successfully transmitted or until the indirect
|
||||
* transmission fails after the maximum number of IEEE 802.15.4 Data Request messages have been received.
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_MAX_TX_ATTEMPTS_INDIRECT_POLLS
|
||||
#define OPENTHREAD_CONFIG_MAC_MAX_TX_ATTEMPTS_INDIRECT_POLLS 4
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
*
|
||||
* Define to 1 to enable MAC filter support.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
#define OPENTHREAD_CONFIG_MAC_FILTER_ENABLE 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_FILTER_SIZE
|
||||
*
|
||||
* The number of MAC Filter entries.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_FILTER_SIZE
|
||||
#define OPENTHREAD_CONFIG_MAC_FILTER_SIZE 32
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_TX_NUM_BCAST
|
||||
*
|
||||
* The number of times each IEEE 802.15.4 broadcast frame is transmitted.
|
||||
*
|
||||
* The minimum value is 1. Values larger than 1 may improve broadcast reliability by increasing redundancy, but may
|
||||
* also increase congestion.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_TX_NUM_BCAST
|
||||
#define OPENTHREAD_CONFIG_MAC_TX_NUM_BCAST 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_DISABLE_CSMA_CA_ON_LAST_ATTEMPT
|
||||
*
|
||||
* Define as 1 to disable CSMA-CA on the last transmit attempt.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_DISABLE_CSMA_CA_ON_LAST_ATTEMPT
|
||||
#define OPENTHREAD_CONFIG_MAC_DISABLE_CSMA_CA_ON_LAST_ATTEMPT 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
*
|
||||
* Define as 1 to stay awake between fragments while transmitting a large packet,
|
||||
* and to stay awake after receiving a packet with frame pending set to true.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
#define OPENTHREAD_CONFIG_MAC_STAY_AWAKE_BETWEEN_FRAGMENTS 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_JOIN_BEACON_VERSION
|
||||
*
|
||||
* The Beacon version to use when the beacon join flag is set.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_JOIN_BEACON_VERSION
|
||||
#define OPENTHREAD_CONFIG_MAC_JOIN_BEACON_VERSION kProtocolVersion
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_BEACON_RSP_WHEN_JOINABLE_ENABLE
|
||||
*
|
||||
* Define to 1 to enable IEEE 802.15.4 Beacons when joining is enabled.
|
||||
*
|
||||
* @note When this feature is enabled, the device will transmit IEEE 802.15.4 Beacons in response to IEEE 802.15.4
|
||||
* Beacon Requests even while the device is not router capable and detached.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_BEACON_RSP_WHEN_JOINABLE_ENABLE
|
||||
#define OPENTHREAD_CONFIG_MAC_BEACON_RSP_WHEN_JOINABLE_ENABLE 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT
|
||||
*
|
||||
* Define as 1 to support IEEE 802.15.4-2015 Header IE (Information Element) generation and parsing, it must be set
|
||||
* to support following features:
|
||||
* 1. Time synchronization service feature (i.e., OPENTHREAD_CONFIG_ENABLE_TIME_SYNC is set).
|
||||
*
|
||||
* @note If it's enabled, platform must support interrupt context and concurrent access AES.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT
|
||||
#if OPENTHREAD_CONFIG_ENABLE_TIME_SYNC
|
||||
#define OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT 1
|
||||
#else
|
||||
#define OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_ATTACH_DATA_POLL_PERIOD
|
||||
*
|
||||
* The Data Poll period during attach in milliseconds.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_ATTACH_DATA_POLL_PERIOD
|
||||
#define OPENTHREAD_CONFIG_MAC_ATTACH_DATA_POLL_PERIOD 100
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_MINIMUM_POLL_PERIOD
|
||||
*
|
||||
* This setting configures the minimum poll period in milliseconds.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_MINIMUM_POLL_PERIOD
|
||||
#define OPENTHREAD_CONFIG_MAC_MINIMUM_POLL_PERIOD 10
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_RETX_POLL_PERIOD
|
||||
*
|
||||
* This setting configures the retx poll period in milliseconds.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_RETX_POLL_PERIOD
|
||||
#define OPENTHREAD_CONFIG_MAC_RETX_POLL_PERIOD 1000
|
||||
#endif
|
||||
|
||||
#endif // CONFIG_MAC_H_
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
#ifdef OPENTHREAD_CONFIG_DISABLE_CCA_ON_LAST_ATTEMPT
|
||||
#error \
|
||||
"OPENTHREAD_CONFIG_DISABLE_CCA_ON_LAST_ATTEMPT was replaced by OPENTHREAD_CONFIG_DISABLE_CSMA_CA_ON_LAST_ATTEMPT."
|
||||
"OPENTHREAD_CONFIG_DISABLE_CCA_ON_LAST_ATTEMPT was replaced by OPENTHREAD_CONFIG_MAC_DISABLE_CSMA_CA_ON_LAST_ATTEMPT."
|
||||
#endif
|
||||
|
||||
#ifdef OPENTHREAD_CONFIG_MAX_TX_ATTEMPTS_DIRECT
|
||||
|
||||
@@ -115,85 +115,6 @@
|
||||
#define OPENTHREAD_CONFIG_DEFAULT_TRANSMIT_POWER 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_MAX_CSMA_BACKOFFS_DIRECT
|
||||
*
|
||||
* The maximum number of backoffs the CSMA-CA algorithm will attempt before declaring a channel access failure.
|
||||
*
|
||||
* Equivalent to macMaxCSMABackoffs in IEEE 802.15.4-2006, default value is 4.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_MAX_CSMA_BACKOFFS_DIRECT
|
||||
#define OPENTHREAD_CONFIG_MAC_MAX_CSMA_BACKOFFS_DIRECT 32
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_MAX_CSMA_BACKOFFS_INDIRECT
|
||||
*
|
||||
* The maximum number of backoffs the CSMA-CA algorithm will attempt before declaring a channel access failure.
|
||||
*
|
||||
* Equivalent to macMaxCSMABackoffs in IEEE 802.15.4-2006, default value is 4.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_MAX_CSMA_BACKOFFS_INDIRECT
|
||||
#define OPENTHREAD_CONFIG_MAC_MAX_CSMA_BACKOFFS_INDIRECT 4
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_MAX_FRAME_RETRIES_DIRECT
|
||||
*
|
||||
* The 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
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_MAX_FRAME_RETRIES_INDIRECT
|
||||
*
|
||||
* The 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
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAX_TX_ATTEMPTS_INDIRECT_POLLS
|
||||
*
|
||||
* Maximum number of received IEEE 802.15.4 Data Requests for a queued indirect transaction.
|
||||
*
|
||||
* The indirect frame remains in the transaction queue until it is successfully transmitted or until the indirect
|
||||
* transmission fails after the maximum number of IEEE 802.15.4 Data Request messages have been received.
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAX_TX_ATTEMPTS_INDIRECT_POLLS
|
||||
#define OPENTHREAD_CONFIG_MAX_TX_ATTEMPTS_INDIRECT_POLLS 4
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_TX_NUM_BCAST
|
||||
*
|
||||
* The number of times each IEEE 802.15.4 broadcast frame is transmitted.
|
||||
*
|
||||
* The minimum value is 1. Values larger than 1 may improve broadcast reliability by increasing redundancy, but may also
|
||||
* increase congestion.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_TX_NUM_BCAST
|
||||
#define OPENTHREAD_CONFIG_TX_NUM_BCAST 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_DROP_MESSAGE_ON_FRAGMENT_TX_FAILURE
|
||||
*
|
||||
@@ -210,16 +131,6 @@
|
||||
#define OPENTHREAD_CONFIG_DROP_MESSAGE_ON_FRAGMENT_TX_FAILURE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_ATTACH_DATA_POLL_PERIOD
|
||||
*
|
||||
* The Data Poll period during attach in milliseconds.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_ATTACH_DATA_POLL_PERIOD
|
||||
#define OPENTHREAD_CONFIG_ATTACH_DATA_POLL_PERIOD 100
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_ADDRESS_CACHE_ENTRIES
|
||||
*
|
||||
@@ -389,16 +300,6 @@
|
||||
#define OPENTHREAD_CONFIG_SNTP_MAX_RETRANSMIT 2
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_JOIN_BEACON_VERSION
|
||||
*
|
||||
* The Beacon version to use when the beacon join flag is set.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_JOIN_BEACON_VERSION
|
||||
#define OPENTHREAD_CONFIG_JOIN_BEACON_VERSION kProtocolVersion
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT
|
||||
*
|
||||
@@ -411,16 +312,6 @@
|
||||
#define OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_FILTER_SIZE
|
||||
*
|
||||
* The number of MAC Filter entries.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_FILTER_SIZE
|
||||
#define OPENTHREAD_CONFIG_MAC_FILTER_SIZE 32
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_STORE_FRAME_COUNTER_AHEAD
|
||||
*
|
||||
@@ -569,19 +460,6 @@
|
||||
#define OPENTHREAD_CONFIG_ENABLE_PLATFORM_EUI64_CUSTOM_SOURCE 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_ENABLE_BEACON_RSP_WHEN_JOINABLE
|
||||
*
|
||||
* Define to 1 to enable IEEE 802.15.4 Beacons when joining is enabled.
|
||||
*
|
||||
* @note When this feature is enabled, the device will transmit IEEE 802.15.4 Beacons in response to IEEE 802.15.4
|
||||
* Beacon Requests even while the device is not router capable and detached.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_ENABLE_BEACON_RSP_WHEN_JOINABLE
|
||||
#define OPENTHREAD_CONFIG_ENABLE_BEACON_RSP_WHEN_JOINABLE 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_HEAP_SIZE
|
||||
*
|
||||
@@ -826,17 +704,6 @@
|
||||
#define OPENTHREAD_CONFIG_NCP_ENABLE_MCU_POWER_STATE_CONTROL 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
*
|
||||
* Define as 1 to stay awake between fragments while transmitting a large packet,
|
||||
* and to stay awake after receiving a packet with frame pending set to true.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
#define OPENTHREAD_CONFIG_STAY_AWAKE_BETWEEN_FRAGMENTS 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MLE_SEND_LINK_REQUEST_ON_ADV_TIMEOUT
|
||||
*
|
||||
@@ -899,16 +766,6 @@
|
||||
#define OPENTHREAD_CONFIG_ENABLE_DEBUG_UART 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_DISABLE_CSMA_CA_ON_LAST_ATTEMPT
|
||||
*
|
||||
* Define as 1 to disable CSMA-CA on the last transmit attempt.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_DISABLE_CSMA_CA_ON_LAST_ATTEMPT
|
||||
#define OPENTHREAD_CONFIG_DISABLE_CSMA_CA_ON_LAST_ATTEMPT 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_ENABLE_TIME_SYNC
|
||||
*
|
||||
@@ -957,24 +814,6 @@
|
||||
#define OPENTHREAD_CONFIG_TIME_SYNC_XTAL_THRESHOLD 300
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_HEADER_IE_SUPPORT
|
||||
*
|
||||
* Define as 1 to support IEEE 802.15.4-2015 Header IE (Information Element) generation and parsing, it must be set
|
||||
* to support following features:
|
||||
* 1. Time synchronization service feature (i.e., OPENTHREAD_CONFIG_ENABLE_TIME_SYNC is set).
|
||||
*
|
||||
* @note If it's enabled, platform must support interrupt context and concurrent access AES.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_HEADER_IE_SUPPORT
|
||||
#if OPENTHREAD_CONFIG_ENABLE_TIME_SYNC
|
||||
#define OPENTHREAD_CONFIG_HEADER_IE_SUPPORT 1
|
||||
#else
|
||||
#define OPENTHREAD_CONFIG_HEADER_IE_SUPPORT 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_ENABLE_LONG_ROUTES
|
||||
*
|
||||
@@ -1007,26 +846,6 @@
|
||||
#define OPENTHREAD_CONFIG_FAILED_CHILD_TRANSMISSIONS 4
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MINIMUM_POLL_PERIOD
|
||||
*
|
||||
* This setting configures the minimum poll period in milliseconds.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MINIMUM_POLL_PERIOD
|
||||
#define OPENTHREAD_CONFIG_MINIMUM_POLL_PERIOD 10
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_RETX_POLL_PERIOD
|
||||
*
|
||||
* This setting configures the retx poll period in milliseconds.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_RETX_POLL_PERIOD
|
||||
#define OPENTHREAD_CONFIG_RETX_POLL_PERIOD 1000
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_DEFAULT_SED_BUFFER_SIZE
|
||||
*
|
||||
|
||||
@@ -66,7 +66,7 @@ class DataPollHandler : public InstanceLocator
|
||||
public:
|
||||
enum
|
||||
{
|
||||
kMaxPollTriggeredTxAttempts = OPENTHREAD_CONFIG_MAX_TX_ATTEMPTS_INDIRECT_POLLS,
|
||||
kMaxPollTriggeredTxAttempts = OPENTHREAD_CONFIG_MAC_MAX_TX_ATTEMPTS_INDIRECT_POLLS,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -157,7 +157,7 @@ otError DataPollSender::SetExternalPollPeriod(uint32_t aPeriod)
|
||||
|
||||
if (aPeriod != 0)
|
||||
{
|
||||
VerifyOrExit(aPeriod >= OPENTHREAD_CONFIG_MINIMUM_POLL_PERIOD, error = OT_ERROR_INVALID_ARGS);
|
||||
VerifyOrExit(aPeriod >= OPENTHREAD_CONFIG_MAC_MINIMUM_POLL_PERIOD, error = OT_ERROR_INVALID_ARGS);
|
||||
|
||||
// Clipped by the maximal value.
|
||||
if (aPeriod > kMaxExternalPeriod)
|
||||
|
||||
@@ -109,8 +109,8 @@ public:
|
||||
* request transmissions. Note that OpenThread may send data request transmissions more frequently when expecting
|
||||
* a control-message from a parent or in case of data poll transmission failures or timeouts.
|
||||
*
|
||||
* Minimal non-zero value should be `OPENTHREAD_CONFIG_MINIMUM_POLL_PERIOD` (10ms). Or zero to clear user-specified
|
||||
* poll period.
|
||||
* Minimal non-zero value should be `OPENTHREAD_CONFIG_MAC_MINIMUM_POLL_PERIOD` (10ms). Or zero to clear
|
||||
* user-specified poll period.
|
||||
*
|
||||
* User-specified value should be no more than the maximal value 0x3FFFFFF ((1 << 26) - 1) allowed, otherwise it
|
||||
* would be cilpped by the maximal value.
|
||||
@@ -185,7 +185,7 @@ public:
|
||||
* This method sets/clears the attach mode on data poll sender.
|
||||
*
|
||||
* When attach mode is enabled, the data poll sender will send data polls at a faster rate determined by
|
||||
* poll period configuration option `OPENTHREAD_CONFIG_ATTACH_DATA_POLL_PERIOD`.
|
||||
* poll period configuration option `OPENTHREAD_CONFIG_MAC_ATTACH_DATA_POLL_PERIOD`.
|
||||
*
|
||||
* @param[in] aMode The mode value.
|
||||
*
|
||||
@@ -230,12 +230,12 @@ public:
|
||||
private:
|
||||
enum // Poll period under different conditions (in milliseconds).
|
||||
{
|
||||
kAttachDataPollPeriod = OPENTHREAD_CONFIG_ATTACH_DATA_POLL_PERIOD, ///< Poll period during attach.
|
||||
kRetxPollPeriod = OPENTHREAD_CONFIG_RETX_POLL_PERIOD, ///< Poll retx period due to tx failure.
|
||||
kFastPollPeriod = 188, ///< Period used for fast polls.
|
||||
kMinPollPeriod = OPENTHREAD_CONFIG_MINIMUM_POLL_PERIOD, ///< Minimum allowed poll period.
|
||||
kMaxExternalPeriod = ((1 << 26) - 1), ///< Maximum allowed user-specified period.
|
||||
///< i.e. (0x3FFFFF)ms, about 18.64 hours.
|
||||
kAttachDataPollPeriod = OPENTHREAD_CONFIG_MAC_ATTACH_DATA_POLL_PERIOD, ///< Poll period during attach.
|
||||
kRetxPollPeriod = OPENTHREAD_CONFIG_MAC_RETX_POLL_PERIOD, ///< Poll retx period due to tx failure.
|
||||
kFastPollPeriod = 188, ///< Period used for fast polls.
|
||||
kMinPollPeriod = OPENTHREAD_CONFIG_MAC_MINIMUM_POLL_PERIOD, ///< Minimum allowed poll period.
|
||||
kMaxExternalPeriod = ((1 << 26) - 1), ///< Maximum allowed user-specified period.
|
||||
///< i.e. (0x3FFFFF)ms, about 18.64 hours.
|
||||
};
|
||||
|
||||
enum
|
||||
|
||||
+17
-17
@@ -83,7 +83,7 @@ Mac::Mac(Instance &aInstance)
|
||||
, mShouldTxPollBeforeData(false)
|
||||
, mRxOnWhenIdle(false)
|
||||
, mBeaconsEnabled(false)
|
||||
#if OPENTHREAD_CONFIG_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
#if OPENTHREAD_CONFIG_MAC_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
, mShouldDelaySleep(false)
|
||||
, mDelayingSleep(false)
|
||||
#endif
|
||||
@@ -106,7 +106,7 @@ Mac::Mac(Instance &aInstance)
|
||||
, mOobFrame(NULL)
|
||||
, mKeyIdMode2FrameCounter(0)
|
||||
, mCcaSampleCount(0)
|
||||
#if OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
, mFilter()
|
||||
#endif
|
||||
{
|
||||
@@ -349,7 +349,7 @@ void Mac::SetRxOnWhenIdle(bool aRxOnWhenIdle)
|
||||
mOperationTask.Post();
|
||||
}
|
||||
|
||||
#if OPENTHREAD_CONFIG_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
#if OPENTHREAD_CONFIG_MAC_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
mDelayingSleep = false;
|
||||
mShouldDelaySleep = false;
|
||||
#endif
|
||||
@@ -556,7 +556,7 @@ void Mac::UpdateIdleMode(void)
|
||||
|
||||
VerifyOrExit(mOperation == kOperationIdle);
|
||||
|
||||
#if OPENTHREAD_CONFIG_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
#if OPENTHREAD_CONFIG_MAC_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
if (mShouldDelaySleep)
|
||||
{
|
||||
mTimer.Start(kSleepDelay);
|
||||
@@ -592,7 +592,7 @@ void Mac::StartOperation(Operation aOperation)
|
||||
{
|
||||
otLogDebgMac("Request to start operation \"%s\"", OperationToString(aOperation));
|
||||
|
||||
#if OPENTHREAD_CONFIG_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
#if OPENTHREAD_CONFIG_MAC_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
if (mDelayingSleep)
|
||||
{
|
||||
otLogDebgMac("Canceling sleep delay");
|
||||
@@ -671,7 +671,7 @@ void Mac::PerformNextOperation(void)
|
||||
#endif
|
||||
mPendingTransmitPoll = false;
|
||||
mTimer.Stop();
|
||||
#if OPENTHREAD_CONFIG_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
#if OPENTHREAD_CONFIG_MAC_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
mDelayingSleep = false;
|
||||
mShouldDelaySleep = false;
|
||||
#endif
|
||||
@@ -888,7 +888,7 @@ bool Mac::ShouldSendBeacon(void) const
|
||||
|
||||
shouldSend = IsBeaconEnabled();
|
||||
|
||||
#if OPENTHREAD_CONFIG_ENABLE_BEACON_RSP_WHEN_JOINABLE
|
||||
#if OPENTHREAD_CONFIG_MAC_BEACON_RSP_WHEN_JOINABLE_ENABLE
|
||||
if (!shouldSend)
|
||||
{
|
||||
// When `ENABLE_BEACON_RSP_WHEN_JOINABLE` feature is enabled,
|
||||
@@ -1099,7 +1099,7 @@ void Mac::BeginTransmit(void)
|
||||
|
||||
mBroadcastTransmitCount = 0;
|
||||
|
||||
#if OPENTHREAD_CONFIG_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
#if OPENTHREAD_CONFIG_MAC_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
if (!mRxOnWhenIdle && !mPromiscuous)
|
||||
{
|
||||
mShouldDelaySleep = sendFrame.GetFramePending();
|
||||
@@ -1358,7 +1358,7 @@ void Mac::HandleTimer(void)
|
||||
PerformNextOperation();
|
||||
break;
|
||||
|
||||
#if OPENTHREAD_CONFIG_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
#if OPENTHREAD_CONFIG_MAC_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
case kOperationIdle:
|
||||
if (mDelayingSleep)
|
||||
{
|
||||
@@ -1527,9 +1527,9 @@ void Mac::HandleReceivedFrame(Frame *aFrame, otError aError)
|
||||
PanId panid;
|
||||
Neighbor *neighbor;
|
||||
otError error = aError;
|
||||
#if OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
int8_t rssi = OT_MAC_FILTER_FIXED_RSS_DISABLED;
|
||||
#endif // OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#endif // OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
|
||||
mCounters.mRxTotal++;
|
||||
|
||||
@@ -1598,7 +1598,7 @@ void Mac::HandleReceivedFrame(Frame *aFrame, otError aError)
|
||||
ExitNow(error = OT_ERROR_INVALID_SOURCE_ADDRESS);
|
||||
}
|
||||
|
||||
#if OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
|
||||
// Source filter Processing. Check if filtered out by whitelist or blacklist.
|
||||
SuccessOrExit(error = mFilter.Apply(srcaddr.GetExtended(), rssi));
|
||||
@@ -1609,7 +1609,7 @@ void Mac::HandleReceivedFrame(Frame *aFrame, otError aError)
|
||||
aFrame->SetRssi(rssi);
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#endif // OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -1661,7 +1661,7 @@ void Mac::HandleReceivedFrame(Frame *aFrame, otError aError)
|
||||
|
||||
if (neighbor != NULL)
|
||||
{
|
||||
#if OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
|
||||
// make assigned rssi to take effect quickly
|
||||
if (rssi != OT_MAC_FILTER_FIXED_RSS_DISABLED)
|
||||
@@ -1669,7 +1669,7 @@ void Mac::HandleReceivedFrame(Frame *aFrame, otError aError)
|
||||
neighbor->GetLinkInfo().Clear();
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#endif // OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
|
||||
neighbor->GetLinkInfo().AddRss(GetNoiseFloor(), aFrame->GetRssi());
|
||||
|
||||
@@ -1721,7 +1721,7 @@ void Mac::HandleReceivedFrame(Frame *aFrame, otError aError)
|
||||
{
|
||||
mTimer.Stop();
|
||||
|
||||
#if OPENTHREAD_CONFIG_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
#if OPENTHREAD_CONFIG_MAC_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
if (!mRxOnWhenIdle && !mPromiscuous && aFrame->GetFramePending())
|
||||
{
|
||||
mShouldDelaySleep = true;
|
||||
@@ -1854,7 +1854,7 @@ void Mac::SetPromiscuous(bool aPromiscuous)
|
||||
mPromiscuous = aPromiscuous;
|
||||
otPlatRadioSetPromiscuous(&GetInstance(), aPromiscuous);
|
||||
|
||||
#if OPENTHREAD_CONFIG_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
#if OPENTHREAD_CONFIG_MAC_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
mDelayingSleep = false;
|
||||
mShouldDelaySleep = false;
|
||||
#endif
|
||||
|
||||
@@ -87,7 +87,7 @@ enum
|
||||
kMaxFrameRetriesIndirect =
|
||||
OPENTHREAD_CONFIG_MAC_MAX_FRAME_RETRIES_INDIRECT, ///< macMaxFrameRetries for indirect transmissions
|
||||
|
||||
kTxNumBcast = OPENTHREAD_CONFIG_TX_NUM_BCAST ///< Number of times each broadcast frame is transmitted
|
||||
kTxNumBcast = OPENTHREAD_CONFIG_MAC_TX_NUM_BCAST ///< Number of times each broadcast frame is transmitted
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -699,7 +699,7 @@ private:
|
||||
bool mRxOnWhenIdle : 1;
|
||||
bool mPromiscuous : 1;
|
||||
bool mBeaconsEnabled : 1;
|
||||
#if OPENTHREAD_CONFIG_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
#if OPENTHREAD_CONFIG_MAC_STAY_AWAKE_BETWEEN_FRAGMENTS
|
||||
bool mShouldDelaySleep : 1;
|
||||
bool mDelayingSleep : 1;
|
||||
#endif
|
||||
@@ -733,9 +733,9 @@ private:
|
||||
SuccessRateTracker mCcaSuccessRateTracker;
|
||||
uint16_t mCcaSampleCount;
|
||||
|
||||
#if OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
Filter mFilter;
|
||||
#endif // OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#endif // OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include "common/code_utils.hpp"
|
||||
|
||||
#if OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
|
||||
namespace ot {
|
||||
namespace Mac {
|
||||
@@ -273,4 +273,4 @@ exit:
|
||||
} // namespace Mac
|
||||
} // namespace ot
|
||||
|
||||
#endif // OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#endif // OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
#include "mac/mac_frame.hpp"
|
||||
|
||||
#if OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
|
||||
namespace ot {
|
||||
namespace Mac {
|
||||
@@ -234,6 +234,6 @@ private:
|
||||
} // namespace Mac
|
||||
} // namespace ot
|
||||
|
||||
#endif // OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#endif // OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
|
||||
#endif // MAC_FILTER_HPP_
|
||||
|
||||
@@ -361,7 +361,7 @@ bool Frame::IsSrcPanIdPresent(uint16_t aFcf) const
|
||||
|
||||
if ((aFcf & kFcfSrcAddrMask) != kFcfSrcAddrNone && (aFcf & kFcfPanidCompression) == 0)
|
||||
{
|
||||
#if OPENTHREAD_CONFIG_HEADER_IE_SUPPORT
|
||||
#if OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT
|
||||
// Handle a special case in IEEE 802.15.4-2015, when Pan ID Compression is 0, but Src Pan ID is not present:
|
||||
// Dest Address: Extended
|
||||
// Source Address: Extended
|
||||
@@ -875,14 +875,14 @@ exit:
|
||||
uint8_t Frame::FindPayloadIndex(void) const
|
||||
{
|
||||
uint8_t index = SkipSecurityHeaderIndex();
|
||||
#if OPENTHREAD_CONFIG_HEADER_IE_SUPPORT
|
||||
#if OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT
|
||||
const uint8_t *cur = NULL;
|
||||
const uint8_t *footer = GetFooter();
|
||||
#endif
|
||||
|
||||
VerifyOrExit(index != kInvalidIndex);
|
||||
|
||||
#if OPENTHREAD_CONFIG_HEADER_IE_SUPPORT
|
||||
#if OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT
|
||||
cur = GetPsdu() + index;
|
||||
|
||||
if (IsIePresent())
|
||||
@@ -936,7 +936,7 @@ const uint8_t *Frame::GetFooter(void) const
|
||||
return GetPsdu() + GetPsduLength() - GetFooterLength();
|
||||
}
|
||||
|
||||
#if OPENTHREAD_CONFIG_HEADER_IE_SUPPORT
|
||||
#if OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT
|
||||
uint8_t Frame::FindHeaderIeIndex(void) const
|
||||
{
|
||||
uint8_t index;
|
||||
@@ -1008,7 +1008,7 @@ const uint8_t *Frame::GetHeaderIe(uint8_t aIeId) const
|
||||
exit:
|
||||
return cur;
|
||||
}
|
||||
#endif // OPENTHREAD_CONFIG_HEADER_IE_SUPPORT
|
||||
#endif // OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT
|
||||
|
||||
#if OPENTHREAD_CONFIG_ENABLE_TIME_SYNC
|
||||
const TimeIe *Frame::GetTimeIe(void) const
|
||||
|
||||
@@ -1329,7 +1329,7 @@ public:
|
||||
uint8_t ReadTimeSyncSeq(void) const { return GetTimeIe()->GetSequence(); }
|
||||
#endif // OPENTHREAD_CONFIG_ENABLE_TIME_SYNC
|
||||
|
||||
#if OPENTHREAD_CONFIG_HEADER_IE_SUPPORT
|
||||
#if OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT
|
||||
/**
|
||||
* This method appends Header IEs to MAC header.
|
||||
*
|
||||
@@ -1364,7 +1364,7 @@ public:
|
||||
*
|
||||
*/
|
||||
const uint8_t *GetHeaderIe(uint8_t aIeId) const;
|
||||
#endif // OPENTHREAD_CONFIG_HEADER_IE_SUPPORT
|
||||
#endif // OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT
|
||||
|
||||
/**
|
||||
* This method copies the PSDU and all attributes from another frame.
|
||||
@@ -1416,7 +1416,7 @@ private:
|
||||
uint8_t FindSecurityHeaderIndex(void) const;
|
||||
uint8_t SkipSecurityHeaderIndex(void) const;
|
||||
uint8_t FindPayloadIndex(void) const;
|
||||
#if OPENTHREAD_CONFIG_HEADER_IE_SUPPORT
|
||||
#if OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT
|
||||
uint8_t FindHeaderIeIndex(void) const;
|
||||
#endif
|
||||
|
||||
@@ -1580,9 +1580,9 @@ public:
|
||||
{
|
||||
mFlags |= kJoiningFlag;
|
||||
|
||||
#if OPENTHREAD_CONFIG_JOIN_BEACON_VERSION != kProtocolVersion
|
||||
#if OPENTHREAD_CONFIG_MAC_JOIN_BEACON_VERSION != kProtocolVersion
|
||||
mFlags &= ~kVersionMask;
|
||||
mFlags |= OPENTHREAD_CONFIG_JOIN_BEACON_VERSION << kVersionOffset;
|
||||
mFlags |= OPENTHREAD_CONFIG_MAC_JOIN_BEACON_VERSION << kVersionOffset;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@ void SubMac::StartCsmaBackoff(void)
|
||||
|
||||
VerifyOrExit(ShouldHandleCsmaBackOff(), BeginTransmit());
|
||||
|
||||
#if OPENTHREAD_CONFIG_DISABLE_CSMA_CA_ON_LAST_ATTEMPT
|
||||
#if OPENTHREAD_CONFIG_MAC_DISABLE_CSMA_CA_ON_LAST_ATTEMPT
|
||||
if ((mTransmitRetries > 0) && (mTransmitRetries == mTransmitFrame.GetMaxFrameRetries()))
|
||||
{
|
||||
BeginTransmit();
|
||||
@@ -272,7 +272,7 @@ void SubMac::BeginTransmit(void)
|
||||
|
||||
VerifyOrExit(mState == kStateCsmaBackoff);
|
||||
|
||||
#if OPENTHREAD_CONFIG_DISABLE_CSMA_CA_ON_LAST_ATTEMPT
|
||||
#if OPENTHREAD_CONFIG_MAC_DISABLE_CSMA_CA_ON_LAST_ATTEMPT
|
||||
if ((mTransmitRetries > 0) && (mTransmitRetries == mTransmitFrame.GetMaxFrameRetries()))
|
||||
{
|
||||
mTransmitFrame.SetCsmaCaEnabled(false);
|
||||
@@ -558,7 +558,7 @@ exit:
|
||||
return swEnergyScan;
|
||||
}
|
||||
|
||||
#if OPENTHREAD_CONFIG_HEADER_IE_SUPPORT
|
||||
#if OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT
|
||||
void SubMac::HandleFrameUpdated(Frame &aFrame)
|
||||
{
|
||||
mCallbacks.FrameUpdated(aFrame);
|
||||
@@ -651,7 +651,7 @@ extern "C" void otPlatRadioEnergyScanDone(otInstance *aInstance, int8_t aEnergyS
|
||||
}
|
||||
}
|
||||
|
||||
#if OPENTHREAD_CONFIG_HEADER_IE_SUPPORT
|
||||
#if OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT
|
||||
extern "C" void otPlatRadioFrameUpdated(otInstance *aInstance, otRadioFrame *aFrame)
|
||||
{
|
||||
Instance *instance = static_cast<Instance *>(aInstance);
|
||||
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
*/
|
||||
void EnergyScanDone(int8_t aMaxRssi);
|
||||
|
||||
#if OPENTHREAD_CONFIG_HEADER_IE_SUPPORT
|
||||
#if OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT
|
||||
/**
|
||||
* The method notifies user of `SubMac` to process transmit security for the frame, which happens when the
|
||||
* frame includes Header IE(s) that were updated before transmission.
|
||||
@@ -388,7 +388,7 @@ public:
|
||||
*/
|
||||
void HandleEnergyScanDone(int8_t aMaxRssi);
|
||||
|
||||
#if OPENTHREAD_CONFIG_HEADER_IE_SUPPORT
|
||||
#if OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT
|
||||
/**
|
||||
* This method handles a "Frame Updated" event from radio platform.
|
||||
*
|
||||
|
||||
@@ -104,7 +104,7 @@ void SubMac::Callbacks::EnergyScanDone(int8_t aMaxRssi)
|
||||
}
|
||||
}
|
||||
|
||||
#if OPENTHREAD_CONFIG_HEADER_IE_SUPPORT
|
||||
#if OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT
|
||||
void SubMac::Callbacks::FrameUpdated(Frame &aFrame)
|
||||
{
|
||||
/**
|
||||
@@ -150,7 +150,7 @@ void SubMac::Callbacks::EnergyScanDone(int8_t aMaxRssi)
|
||||
Get<LinkRaw>().InvokeEnergyScanDone(aMaxRssi);
|
||||
}
|
||||
|
||||
#if OPENTHREAD_CONFIG_HEADER_IE_SUPPORT
|
||||
#if OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT
|
||||
void SubMac::Callbacks::FrameUpdated(Frame &)
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
#include "config/link_quality.h"
|
||||
#include "config/link_raw.h"
|
||||
#include "config/logging.h"
|
||||
#include "config/mac.h"
|
||||
|
||||
#if OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE || OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE || \
|
||||
OPENTHREAD_CONFIG_COMMISSIONER_ENABLE || OPENTHREAD_CONFIG_JOINER_ENABLE
|
||||
|
||||
@@ -643,7 +643,7 @@ start:
|
||||
|
||||
if (dstpan == Get<Mac::Mac>().GetPanId())
|
||||
{
|
||||
#if OPENTHREAD_CONFIG_HEADER_IE_SUPPORT
|
||||
#if OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT
|
||||
// Handle a special case in IEEE 802.15.4-2015, when Pan ID Compression is 0, but Src Pan ID is not present:
|
||||
// Dest Address: Extended
|
||||
// Src Address: Extended
|
||||
|
||||
@@ -77,8 +77,8 @@ enum
|
||||
kMaxLinkRequestTimeout = 2000, ///< Maximum delay for receiving a Link Accept
|
||||
kMinTimeoutKeepAlive = (((kMaxChildKeepAliveAttempts + 1) * kUnicastRetransmissionDelay) /
|
||||
1000), ///< Minimum timeout(s) for keep alive
|
||||
kMinTimeoutDataPoll = (OPENTHREAD_CONFIG_MINIMUM_POLL_PERIOD +
|
||||
OPENTHREAD_CONFIG_FAILED_CHILD_TRANSMISSIONS * OPENTHREAD_CONFIG_RETX_POLL_PERIOD) /
|
||||
kMinTimeoutDataPoll = (OPENTHREAD_CONFIG_MAC_MINIMUM_POLL_PERIOD +
|
||||
OPENTHREAD_CONFIG_FAILED_CHILD_TRANSMISSIONS * OPENTHREAD_CONFIG_MAC_RETX_POLL_PERIOD) /
|
||||
1000, ///< Minimum timeout(s) for data poll
|
||||
kMinTimeout = (kMinTimeoutKeepAlive >= kMinTimeoutDataPoll ? kMinTimeoutKeepAlive
|
||||
: kMinTimeoutDataPoll), ///< Minimum timeout(s)
|
||||
|
||||
@@ -1757,7 +1757,7 @@ template <> otError NcpBase::HandlePropertyGet<SPINEL_PROP_CAPS>(void)
|
||||
SuccessOrExit(error = mEncoder.WriteUintPacked(SPINEL_CAP_NET_THREAD_1_1));
|
||||
SuccessOrExit(error = mEncoder.WriteUintPacked(SPINEL_CAP_PCAP));
|
||||
|
||||
#if OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
SuccessOrExit(error = mEncoder.WriteUintPacked(SPINEL_CAP_MAC_WHITELIST));
|
||||
#endif
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ NcpBase::PropertyHandler NcpBase::FindGetPropertyHandler(spinel_prop_key_t aKey)
|
||||
case SPINEL_PROP_MAC_CCA_FAILURE_RATE:
|
||||
handler = &NcpBase::HandlePropertyGet<SPINEL_PROP_MAC_CCA_FAILURE_RATE>;
|
||||
break;
|
||||
#if OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
case SPINEL_PROP_MAC_BLACKLIST:
|
||||
handler = &NcpBase::HandlePropertyGet<SPINEL_PROP_MAC_BLACKLIST>;
|
||||
break;
|
||||
@@ -777,7 +777,7 @@ NcpBase::PropertyHandler NcpBase::FindSetPropertyHandler(spinel_prop_key_t aKey)
|
||||
case SPINEL_PROP_THREAD_RLOC16_DEBUG_PASSTHRU:
|
||||
handler = &NcpBase::HandlePropertySet<SPINEL_PROP_THREAD_RLOC16_DEBUG_PASSTHRU>;
|
||||
break;
|
||||
#if OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
case SPINEL_PROP_MAC_WHITELIST:
|
||||
handler = &NcpBase::HandlePropertySet<SPINEL_PROP_MAC_WHITELIST>;
|
||||
break;
|
||||
@@ -1046,7 +1046,7 @@ NcpBase::PropertyHandler NcpBase::FindInsertPropertyHandler(spinel_prop_key_t aK
|
||||
handler = &NcpBase::HandlePropertyInsert<SPINEL_PROP_THREAD_ON_MESH_NETS>;
|
||||
break;
|
||||
#endif
|
||||
#if OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
case SPINEL_PROP_MAC_WHITELIST:
|
||||
handler = &NcpBase::HandlePropertyInsert<SPINEL_PROP_MAC_WHITELIST>;
|
||||
break;
|
||||
@@ -1131,7 +1131,7 @@ NcpBase::PropertyHandler NcpBase::FindRemovePropertyHandler(spinel_prop_key_t aK
|
||||
case SPINEL_PROP_THREAD_ASSISTING_PORTS:
|
||||
handler = &NcpBase::HandlePropertyRemove<SPINEL_PROP_THREAD_ASSISTING_PORTS>;
|
||||
break;
|
||||
#if OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
case SPINEL_PROP_MAC_WHITELIST:
|
||||
handler = &NcpBase::HandlePropertyRemove<SPINEL_PROP_MAC_WHITELIST>;
|
||||
break;
|
||||
|
||||
@@ -2506,7 +2506,7 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
#if OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
|
||||
template <> otError NcpBase::HandlePropertyGet<SPINEL_PROP_MAC_WHITELIST>(void)
|
||||
{
|
||||
@@ -2750,7 +2750,7 @@ exit:
|
||||
|
||||
return error;
|
||||
}
|
||||
#endif // OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#endif // OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
|
||||
template <> otError NcpBase::HandlePropertyGet<SPINEL_PROP_THREAD_MODE>(void)
|
||||
{
|
||||
@@ -2894,7 +2894,7 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
#if OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
|
||||
template <> otError NcpBase::HandlePropertyInsert<SPINEL_PROP_MAC_WHITELIST>(void)
|
||||
{
|
||||
@@ -2964,7 +2964,7 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#endif // OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
|
||||
template <> otError NcpBase::HandlePropertyRemove<SPINEL_PROP_THREAD_ASSISTING_PORTS>(void)
|
||||
{
|
||||
@@ -2985,7 +2985,7 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
#if OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
|
||||
template <> otError NcpBase::HandlePropertyRemove<SPINEL_PROP_MAC_WHITELIST>(void)
|
||||
{
|
||||
@@ -3044,7 +3044,7 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_ENABLE_MAC_FILTER
|
||||
#endif // OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
|
||||
#if OPENTHREAD_PLATFORM_POSIX_APP
|
||||
|
||||
|
||||
@@ -81,7 +81,6 @@ configure_options=" \
|
||||
--enable-ftd \
|
||||
--enable-jam-detection \
|
||||
--enable-legacy \
|
||||
--enable-mac-filter \
|
||||
--enable-ncp \
|
||||
--enable-service \
|
||||
--with-ncp-bus=uart \
|
||||
|
||||
@@ -146,6 +146,14 @@
|
||||
*/
|
||||
#define OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS 4
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
|
||||
*
|
||||
* Define to 1 to enable MAC filter support.
|
||||
*
|
||||
*/
|
||||
#define OPENTHREAD_CONFIG_MAC_FILTER_ENABLE 1
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_FILTER_SIZE
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user