diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2015-03-02 07:07:37 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-02 22:43:40 +0100 |
commit | def6775369fab9d36817b9a6bc58cab67f53f1dc (patch) | |
tree | aa69d297f88e4e835d6b1b53114f4a4872d08da7 /net/ax25 | |
parent | arp: Remove special case to give AX25 it's open arp operations. (diff) | |
download | linux-def6775369fab9d36817b9a6bc58cab67f53f1dc.tar.xz linux-def6775369fab9d36817b9a6bc58cab67f53f1dc.zip |
neigh: Move neigh_compat_output into ax25_ip.c
The only caller is now is ax25_neigh_construct so move
neigh_compat_output into ax25_ip.c make it static and rename it
ax25_neigh_output.
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-hams@vger.kernel.org
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ax25')
-rw-r--r-- | net/ax25/ax25_ip.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/net/ax25/ax25_ip.c b/net/ax25/ax25_ip.c index bff12e0c9090..cc7415b33cfb 100644 --- a/net/ax25/ax25_ip.c +++ b/net/ax25/ax25_ip.c @@ -216,6 +216,20 @@ put: return 1; } +static int ax25_neigh_output(struct neighbour *neigh, struct sk_buff *skb) +{ + struct net_device *dev = skb->dev; + + __skb_pull(skb, skb_network_offset(skb)); + + if (dev_hard_header(skb, dev, ntohs(skb->protocol), NULL, NULL, + skb->len) < 0 && + dev_rebuild_header(skb)) + return 0; + + return dev_queue_xmit(skb); +} + int ax25_neigh_construct(struct neighbour *neigh) { /* This trouble could be saved if ax25 would right a proper @@ -227,8 +241,8 @@ int ax25_neigh_construct(struct neighbour *neigh) return -EINVAL; priv->ops = *neigh->ops; - priv->ops.output = neigh_compat_output; - priv->ops.connected_output = neigh_compat_output; + priv->ops.output = ax25_neigh_output; + priv->ops.connected_output = ax25_neigh_output; return 0; } |