aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hamradio/yam.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/hamradio/yam.c')
-rw-r--r--drivers/net/hamradio/yam.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index f52ee3162c51..fe22479eb202 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -60,15 +60,7 @@
60#include <linux/if_arp.h> 60#include <linux/if_arp.h>
61#include <linux/etherdevice.h> 61#include <linux/etherdevice.h>
62#include <linux/skbuff.h> 62#include <linux/skbuff.h>
63#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
64/* prototypes for ax25_encapsulate and ax25_rebuild_header */
65#include <net/ax25.h> 63#include <net/ax25.h>
66#endif /* CONFIG_AX25 || CONFIG_AX25_MODULE */
67
68/* make genksyms happy */
69#include <linux/ip.h>
70#include <linux/udp.h>
71#include <linux/tcp.h>
72 64
73#include <linux/kernel.h> 65#include <linux/kernel.h>
74#include <linux/proc_fs.h> 66#include <linux/proc_fs.h>
@@ -1116,23 +1108,17 @@ static void yam_setup(struct net_device *dev)
1116 1108
1117 skb_queue_head_init(&yp->send_queue); 1109 skb_queue_head_init(&yp->send_queue);
1118 1110
1119#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) 1111 dev->hard_header = ax25_hard_header;
1120 dev->hard_header = ax25_encapsulate;
1121 dev->rebuild_header = ax25_rebuild_header; 1112 dev->rebuild_header = ax25_rebuild_header;
1122#else /* CONFIG_AX25 || CONFIG_AX25_MODULE */
1123 dev->hard_header = NULL;
1124 dev->rebuild_header = NULL;
1125#endif /* CONFIG_AX25 || CONFIG_AX25_MODULE */
1126 1113
1127 dev->set_mac_address = yam_set_mac_address; 1114 dev->set_mac_address = yam_set_mac_address;
1128 1115
1129 dev->type = ARPHRD_AX25; /* AF_AX25 device */ 1116 dev->type = ARPHRD_AX25;
1130 dev->hard_header_len = 73; /* We do digipeaters now */ 1117 dev->hard_header_len = AX25_MAX_HEADER_LEN;
1131 dev->mtu = 256; /* AX25 is the default */ 1118 dev->mtu = AX25_MTU;
1132 dev->addr_len = 7; /* sizeof an ax.25 address */ 1119 dev->addr_len = AX25_ADDR_LEN;
1133 memcpy(dev->broadcast, ax25_bcast, 7); 1120 memcpy(dev->broadcast, ax25_bcast, AX25_ADDR_LEN);
1134 memcpy(dev->dev_addr, ax25_test, 7); 1121 memcpy(dev->dev_addr, ax25_test, AX25_ADDR_LEN);
1135
1136} 1122}
1137 1123
1138static int __init yam_init_driver(void) 1124static int __init yam_init_driver(void)