mirror of
https://github.com/espressif/openthread.git
synced 2026-08-01 00:27:47 +00:00
[radio-spinel] always be ready to ready from socket (#3319)
This commit changes the logic in `RadioSpinel` such that the HDLC socket is always added to read fd set in `UpdateFdSet()` replacing the existing code where read was not allowed during an ongoing 15.4 frame transmission. Note that during a frame transmission, radio can potentially receive a frame (e.g. during CSMA backoffs). Also other spinel frames such as logs can be received during tx.
This commit is contained in:
committed by
Jonathan Hui
parent
fac323d548
commit
0190f9bd9c
@@ -680,24 +680,16 @@ void RadioSpinel::UpdateFdSet(fd_set &aReadFdSet, fd_set &aWriteFdSet, int &aMax
|
||||
{
|
||||
int sockFd = mHdlcInterface.GetSocket();
|
||||
|
||||
if ((mState != kStateTransmitPending) && (mState != kStateTransmitDone))
|
||||
{
|
||||
FD_SET(sockFd, &aReadFdSet);
|
||||
FD_SET(sockFd, &aReadFdSet);
|
||||
|
||||
if (aMaxFd < sockFd)
|
||||
{
|
||||
aMaxFd = sockFd;
|
||||
}
|
||||
if (aMaxFd < sockFd)
|
||||
{
|
||||
aMaxFd = sockFd;
|
||||
}
|
||||
|
||||
if (mState == kStateTransmitPending)
|
||||
{
|
||||
FD_SET(sockFd, &aWriteFdSet);
|
||||
|
||||
if (aMaxFd < sockFd)
|
||||
{
|
||||
aMaxFd = sockFd;
|
||||
}
|
||||
}
|
||||
|
||||
if (!mFrameQueue.IsEmpty() || (mState == kStateTransmitDone))
|
||||
|
||||
Reference in New Issue
Block a user