mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 21:36:28 +08:00
Spirit: Correct setting of the length width field; Add multicast and broadcast addresses to radio properities.
This commit is contained in:
@@ -326,7 +326,10 @@ static int sixlowpan_pktradio_metadata(FAR struct sixlowpan_driver_s *radio,
|
||||
radio->r_dev.d_mac.sixlowpan.nv_addr,
|
||||
radio->r_dev.d_mac.sixlowpan.nv_addrlen);
|
||||
|
||||
/* Set the destination address */
|
||||
/* Set the destination address.
|
||||
* REVISIT: Do wee need to check for multicast or broadcast addresses
|
||||
* here?
|
||||
*/
|
||||
|
||||
pktmeta->pm_dest.pa_addrlen = destmac->nv_addrlen;
|
||||
memcpy(pktmeta->pm_dest.pa_addr, destmac->nv_addr, destmac->nv_addrlen);
|
||||
|
||||
@@ -198,9 +198,9 @@ int sixlowpan_meta_data(FAR struct sixlowpan_driver_s *radio,
|
||||
{
|
||||
/* Broadcast requires short address mode. */
|
||||
|
||||
meta->destaddr.mode = IEEE802154_ADDRMODE_SHORT;
|
||||
meta->destaddr.saddr[0] = 0;
|
||||
meta->destaddr.saddr[1] = 0;
|
||||
meta->destaddr.mode = IEEE802154_ADDRMODE_SHORT;
|
||||
meta->destaddr.saddr[0] = 0xff;
|
||||
meta->destaddr.saddr[1] = 0xff;
|
||||
}
|
||||
else if (pktmeta->dextended != 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user