[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.
This commit is contained in:
tanyanquan
2025-11-14 16:17:19 -08:00
committed by GitHub
parent c0c7b11fd4
commit 714aeeb700
+2
View File
@@ -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);