diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-09-12 14:19:26 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-09-12 14:19:26 -0700 |
commit | c4bc7ee2e474819d3932e8d726fdf7cb0bdc00c1 (patch) | |
tree | d61545591c89893efb3d65195e5e4334571e7631 /drivers/net/hamradio/yam.c | |
parent | 59c2353dd045509626d7cc1953cb2d6b7358ab7a (diff) | |
download | linux-c4bc7ee2e474819d3932e8d726fdf7cb0bdc00c1.tar.bz2 |
[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 @@ #include <linux/if_arp.h> #include <linux/etherdevice.h> #include <linux/skbuff.h> -#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) -/* prototypes for ax25_encapsulate and ax25_rebuild_header */ #include <net/ax25.h> -#endif /* CONFIG_AX25 || CONFIG_AX25_MODULE */ - -/* make genksyms happy */ -#include <linux/ip.h> -#include <linux/udp.h> -#include <linux/tcp.h> #include <linux/kernel.h> #include <linux/proc_fs.h> @@ -1116,23 +1108,17 @@ static void yam_setup(struct net_device *dev) skb_queue_head_init(&yp->send_queue); -#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) dev->hard_header = ax25_encapsulate; dev->rebuild_header = ax25_rebuild_header; -#else /* CONFIG_AX25 || CONFIG_AX25_MODULE */ - dev->hard_header = NULL; - dev->rebuild_header = NULL; -#endif /* CONFIG_AX25 || CONFIG_AX25_MODULE */ dev->set_mac_address = yam_set_mac_address; - dev->type = ARPHRD_AX25; /* AF_AX25 device */ - dev->hard_header_len = 73; /* We do digipeaters now */ - dev->mtu = 256; /* AX25 is the default */ - dev->addr_len = 7; /* sizeof an ax.25 address */ - memcpy(dev->broadcast, ax25_bcast, 7); - memcpy(dev->dev_addr, ax25_test, 7); - + dev->type = ARPHRD_AX25; + dev->hard_header_len = AX25_MAX_HEADER_LEN; + dev->mtu = AX25_MTU; + dev->addr_len = AX25_ADDR_LEN; + memcpy(dev->broadcast, ax25_bcast, AX25_ADDR_LEN); + memcpy(dev->dev_addr, ax25_test, AX25_ADDR_LEN); } static int __init yam_init_driver(void) |