From 59277d092572cbec89dd22f18a1239f3f580575b Mon Sep 17 00:00:00 2001 From: Lukasz Duda Date: Thu, 30 Mar 2023 00:08:53 +0200 Subject: [PATCH] [sub-mac] prefer scanning and RX after data poll over CSL RX (#8832) Signed-off-by: Lukasz Duda --- src/core/mac/sub_mac.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/mac/sub_mac.cpp b/src/core/mac/sub_mac.cpp index 54e3a6212..6f3e11bc8 100644 --- a/src/core/mac/sub_mac.cpp +++ b/src/core/mac/sub_mac.cpp @@ -1159,7 +1159,9 @@ void SubMac::HandleCslTimer(void) Get().UpdateCslSampleTime(mCslSampleTime.GetValue()); - if (RadioSupportsReceiveTiming() && (mState != kStateDisabled)) + // Scedule reception window for any state except RX - so that CSL RX Window has lower priority + // than scanning or RX after the data poll. + if (RadioSupportsReceiveTiming() && (mState != kStateDisabled) && (mState != kStateReceive)) { IgnoreError(Get().ReceiveAt(mCslChannel, mCslSampleTime.GetValue() - periodUs - timeAhead, timeAhead + timeAfter));