mirror of
https://github.com/espressif/openthread.git
synced 2026-09-16 14:10:09 +00:00
[nrf528xx] don't return OT_ERROR_FAILED from otPlatRadioTransmit (#3757)
This commit is contained in:
committed by
Jonathan Hui
parent
db3ea162a8
commit
9fa48b54a8
@@ -333,7 +333,7 @@ otError otPlatRadioReceive(otInstance *aInstance, uint8_t aChannel)
|
|||||||
|
|
||||||
otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame)
|
otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame)
|
||||||
{
|
{
|
||||||
otError result = OT_ERROR_NONE;
|
bool result = true;
|
||||||
|
|
||||||
aFrame->mPsdu[-1] = aFrame->mLength;
|
aFrame->mPsdu[-1] = aFrame->mLength;
|
||||||
|
|
||||||
@@ -345,20 +345,18 @@ otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!nrf_802154_transmit_raw(&aFrame->mPsdu[-1], false))
|
result = nrf_802154_transmit_raw(&aFrame->mPsdu[-1], false);
|
||||||
{
|
|
||||||
result = OT_ERROR_FAILED;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clearPendingEvents();
|
clearPendingEvents();
|
||||||
|
otPlatRadioTxStarted(aInstance, aFrame);
|
||||||
|
|
||||||
if (result == OT_ERROR_NONE)
|
if (!result)
|
||||||
{
|
{
|
||||||
otPlatRadioTxStarted(aInstance, aFrame);
|
setPendingEvent(kPendingEventChannelAccessFailure);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return OT_ERROR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
otRadioFrame *otPlatRadioGetTransmitBuffer(otInstance *aInstance)
|
otRadioFrame *otPlatRadioGetTransmitBuffer(otInstance *aInstance)
|
||||||
|
|||||||
@@ -333,7 +333,7 @@ otError otPlatRadioReceive(otInstance *aInstance, uint8_t aChannel)
|
|||||||
|
|
||||||
otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame)
|
otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame)
|
||||||
{
|
{
|
||||||
otError result = OT_ERROR_NONE;
|
bool result = true;
|
||||||
|
|
||||||
aFrame->mPsdu[-1] = aFrame->mLength;
|
aFrame->mPsdu[-1] = aFrame->mLength;
|
||||||
|
|
||||||
@@ -345,20 +345,18 @@ otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!nrf_802154_transmit_raw(&aFrame->mPsdu[-1], false))
|
result = nrf_802154_transmit_raw(&aFrame->mPsdu[-1], false);
|
||||||
{
|
|
||||||
result = OT_ERROR_FAILED;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clearPendingEvents();
|
clearPendingEvents();
|
||||||
|
otPlatRadioTxStarted(aInstance, aFrame);
|
||||||
|
|
||||||
if (result == OT_ERROR_NONE)
|
if (!result)
|
||||||
{
|
{
|
||||||
otPlatRadioTxStarted(aInstance, aFrame);
|
setPendingEvent(kPendingEventChannelAccessFailure);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return OT_ERROR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
otRadioFrame *otPlatRadioGetTransmitBuffer(otInstance *aInstance)
|
otRadioFrame *otPlatRadioGetTransmitBuffer(otInstance *aInstance)
|
||||||
|
|||||||
Reference in New Issue
Block a user