Enable short source address matching after the first indirect tx attempt (#1696)

This commit changes the how to enable short source address matching
for a sleepy child. We remove the check for a successful tx to trigger
address mode change to handle the scenario where the child does receive
"Child ID Response" but parent misses the 15.4 ack from child. If the
"Child ID Response" does not make it to the child, then the child will
need to send a new "Child ID Request" which will cause the parent to
switch to using long address mode for source address matching.
This commit is contained in:
Abtin Keshavarzian
2017-05-03 09:08:01 -07:00
committed by Jonathan Hui
parent a7af1d44d3
commit 02c6ded8c7
2 changed files with 10 additions and 15 deletions
+10 -6
View File
@@ -1491,12 +1491,16 @@ void MeshForwarder::HandleSentFrame(Mac::Frame &aFrame, ThreadError aError)
child->SetIndirectFragmentOffset(0);
child->SetIndirectMessage(NULL);
// add short address for subsequent indirect messages after
// one indirect message to valid sleepy devices is sent out successfully
if (aError == kThreadError_None)
{
mSourceMatchController.SetSrcMatchAsShort(*child, true);
}
// Enable short source address matching after the first indirect
// message transmission attempt to the child. We intentionally do
// not check for successful tx here to address the scenario where
// the child does receive "Child ID Response" but parent misses the
// 15.4 ack from child. If the "Child ID Response" does not make it
// to the child, then the child will need to send a new "Child ID
// Request" which will cause the parent to switch to using long
// address mode for source address matching.
mSourceMatchController.SetSrcMatchAsShort(*child, true);
}
childIndex = mNetif.GetMle().GetChildIndex(*child);
-9
View File
@@ -170,15 +170,6 @@ public:
*/
void UpdateIndirectMessages(void);
/**
* This method sets whether or not to perform source matching on the extended or short address for Frame Pending determination.
*
* @param[in] aChild A reference to the child.
* @param[in] aMatchShort TRUE to match on short source address, FALSE otherwise.
*
*/
void SetSrcMatchAsShort(Child &aChild, bool aMatchShort);
/**
* This method returns a reference to the thread network interface instance.
*