Skip to content

Commit

Permalink
use kMinCslIePeriod
Browse files Browse the repository at this point in the history
  • Loading branch information
edmont committed Sep 11, 2023
1 parent c2b2912 commit 8a7cbde
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/mac/mac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2329,7 +2329,7 @@ void Mac::ProcessCsl(const RxFrame &aFrame, const Address &aSrcAddr)
VerifyOrExit(child != nullptr);

csl = reinterpret_cast<const CslIe *>(cur + sizeof(HeaderIe));
VerifyOrExit(csl->GetPeriod() != 0);
VerifyOrExit(csl->GetPeriod() > kMinCslIePeriod);

child->SetCslPeriod(csl->GetPeriod());
child->SetCslPhase(csl->GetPhase());
Expand Down
4 changes: 3 additions & 1 deletion src/core/mac/mac.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace Mac {

constexpr uint32_t kDataPollTimeout =
OPENTHREAD_CONFIG_MAC_DATA_POLL_TIMEOUT; ///< Timeout for receiving Data Frame (in msec).
constexpr uint32_t kSleepDelay = 300; ///< Max sleep delay when frame is pending (in msec)
constexpr uint32_t kSleepDelay = 300; ///< Max sleep delay when frame is pending (in msec).

constexpr uint16_t kScanDurationDefault = OPENTHREAD_CONFIG_MAC_SCAN_DURATION; ///< Duration per channel (in msec).

Expand All @@ -87,6 +87,8 @@ constexpr uint8_t kMaxFrameRetriesCsl = 0;

constexpr uint8_t kTxNumBcast = OPENTHREAD_CONFIG_MAC_TX_NUM_BCAST; ///< Num of times broadcast frame is tx.

constexpr uint8_t kMinCslIePeriod = OPENTHREAD_CONFIG_MAC_CSL_MIN_PERIOD;

/**
* Defines the function pointer called on receiving an IEEE 802.15.4 Beacon during an Active Scan.
*
Expand Down

0 comments on commit 8a7cbde

Please sign in to comment.