mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Cc: [email protected] Signed-off-by: "Eric W. Biederman" <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
21bfb8e933
commit
def6775369
3 changed files with 16 additions and 23 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue