mirror of
https://github.com/espressif/openthread.git
synced 2026-08-01 00:27:47 +00:00
[posix-app] always reset radio when init (#3149)
This commit is contained in:
@@ -523,7 +523,6 @@ void RadioSpinel::Init(const char *aRadioFile, const char *aRadioConfig)
|
||||
{
|
||||
mSockFd = OpenFile(aRadioFile, aRadioConfig);
|
||||
VerifyOrExit(mSockFd != -1, error = OT_ERROR_INVALID_ARGS);
|
||||
SuccessOrExit(error = SendReset());
|
||||
}
|
||||
#if OPENTHREAD_CONFIG_POSIX_APP_ENABLE_PTY_DEVICE
|
||||
else if (S_ISREG(st.st_mode))
|
||||
@@ -533,6 +532,7 @@ void RadioSpinel::Init(const char *aRadioFile, const char *aRadioConfig)
|
||||
}
|
||||
#endif // OPENTHREAD_CONFIG_POSIX_APP_ENABLE_PTY_DEVICE
|
||||
|
||||
SuccessOrExit(error = SendReset());
|
||||
SuccessOrExit(error = WaitResponse());
|
||||
VerifyOrExit(mIsReady, error = OT_ERROR_FAILED);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user