diff options
-rw-r--r-- | drivers/net/hamradio/baycom_epp.c | 15 | ||||
-rw-r--r-- | drivers/net/hamradio/dmascc.c | 8 | ||||
-rw-r--r-- | drivers/net/hamradio/hdlcdrv.c | 14 | ||||
-rw-r--r-- | drivers/net/hamradio/yam.c | 26 |
4 files changed, 13 insertions, 50 deletions
diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c index 5298096afbdb..21f76b24b28c 100644 --- a/drivers/net/hamradio/baycom_epp.c +++ b/drivers/net/hamradio/baycom_epp.c | |||
@@ -40,7 +40,7 @@ | |||
40 | 40 | ||
41 | /*****************************************************************************/ | 41 | /*****************************************************************************/ |
42 | 42 | ||
43 | #include <linux/config.h> | 43 | #include <linux/crc-ccitt.h> |
44 | #include <linux/module.h> | 44 | #include <linux/module.h> |
45 | #include <linux/kernel.h> | 45 | #include <linux/kernel.h> |
46 | #include <linux/init.h> | 46 | #include <linux/init.h> |
@@ -48,18 +48,12 @@ | |||
48 | #include <linux/workqueue.h> | 48 | #include <linux/workqueue.h> |
49 | #include <linux/fs.h> | 49 | #include <linux/fs.h> |
50 | #include <linux/parport.h> | 50 | #include <linux/parport.h> |
51 | #include <linux/smp_lock.h> | ||
52 | #include <asm/uaccess.h> | ||
53 | #include <linux/if_arp.h> | 51 | #include <linux/if_arp.h> |
54 | #include <linux/kmod.h> | ||
55 | #include <linux/hdlcdrv.h> | 52 | #include <linux/hdlcdrv.h> |
56 | #include <linux/baycom.h> | 53 | #include <linux/baycom.h> |
57 | #include <linux/jiffies.h> | 54 | #include <linux/jiffies.h> |
58 | #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) | ||
59 | /* prototypes for ax25_encapsulate and ax25_rebuild_header */ | ||
60 | #include <net/ax25.h> | 55 | #include <net/ax25.h> |
61 | #endif /* CONFIG_AX25 || CONFIG_AX25_MODULE */ | 56 | #include <asm/uaccess.h> |
62 | #include <linux/crc-ccitt.h> | ||
63 | 57 | ||
64 | /* --------------------------------------------------------------------- */ | 58 | /* --------------------------------------------------------------------- */ |
65 | 59 | ||
@@ -1177,13 +1171,8 @@ static void baycom_probe(struct net_device *dev) | |||
1177 | /* Fill in the fields of the device structure */ | 1171 | /* Fill in the fields of the device structure */ |
1178 | bc->skb = NULL; | 1172 | bc->skb = NULL; |
1179 | 1173 | ||
1180 | #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) | ||
1181 | dev->hard_header = ax25_encapsulate; | 1174 | dev->hard_header = ax25_encapsulate; |
1182 | dev->rebuild_header = ax25_rebuild_header; | 1175 | dev->rebuild_header = ax25_rebuild_header; |
1183 | #else /* CONFIG_AX25 || CONFIG_AX25_MODULE */ | ||
1184 | dev->hard_header = NULL; | ||
1185 | dev->rebuild_header = NULL; | ||
1186 | #endif /* CONFIG_AX25 || CONFIG_AX25_MODULE */ | ||
1187 | dev->set_mac_address = baycom_set_mac_address; | 1176 | dev->set_mac_address = baycom_set_mac_address; |
1188 | 1177 | ||
1189 | dev->type = ARPHRD_AX25; /* AF_AX25 device */ | 1178 | dev->type = ARPHRD_AX25; /* AF_AX25 device */ |
diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c index f515245a3fd0..d8a45db0800c 100644 --- a/drivers/net/hamradio/dmascc.c +++ b/drivers/net/hamradio/dmascc.c | |||
@@ -449,12 +449,12 @@ module_exit(dmascc_exit); | |||
449 | static void dev_setup(struct net_device *dev) | 449 | static void dev_setup(struct net_device *dev) |
450 | { | 450 | { |
451 | dev->type = ARPHRD_AX25; | 451 | dev->type = ARPHRD_AX25; |
452 | dev->hard_header_len = 73; | 452 | dev->hard_header_len = AX25_MAX_HEADER_LEN; |
453 | dev->mtu = 1500; | 453 | dev->mtu = 1500; |
454 | dev->addr_len = 7; | 454 | dev->addr_len = AX25_ADDR_LEN; |
455 | dev->tx_queue_len = 64; | 455 | dev->tx_queue_len = 64; |
456 | memcpy(dev->broadcast, ax25_broadcast, 7); | 456 | memcpy(dev->broadcast, ax25_broadcast, AX25_ADDR_LEN); |
457 | memcpy(dev->dev_addr, ax25_test, 7); | 457 | memcpy(dev->dev_addr, ax25_test, AX25_ADDR_LEN); |
458 | } | 458 | } |
459 | 459 | ||
460 | static int __init setup_adapter(int card_base, int type, int n) | 460 | static int __init setup_adapter(int card_base, int type, int n) |
diff --git a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c index b4c836e4fe86..d2b266697a5e 100644 --- a/drivers/net/hamradio/hdlcdrv.c +++ b/drivers/net/hamradio/hdlcdrv.c | |||
@@ -42,7 +42,6 @@ | |||
42 | 42 | ||
43 | /*****************************************************************************/ | 43 | /*****************************************************************************/ |
44 | 44 | ||
45 | #include <linux/config.h> | ||
46 | #include <linux/module.h> | 45 | #include <linux/module.h> |
47 | #include <linux/types.h> | 46 | #include <linux/types.h> |
48 | #include <linux/net.h> | 47 | #include <linux/net.h> |
@@ -52,20 +51,14 @@ | |||
52 | #include <linux/errno.h> | 51 | #include <linux/errno.h> |
53 | #include <linux/init.h> | 52 | #include <linux/init.h> |
54 | #include <linux/bitops.h> | 53 | #include <linux/bitops.h> |
55 | #include <asm/uaccess.h> | ||
56 | 54 | ||
57 | #include <linux/netdevice.h> | 55 | #include <linux/netdevice.h> |
58 | #include <linux/if_arp.h> | 56 | #include <linux/if_arp.h> |
59 | #include <linux/etherdevice.h> | ||
60 | #include <linux/skbuff.h> | 57 | #include <linux/skbuff.h> |
61 | #include <linux/hdlcdrv.h> | 58 | #include <linux/hdlcdrv.h> |
62 | /* prototypes for ax25_encapsulate and ax25_rebuild_header */ | ||
63 | #include <net/ax25.h> | 59 | #include <net/ax25.h> |
60 | #include <asm/uaccess.h> | ||
64 | 61 | ||
65 | /* make genksyms happy */ | ||
66 | #include <linux/ip.h> | ||
67 | #include <linux/udp.h> | ||
68 | #include <linux/tcp.h> | ||
69 | #include <linux/crc-ccitt.h> | 62 | #include <linux/crc-ccitt.h> |
70 | 63 | ||
71 | /* --------------------------------------------------------------------- */ | 64 | /* --------------------------------------------------------------------- */ |
@@ -708,13 +701,8 @@ static void hdlcdrv_setup(struct net_device *dev) | |||
708 | 701 | ||
709 | s->skb = NULL; | 702 | s->skb = NULL; |
710 | 703 | ||
711 | #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) | ||
712 | dev->hard_header = ax25_encapsulate; | 704 | dev->hard_header = ax25_encapsulate; |
713 | dev->rebuild_header = ax25_rebuild_header; | 705 | dev->rebuild_header = ax25_rebuild_header; |
714 | #else /* CONFIG_AX25 || CONFIG_AX25_MODULE */ | ||
715 | dev->hard_header = NULL; | ||
716 | dev->rebuild_header = NULL; | ||
717 | #endif /* CONFIG_AX25 || CONFIG_AX25_MODULE */ | ||
718 | dev->set_mac_address = hdlcdrv_set_mac_address; | 706 | dev->set_mac_address = hdlcdrv_set_mac_address; |
719 | 707 | ||
720 | dev->type = ARPHRD_AX25; /* AF_AX25 device */ | 708 | dev->type = ARPHRD_AX25; /* AF_AX25 device */ |
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c index f52ee3162c51..bfcf2011522f 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) | ||
1120 | dev->hard_header = ax25_encapsulate; | 1111 | 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 | ||
1138 | static int __init yam_init_driver(void) | 1124 | static int __init yam_init_driver(void) |