.ndo_stop = sp_close,
.ndo_start_xmit = sp_xmit,
.ndo_set_mac_address = sp_set_mac_address,
+ .ndo_neigh_construct = ax25_neigh_construct,
};
static void sp_setup(struct net_device *dev)
dev->addr_len = AX25_ADDR_LEN;
dev->type = ARPHRD_AX25;
+ dev->neigh_priv_len = sizeof(struct ax25_neigh_priv);
dev->tx_queue_len = 10;
/* Only activated in AX.25 mode */
.ndo_do_ioctl = baycom_ioctl,
.ndo_start_xmit = baycom_send_packet,
.ndo_set_mac_address = baycom_set_mac_address,
+ .ndo_neigh_construct = ax25_neigh_construct,
};
/*
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 */
.ndo_start_xmit = bpq_xmit,
.ndo_set_mac_address = bpq_set_mac_address,
.ndo_do_ioctl = bpq_ioctl,
+ .ndo_neigh_construct = ax25_neigh_construct,
};
static void bpq_setup(struct net_device *dev)
#endif
dev->type = ARPHRD_AX25;
+ 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;
dev->addr_len = AX25_ADDR_LEN;
static void __init dev_setup(struct net_device *dev)
{
dev->type = ARPHRD_AX25;
+ dev->neigh_priv_len = sizeof(struct ax25_neigh_priv);
dev->hard_header_len = AX25_MAX_HEADER_LEN;
dev->mtu = 1500;
dev->addr_len = AX25_ADDR_LEN;
.ndo_start_xmit = scc_send_packet,
.ndo_do_ioctl = scc_ioctl,
.ndo_set_mac_address = scc_set_mac_address,
+ .ndo_neigh_construct = ax25_neigh_construct,
};
static int __init setup_adapter(int card_base, int type, int n)
.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,
};
/*
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 */
.ndo_stop = ax_close,
.ndo_start_xmit = ax_xmit,
.ndo_set_mac_address = ax_set_mac_address,
+ .ndo_neigh_construct = ax25_neigh_construct,
};
static void ax_setup(struct net_device *dev)
dev->hard_header_len = 0;
dev->addr_len = 0;
dev->type = ARPHRD_AX25;
+ dev->neigh_priv_len = sizeof(struct ax25_neigh_priv);
dev->tx_queue_len = 10;
dev->header_ops = &ax25_header_ops;
dev->netdev_ops = &ax_netdev_ops;
.ndo_set_mac_address = scc_net_set_mac_address,
.ndo_get_stats = scc_net_get_stats,
.ndo_do_ioctl = scc_net_ioctl,
+ .ndo_neigh_construct = ax25_neigh_construct,
};
/* ----> Initialize device <----- */
dev->flags = 0;
dev->type = ARPHRD_AX25;
+ 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;
dev->addr_len = AX25_ADDR_LEN;
.ndo_start_xmit = yam_send_packet,
.ndo_do_ioctl = yam_ioctl,
.ndo_set_mac_address = yam_set_mac_address,
+ .ndo_neigh_construct = ax25_neigh_construct,
};
static void yam_setup(struct net_device *dev)
dev->header_ops = &ax25_header_ops;
dev->type = ARPHRD_AX25;
+ dev->neigh_priv_len = sizeof(struct ax25_neigh_priv);
dev->hard_header_len = AX25_MAX_HEADER_LEN;
dev->mtu = AX25_MTU;
dev->addr_len = AX25_ADDR_LEN;
#include <linux/list.h>
#include <linux/slab.h>
#include <linux/atomic.h>
+#include <net/neighbour.h>
#define AX25_T1CLAMPLO 1
#define AX25_T1CLAMPHI (30 * HZ)
struct net_device *);
/* ax25_ip.c */
+int ax25_neigh_construct(struct neighbour *neigh);
extern const struct header_ops ax25_header_ops;
+struct ax25_neigh_priv {
+ struct neigh_ops ops;
+};
/* ax25_out.c */
ax25_cb *ax25_send_frame(struct sk_buff *, int, ax25_address *, ax25_address *,
return 1;
}
+int ax25_neigh_construct(struct neighbour *neigh)
+{
+ /* This trouble could be saved if ax25 would right a proper
+ * dev_queue_xmit function.
+ */
+ struct ax25_neigh_priv *priv = neighbour_priv(neigh);
+
+ if (neigh->tbl->family != AF_INET)
+ return -EINVAL;
+
+ priv->ops = *neigh->ops;
+ priv->ops.output = neigh_compat_output;
+ priv->ops.connected_output = neigh_compat_output;
+ return 0;
+}
+
#else /* INET */
static int ax25_hard_header(struct sk_buff *skb, struct net_device *dev,
return 1;
}
+int ax25_neigh_construct(struct neighbour *neigh)
+{
+ return 0;
+}
#endif
const struct header_ops ax25_header_ops = {
};
EXPORT_SYMBOL(ax25_header_ops);
+EXPORT_SYMBOL(ax25_neigh_construct);