6loWPAN: Some fixed to get a clean compile after last big changes to the radio IOCTLs.

This commit is contained in:
Gregory Nutt 2017-05-05 10:00:18 -06:00
parent 37d8e4fa79
commit 95bacb6a34
4 changed files with 19 additions and 11 deletions

View File

@ -425,8 +425,8 @@
/* 802.15.4 MAC driver ioctl definitions ************************************/
/* (see nuttx/include/wireless/ieee802154/ieee802154_mac.h */
#define _MAC802154IOCVALID(c) (_IOC_TYPE(c)==_MAC802154BASE)
#define _MAC802154IOC(nr) _IOC(_MAC802154BASE,nr)
#define _MAC802154IOCVALID(c) (_IOC_TYPE(c)==_MAC802154BASE)
#define _MAC802154IOC(nr) _IOC(_MAC802154BASE,nr)
/* boardctl() command definitions *******************************************/

View File

@ -134,7 +134,9 @@
* Public Types
****************************************************************************/
/* IPv^ TCP/UDP Definitions *************************************************/
/* IPv6 TCP/UDP/ICMPv6 Definitions ******************************************/
#ifdef CONFIG_NET_TCP
/* IPv6 + TCP header. Cast compatible based on IPv6 protocol field. */
struct ipv6tcp_hdr_s
@ -142,7 +144,9 @@ struct ipv6tcp_hdr_s
struct ipv6_hdr_s ipv6;
struct tcp_hdr_s tcp;
};
#endif
#ifdef CONFIG_NET_UDP
/* IPv6 + UDP header */
struct ipv6udp_hdr_s
@ -150,7 +154,9 @@ struct ipv6udp_hdr_s
struct ipv6_hdr_s ipv6;
struct udp_hdr_s udp;
};
#endif
#ifdef CONFIG_NET_ICMPv6
/* IPv6 + ICMPv6 header */
struct ipv6icmp_hdr_s
@ -158,6 +164,7 @@ struct ipv6icmp_hdr_s
struct ipv6_hdr_s ipv6;
struct icmpv6_iphdr_s icmp;
};
#endif
/* In order to provide a customizable IEEE 802.15.4 MAC header, a structure
* of meta data is passed to the MAC network driver, struct

View File

@ -57,6 +57,7 @@
#include <debug.h>
#include <nuttx/net/sixlowpan.h>
#include <nuttx/wireless/ieee802154/ieee802154_mac.h>
#include "sixlowpan/sixlowpan_internal.h"
@ -193,7 +194,7 @@ int sixlowpan_src_panid(FAR struct ieee802154_driver_s *ieee,
return ret;
}
*panid = arg.u.getreq.attr_value->panid;
*panid = arg.u.getreq.attr_value.mac.panid;
return OK;
}

View File

@ -577,10 +577,9 @@ static int lo_rmmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac)
static int lo_ioctl(FAR struct net_driver_s *dev, int cmd,
unsigned long arg)
{
FAR struct lo_driver_s *priv = (FAR struct lo_driver_s *)dev->d_private;
int ret = -ENOTTY;
#if 0
FAR struct lo_driver_s *priv = (FAR struct lo_driver_s *)dev->d_private;
/* Check for IOCTLs aimed at the IEEE802.15.4 MAC layer */
if (_MAC802154IOCVALID(cmd))
@ -588,12 +587,13 @@ static int lo_ioctl(FAR struct net_driver_s *dev, int cmd,
FAR struct ieee802154_netmac_s *netmac =
(FAR struct ieee802154_netmac_s *)arg;
}
/* No, check for IOCTLs aimed at the IEEE802.15.4 radio layer */
else
#endif
return ret;
{
/* Not a valid IEEE 802.15.4 MAC IOCTL command */
return -ENOTTY;
}
}
#endif