From 714aeeb700f95b3c7772b5609eb79ebad8f1bb3b Mon Sep 17 00:00:00 2001 From: tanyanquan Date: Sat, 15 Nov 2025 08:17:19 +0800 Subject: [PATCH] [mac] force rx_on_when_idle to true during active scan (#12147) This commit forces mLinks.SetRxOnWhenIdle to true when performing an active scan. Previously, when we have an SED which is connected to a thread network (i.e. state == child), it is unable to perform scan command because rx is turned off. --- src/core/mac/mac.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/mac/mac.cpp b/src/core/mac/mac.cpp index edc455531..17d5080a2 100644 --- a/src/core/mac/mac.cpp +++ b/src/core/mac/mac.cpp @@ -293,10 +293,12 @@ void Mac::PerformActiveScan(void) if (UpdateScanChannel() == kErrorNone) { // If there are more channels to scan, send the beacon request. + mLinks.SetRxOnWhenIdle(true); BeginTransmit(); } else { + mLinks.SetRxOnWhenIdle(mRxOnWhenIdle); mLinks.SetPanId(mPanId); FinishOperation(); ReportActiveScanResult(nullptr);