mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
6loWPAN: Fixes hang in loopback test.
This commit is contained in:
@@ -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 */
|
||||
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user