lowpan6: move a function to delete one prototype

This commit is contained in:
goldsimon 2018-03-13 20:49:15 +01:00
parent 6070a7ef6a
commit d79416eee6

View File

@ -110,8 +110,6 @@ static const struct ieee_802154_addr ieee_802154_broadcast = {2, {0xff, 0xff}};
static struct ieee_802154_addr short_mac_addr = {2, {0, 0}};
#endif /* LWIP_6LOWPAN_INFER_SHORT_ADDRESS */
static void dequeue_datagram(struct lowpan6_reass_helper *lrh, struct lowpan6_reass_helper *prev);
static void
free_reass_datagram(struct lowpan6_reass_helper *lrh)
{
@ -124,6 +122,21 @@ free_reass_datagram(struct lowpan6_reass_helper *lrh)
mem_free(lrh);
}
/**
* Removes a datagram from the reassembly queue.
**/
static void
dequeue_datagram(struct lowpan6_reass_helper *lrh, struct lowpan6_reass_helper *prev)
{
if (lowpan6_data.reass_list == lrh) {
lowpan6_data.reass_list = lowpan6_data.reass_list->next_packet;
} else {
/* it wasn't the first, so it must have a valid 'prev' */
LWIP_ASSERT("sanity check linked list", prev != NULL);
prev->next_packet = lrh->next_packet;
}
}
/**
* Periodic timer for 6LowPAN functions:
*
@ -147,21 +160,6 @@ lowpan6_tmr(void)
}
}
/**
* Removes a datagram from the reassembly queue.
**/
static void
dequeue_datagram(struct lowpan6_reass_helper *lrh, struct lowpan6_reass_helper *prev)
{
if (lowpan6_data.reass_list == lrh) {
lowpan6_data.reass_list = lowpan6_data.reass_list->next_packet;
} else {
/* it wasn't the first, so it must have a valid 'prev' */
LWIP_ASSERT("sanity check linked list", prev != NULL);
prev->next_packet = lrh->next_packet;
}
}
/** Write the IEEE 802.15.4 header that encapsulates the 6LoWPAN frame.
* Src and dst PAN IDs are filled with the ID set by @ref lowpan6_set_pan_id.
*