[mesh-forwarder] retransmit on CCA errors (#2846)

This commit changes the way the mesh forwarder layer handles transmit
attempt failures due to CCA failures.  Prior to this commit, the mesh
forwarder layer would simply drop the packet.  This commit keeps the
packet in the queue so that it can be retransmitted at a later time.  This
applies to both direct and indirect transmissions.
This commit is contained in:
Jonathan Hui
2018-07-02 10:44:50 -05:00
committed by GitHub
parent 10666f5c1e
commit 6bd04ddcda
2 changed files with 3 additions and 6 deletions
+1 -6
View File
@@ -951,11 +951,6 @@ void MeshForwarder::HandleSentFrame(Mac::Frame &aFrame, otError aError)
VerifyOrExit(mEnabled);
if (mSendMessage != NULL)
{
mSendMessage->SetOffset(mMessageNextOffset);
}
aFrame.GetDstAddr(macDest);
if ((neighbor = netif.GetMle().GetNeighbor(macDest)) != NULL)
@@ -995,7 +990,7 @@ void MeshForwarder::HandleSentFrame(Mac::Frame &aFrame, otError aError)
HandleSentFrameToChild(aFrame, aError, macDest);
VerifyOrExit(mSendMessage != NULL);
VerifyOrExit((mSendMessage != NULL) && ((aError == OT_ERROR_NONE) || (aError == OT_ERROR_NO_ACK)));
if (mSendMessage->GetDirectTransmission())
{
+2
View File
@@ -649,6 +649,8 @@ void MeshForwarder::HandleSentFrameToChild(const Mac::Frame &aFrame, otError aEr
}
}
VerifyOrExit((aError == OT_ERROR_NONE) || (aError == OT_ERROR_NO_ACK));
if (mMessageNextOffset < mSendMessage->GetLength())
{
if (mSendMessage == child->GetIndirectMessage())