Spirit: Correct setting of the length width field; Add multicast and broadcast addresses to radio properities.

This commit is contained in:
Gregory Nutt
2017-08-04 10:58:29 -06:00
parent f6ebcc2220
commit 733d96cf81
11 changed files with 175 additions and 62 deletions
+4 -1
View File
@@ -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);
+3 -3
View File
@@ -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)
{