neigh: Move neigh_compat_output into ax25_ip.c
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 2 Mar 2015 06:07:37 +0000 (00:07 -0600)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Mar 2015 21:43:40 +0000 (16:43 -0500)
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>
include/net/neighbour.h
net/ax25/ax25_ip.c
net/core/neighbour.c

index 76f708486aaec76031a24ee5ff1d02f126185304..bc66babb5f27f85d32dea1d1ad042cb284faa0ee 100644 (file)
@@ -268,7 +268,6 @@ void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev);
 int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev);
 int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb);
 int neigh_connected_output(struct neighbour *neigh, struct sk_buff *skb);
-int neigh_compat_output(struct neighbour *neigh, struct sk_buff *skb);
 int neigh_direct_output(struct neighbour *neigh, struct sk_buff *skb);
 struct neighbour *neigh_event_ns(struct neigh_table *tbl,
                                                u8 *lladdr, void *saddr,
index bff12e0c9090ea7f10e65eaadcf3e20985c2e513..cc7415b33cfb1d14e745d9a922cbe0407310c2b7 100644 (file)
@@ -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;
 }
 
index 70fe9e10ac867f495086810dc6ea619f69d59368..8a319ff3e8d1edab66b65caaa9e29384423c3e1d 100644 (file)
@@ -1280,26 +1280,6 @@ static void neigh_hh_init(struct neighbour *n, struct dst_entry *dst)
        write_unlock_bh(&n->lock);
 }
 
-/* This function can be used in contexts, where only old dev_queue_xmit
- * worked, f.e. if you want to override normal output path (eql, shaper),
- * but resolution is not made yet.
- */
-
-int neigh_compat_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);
-}
-EXPORT_SYMBOL(neigh_compat_output);
-
 /* Slow and careful. */
 
 int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb)