summaryrefslogtreecommitdiff
path: root/drivers/net/hamradio/hdlcdrv.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-03-02 16:43:46 -0500
committerDavid S. Miller <davem@davemloft.net>2015-03-02 16:43:46 -0500
commitb898441f4ece44933af90b116b467f7864dd1ae7 (patch)
tree56316bfd883fa759f7a6fc7744088028b64e7b85 /drivers/net/hamradio/hdlcdrv.c
parent61e021f3b86cbbcc04cbe8ac7b7da2b8c94b5e8e (diff)
parent435e8eb27edb4da0b47b9b980239bd59057a7362 (diff)
downloadlinux-next-b898441f4ece44933af90b116b467f7864dd1ae7.tar.gz
Merge branch 'neigh_cleanups'
Eric W. Biederman says: ==================== Neighbour table and ax25 cleanups While looking at the neighbour table to what it would take to allow using next hops in a different address family than the current packets I found a partial resolution for my issues and I stumbled upon some work that makes the neighbour table code easier to understand and maintain. Long ago in a much younger kernel ax25 found a hack to use dev_rebuild_header to transmit it's packets instead of going through what today is ndo_start_xmit. When the neighbour table was rewritten into it's current form the ax25 code was such a challenge that arp_broken_ops appeard in arp.c and neigh_compat_output appeared in neighbour.c to keep the ax25 hack alive. With a little bit of work I was able to remove some of the hack that is the ax25 transmit path for ip packets and to isolate what remains into a slightly more readable piece of code in ax25_ip.c. Removing the need for the generic code to worry about ax25 special cases. After cleaning up the old ax25 hacks I also performed a little bit of work on neigh_resolve_output to remove the need for a dst entry and to ensure cached headers get a deterministic protocol value in their cached header. This guarantees that a cached header will not be different depending on which protocol of packet is transmitted, and it allows packets to be transmitted that don't have a dst entry. There remains a small amount of code that takes advantage of when packets have a dst entry but that is something different. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hamradio/hdlcdrv.c')
-rw-r--r--drivers/net/hamradio/hdlcdrv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c
index c67a27245072..435868a7b69c 100644
--- a/drivers/net/hamradio/hdlcdrv.c
+++ b/drivers/net/hamradio/hdlcdrv.c
@@ -626,6 +626,7 @@ static const struct net_device_ops hdlcdrv_netdev = {
.ndo_start_xmit = hdlcdrv_send_packet,
.ndo_do_ioctl = hdlcdrv_ioctl,
.ndo_set_mac_address = hdlcdrv_set_mac_address,
+ .ndo_neigh_construct = ax25_neigh_construct,
};
/*
@@ -676,6 +677,7 @@ static void hdlcdrv_setup(struct net_device *dev)
dev->header_ops = &ax25_header_ops;
dev->type = ARPHRD_AX25; /* AF_AX25 device */
+ dev->neigh_priv_len = sizeof(struct ax25_neigh_priv);
dev->hard_header_len = AX25_MAX_HEADER_LEN + AX25_BPQ_HEADER_LEN;
dev->mtu = AX25_DEF_PACLEN; /* eth_mtu is the default */
dev->addr_len = AX25_ADDR_LEN; /* sizeof an ax.25 address */