6loWPAN: Fixes hang in loopback test.

This commit is contained in:
Gregory Nutt
2017-05-03 11:13:07 -06:00
parent 352d8260f2
commit cf988309aa
5 changed files with 106 additions and 105 deletions
+9 -12
View File
@@ -511,19 +511,16 @@ int sixlowpan_queue_frames(FAR struct ieee802154_driver_s *ieee,
qhead->io_pktlen += iob->io_len;
}
/* Submit all of the fragments to the MAC */
/* Submit all of the fragments to the MAC. We send all frames back-
* to-back like this to eliminate any possible condition where some
* frame which is not a fragment from this sequence from intervening.
*/
while (qhead != NULL)
{
iob = qhead;
qhead = iob->io_flink;
ret = sixlowpan_frame_submit(ieee, &meta, iob);
if (ret < 0)
{
nerr("ERROR: sixlowpan_frame_submit() failed: %d\n", ret);
}
}
ret = sixlowpan_frame_submit(ieee, &meta, qhead);
if (ret < 0)
{
nerr("ERROR: sixlowpan_frame_submit() failed: %d\n", ret);
}
/* Update the datagram TAG value */
-27
View File
@@ -66,33 +66,6 @@
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: sixlowpan_addrlen
*
* Description:
* Return the address length associated with a 2-bit address mode
*
* Input parameters:
* addrmode - The address mode
*
* Returned Value:
* The address length associated with the address mode.
*
****************************************************************************/
static inline uint8_t sixlowpan_addrlen(uint8_t addrmode)
{
switch (addrmode)
{
case FRAME802154_SHORTADDRMODE: /* 16-bit address */
return 2;
case FRAME802154_LONGADDRMODE: /* 64-bit address */
return 8;
default:
return 0;
}
}
/****************************************************************************
* Name: sixlowpan_addrnull
*