diff --git a/wireless/ieee802154/mac802154_netdev.c b/wireless/ieee802154/mac802154_netdev.c index 2c53009507a..f510cf7f5d3 100644 --- a/wireless/ieee802154/mac802154_netdev.c +++ b/wireless/ieee802154/mac802154_netdev.c @@ -205,9 +205,6 @@ static int macnet_addmac(FAR struct net_driver_s *dev, static int macnet_rmmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac); #endif -#ifdef CONFIG_NET_ICMPv6 -static void macnet_ipv6multicast(FAR struct macnet_driver_s *priv); -#endif #endif #ifdef CONFIG_NETDEV_IOCTL static int macnet_ioctl(FAR struct net_driver_s *dev, int cmd, @@ -676,13 +673,7 @@ static int macnet_ifup(FAR struct net_driver_s *dev) /* Initialize PHYs, the IEEE 802.15.4 interface, and setup up IEEE 802.15.4 interrupts */ #warning Missing logic - /* Instantiate the MAC address from priv->md_dev.i_dev.d_mac.ether_addr_octet */ - -#ifdef CONFIG_NET_ICMPv6 - /* Set up IPv6 multicast address filtering */ - - macnet_ipv6multicast(priv); -#endif + /* Setup up address filtering */ /* Set and activate a timer process */ @@ -840,9 +831,11 @@ static int macnet_addmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct macnet_driver_s *priv = (FAR struct macnet_driver_s *)dev->d_private; - /* Add the MAC address to the hardware multicast routing table */ + /* Add the MAC address to the hardware multicast routing table. Not used + * with IEEE 802.15.4 radios. + */ - return OK; + return -ENOSYS; } #endif @@ -869,86 +862,14 @@ static int macnet_rmmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct macnet_driver_s *priv = (FAR struct macnet_driver_s *)dev->d_private; - /* Add the MAC address to the hardware multicast routing table */ + /* Remove the MAC address from the hardware multicast routing table Not used + * with IEEE 802.15.4 radios. + */ - return OK; + return -ENOSYS; } #endif -/**************************************************************************** - * Name: macnet_ipv6multicast - * - * Description: - * Configure the IPv6 multicast MAC address. - * - * Parameters: - * priv - A reference to the private driver state structure - * - * Returned Value: - * OK on success; Negated errno on failure. - * - * Assumptions: - * - ****************************************************************************/ - -#ifdef CONFIG_NET_ICMPv6 -static void macnet_ipv6multicast(FAR struct macnet_driver_s *priv) -{ - FAR struct net_driver_s *dev; - uint16_t tmp16; - uint8_t mac[6]; - - /* For ICMPv6, we need to add the IPv6 multicast address - * - * For IPv6 multicast addresses, the IEEE 802.15.4 MAC is derived by - * the four low-order octets OR'ed with the MAC 33:33:00:00:00:00, - * so for example the IPv6 address FF02:DEAD:BEEF::1:3 would map - * to the IEEE 802.15.4 MAC address 33:33:00:01:00:03. - * - * NOTES: This appears correct for the ICMPv6 Router Solicitation - * Message, but the ICMPv6 Neighbor Solicitation message seems to - * use 33:33:ff:01:00:03. - */ - - mac[0] = 0x33; - mac[1] = 0x33; - - dev = &priv->dev; - tmp16 = dev->d_ipv6addr[6]; - mac[2] = 0xff; - mac[3] = tmp16 >> 8; - - tmp16 = dev->d_ipv6addr[7]; - mac[4] = tmp16 & 0xff; - mac[5] = tmp16 >> 8; - - ninfo("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); - - (void)macnet_addmac(dev, mac); - -#ifdef CONFIG_NET_ICMPv6_AUTOCONF - /* Add the IPv6 all link-local nodes IEEE 802.15.4 address. This is the - * address that we expect to receive ICMPv6 Router Advertisement - * packets. - */ - - (void)macnet_addmac(dev, g_ipv6_ethallnodes.ether_addr_octet); - -#endif /* CONFIG_NET_ICMPv6_AUTOCONF */ - -#ifdef CONFIG_NET_ICMPv6_ROUTER - /* Add the IPv6 all link-local routers IEEE 802.15.4 address. This is the - * address that we expect to receive ICMPv6 Router Solicitation - * packets. - */ - - (void)macnet_addmac(dev, g_ipv6_ethallrouters.ether_addr_octet); - -#endif /* CONFIG_NET_ICMPv6_ROUTER */ -} -#endif /* CONFIG_NET_ICMPv6 */ - /**************************************************************************** * Name: macnet_ioctl *