diff options
Diffstat (limited to 'drivers/net/hamradio')
-rw-r--r-- | drivers/net/hamradio/6pack.c | 2 | ||||
-rw-r--r-- | drivers/net/hamradio/baycom_epp.c | 17 | ||||
-rw-r--r-- | drivers/net/hamradio/bpqether.c | 2 | ||||
-rw-r--r-- | drivers/net/hamradio/dmascc.c | 10 | ||||
-rw-r--r-- | drivers/net/hamradio/hdlcdrv.c | 16 | ||||
-rw-r--r-- | drivers/net/hamradio/mkiss.c | 2 | ||||
-rw-r--r-- | drivers/net/hamradio/scc.c | 2 | ||||
-rw-r--r-- | drivers/net/hamradio/yam.c | 28 |
8 files changed, 21 insertions, 58 deletions
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c index 0b230222bfea..90999867a32c 100644 --- a/drivers/net/hamradio/6pack.c +++ b/drivers/net/hamradio/6pack.c | |||
@@ -293,7 +293,7 @@ static int sp_header(struct sk_buff *skb, struct net_device *dev, | |||
293 | { | 293 | { |
294 | #ifdef CONFIG_INET | 294 | #ifdef CONFIG_INET |
295 | if (type != htons(ETH_P_AX25)) | 295 | if (type != htons(ETH_P_AX25)) |
296 | return ax25_encapsulate(skb, dev, type, daddr, saddr, len); | 296 | return ax25_hard_header(skb, dev, type, daddr, saddr, len); |
297 | #endif | 297 | #endif |
298 | return 0; | 298 | return 0; |
299 | } | 299 | } |
diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c index 5298096afbdb..e4188d082f01 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) | 1174 | dev->hard_header = ax25_hard_header; |
1181 | 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/bpqether.c b/drivers/net/hamradio/bpqether.c index 2946e037a9b1..1756f0ed54cc 100644 --- a/drivers/net/hamradio/bpqether.c +++ b/drivers/net/hamradio/bpqether.c | |||
@@ -488,7 +488,7 @@ static void bpq_setup(struct net_device *dev) | |||
488 | dev->flags = 0; | 488 | dev->flags = 0; |
489 | 489 | ||
490 | #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) | 490 | #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) |
491 | dev->hard_header = ax25_encapsulate; | 491 | dev->hard_header = ax25_hard_header; |
492 | dev->rebuild_header = ax25_rebuild_header; | 492 | dev->rebuild_header = ax25_rebuild_header; |
493 | #endif | 493 | #endif |
494 | 494 | ||
diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c index f515245a3fd0..3be3f916643a 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) |
@@ -600,7 +600,7 @@ static int __init setup_adapter(int card_base, int type, int n) | |||
600 | dev->do_ioctl = scc_ioctl; | 600 | dev->do_ioctl = scc_ioctl; |
601 | dev->hard_start_xmit = scc_send_packet; | 601 | dev->hard_start_xmit = scc_send_packet; |
602 | dev->get_stats = scc_get_stats; | 602 | dev->get_stats = scc_get_stats; |
603 | dev->hard_header = ax25_encapsulate; | 603 | dev->hard_header = ax25_hard_header; |
604 | dev->rebuild_header = ax25_rebuild_header; | 604 | dev->rebuild_header = ax25_rebuild_header; |
605 | dev->set_mac_address = scc_set_mac_address; | 605 | dev->set_mac_address = scc_set_mac_address; |
606 | } | 606 | } |
diff --git a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c index b4c836e4fe86..dacc7687b97f 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) | 704 | dev->hard_header = ax25_hard_header; |
712 | 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/mkiss.c b/drivers/net/hamradio/mkiss.c index 63b1a2b86acb..d9fe64b46f4b 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c | |||
@@ -500,7 +500,7 @@ static int ax_header(struct sk_buff *skb, struct net_device *dev, unsigned short | |||
500 | { | 500 | { |
501 | #ifdef CONFIG_INET | 501 | #ifdef CONFIG_INET |
502 | if (type != htons(ETH_P_AX25)) | 502 | if (type != htons(ETH_P_AX25)) |
503 | return ax25_encapsulate(skb, dev, type, daddr, saddr, len); | 503 | return ax25_hard_header(skb, dev, type, daddr, saddr, len); |
504 | #endif | 504 | #endif |
505 | return 0; | 505 | return 0; |
506 | } | 506 | } |
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c index c27e417f32bf..6ace0e914fd1 100644 --- a/drivers/net/hamradio/scc.c +++ b/drivers/net/hamradio/scc.c | |||
@@ -1557,7 +1557,7 @@ static void scc_net_setup(struct net_device *dev) | |||
1557 | dev->stop = scc_net_close; | 1557 | dev->stop = scc_net_close; |
1558 | 1558 | ||
1559 | dev->hard_start_xmit = scc_net_tx; | 1559 | dev->hard_start_xmit = scc_net_tx; |
1560 | dev->hard_header = ax25_encapsulate; | 1560 | dev->hard_header = ax25_hard_header; |
1561 | dev->rebuild_header = ax25_rebuild_header; | 1561 | dev->rebuild_header = ax25_rebuild_header; |
1562 | dev->set_mac_address = scc_net_set_mac_address; | 1562 | dev->set_mac_address = scc_net_set_mac_address; |
1563 | dev->get_stats = scc_net_get_stats; | 1563 | dev->get_stats = scc_net_get_stats; |
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 | ||
1138 | static int __init yam_init_driver(void) | 1124 | static int __init yam_init_driver(void) |