diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-09-12 17:19:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-09-12 17:19:26 -0400 |
commit | c4bc7ee2e474819d3932e8d726fdf7cb0bdc00c1 (patch) | |
tree | d61545591c89893efb3d65195e5e4334571e7631 /drivers/net/hamradio/yam.c | |
parent | 59c2353dd045509626d7cc1953cb2d6b7358ab7a (diff) |
[HAMRADIO]: driver cleanups
Misc related cleanups in hamradio drivers:
o Use symbolic constants instead of magic numbers
o Don't try to handle the case where AX.25 isn't configured - the kernel
configuration doesn't permit that.
o Remove useless headers
Signed-off-by: Ralf Baechle DL5RB <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hamradio/yam.c')
-rw-r--r-- | drivers/net/hamradio/yam.c | 26 |
1 files changed, 6 insertions, 20 deletions
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) |