Commit 5241c2d7 authored by Alexander Aring's avatar Alexander Aring Committed by David S. Miller

ipv6: addrconf: drop ieee802154 specific things

This patch removes ARPHRD_IEEE802154 from addrconf handling. In the
earlier days of 802.15.4 6LoWPAN, the interface type was ARPHRD_IEEE802154
which introduced several issues, because 802.15.4 interfaces used the
same type.

Since commit 965e613d ("ieee802154: 6lowpan: fix ARPHRD to
ARPHRD_6LOWPAN") we use ARPHRD_6LOWPAN for 6LoWPAN interfaces. This
patch will remove ARPHRD_IEEE802154 which is currently deadcode, because
ARPHRD_IEEE802154 doesn't reach the minimum 1280 MTU of IPv6.

Also we use 6LoWPAN EUI64 specific defines instead using link-layer
constanst from 802.15.4 link-layer header.

Cc: David S. Miller <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: James Morris <jmorris@namei.org>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: default avatarAlexander Aring <alex.aring@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6474de5f
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
#include <net/sock.h> #include <net/sock.h>
#include <net/snmp.h> #include <net/snmp.h>
#include <net/af_ieee802154.h> #include <net/6lowpan.h>
#include <net/firewire.h> #include <net/firewire.h>
#include <net/ipv6.h> #include <net/ipv6.h>
#include <net/protocol.h> #include <net/protocol.h>
...@@ -1947,9 +1947,9 @@ static void addrconf_leave_anycast(struct inet6_ifaddr *ifp) ...@@ -1947,9 +1947,9 @@ static void addrconf_leave_anycast(struct inet6_ifaddr *ifp)
static int addrconf_ifid_eui64(u8 *eui, struct net_device *dev) static int addrconf_ifid_eui64(u8 *eui, struct net_device *dev)
{ {
if (dev->addr_len != IEEE802154_ADDR_LEN) if (dev->addr_len != EUI64_ADDR_LEN)
return -1; return -1;
memcpy(eui, dev->dev_addr, 8); memcpy(eui, dev->dev_addr, EUI64_ADDR_LEN);
eui[0] ^= 2; eui[0] ^= 2;
return 0; return 0;
} }
...@@ -2041,7 +2041,6 @@ static int ipv6_generate_eui64(u8 *eui, struct net_device *dev) ...@@ -2041,7 +2041,6 @@ static int ipv6_generate_eui64(u8 *eui, struct net_device *dev)
case ARPHRD_IPGRE: case ARPHRD_IPGRE:
return addrconf_ifid_gre(eui, dev); return addrconf_ifid_gre(eui, dev);
case ARPHRD_6LOWPAN: case ARPHRD_6LOWPAN:
case ARPHRD_IEEE802154:
return addrconf_ifid_eui64(eui, dev); return addrconf_ifid_eui64(eui, dev);
case ARPHRD_IEEE1394: case ARPHRD_IEEE1394:
return addrconf_ifid_ieee1394(eui, dev); return addrconf_ifid_ieee1394(eui, dev);
...@@ -3066,7 +3065,6 @@ static void addrconf_dev_config(struct net_device *dev) ...@@ -3066,7 +3065,6 @@ static void addrconf_dev_config(struct net_device *dev)
(dev->type != ARPHRD_FDDI) && (dev->type != ARPHRD_FDDI) &&
(dev->type != ARPHRD_ARCNET) && (dev->type != ARPHRD_ARCNET) &&
(dev->type != ARPHRD_INFINIBAND) && (dev->type != ARPHRD_INFINIBAND) &&
(dev->type != ARPHRD_IEEE802154) &&
(dev->type != ARPHRD_IEEE1394) && (dev->type != ARPHRD_IEEE1394) &&
(dev->type != ARPHRD_TUNNEL6) && (dev->type != ARPHRD_TUNNEL6) &&
(dev->type != ARPHRD_6LOWPAN)) { (dev->type != ARPHRD_6LOWPAN)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment