diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-12 15:55:09 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-12 15:55:09 -0700 |
commit | 61b22e693ea33af02f3380d3dbed9ee65a80c729 (patch) | |
tree | 4507ddcc055109e35a03820115abd7c09a5d0cdd /drivers/net | |
parent | 3a3bca5ace9123d1a6b890ceac2902ebf2b1fd50 (diff) | |
parent | 24b8e05dc1b03c1f80828e642838511c16e17250 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/bnx2.c | 2 | ||||
-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 | ||||
-rw-r--r-- | drivers/net/tg3.c | 10 |
10 files changed, 31 insertions, 60 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 83598e32179..3a2ace01e44 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -5015,6 +5015,7 @@ static struct ethtool_ops bnx2_ethtool_ops = { .phys_id = bnx2_phys_id, .get_stats_count = bnx2_get_stats_count, .get_ethtool_stats = bnx2_get_ethtool_stats, + .get_perm_addr = ethtool_op_get_perm_addr, }; /* Called with rtnl_lock */ @@ -5442,6 +5443,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) pci_set_drvdata(pdev, dev); memcpy(dev->dev_addr, bp->mac_addr, 6); + memcpy(dev->perm_addr, bp->mac_addr, 6); bp->name = board_info[ent->driver_data].name, printk(KERN_INFO "%s: %s (%c%d) PCI%s %s %dMHz found at mem %lx, " "IRQ %d, ", diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c index 0b230222bfe..90999867a32 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, { #ifdef CONFIG_INET if (type != htons(ETH_P_AX25)) - return ax25_encapsulate(skb, dev, type, daddr, saddr, len); + return ax25_hard_header(skb, dev, type, daddr, saddr, len); #endif return 0; } diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c index 5298096afbd..e4188d082f0 100644 --- a/drivers/net/hamradio/baycom_epp.c +++ b/drivers/net/hamradio/baycom_epp.c @@ -40,7 +40,7 @@ /*****************************************************************************/ -#include <linux/config.h> +#include <linux/crc-ccitt.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> @@ -48,18 +48,12 @@ #include <linux/workqueue.h> #include <linux/fs.h> #include <linux/parport.h> -#include <linux/smp_lock.h> -#include <asm/uaccess.h> #include <linux/if_arp.h> -#include <linux/kmod.h> #include <linux/hdlcdrv.h> #include <linux/baycom.h> #include <linux/jiffies.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 */ -#include <linux/crc-ccitt.h> +#include <asm/uaccess.h> /* --------------------------------------------------------------------- */ @@ -1177,13 +1171,8 @@ static void baycom_probe(struct net_device *dev) /* Fill in the fields of the device structure */ bc->skb = NULL; -#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) - dev->hard_header = ax25_encapsulate; + dev->hard_header = ax25_hard_header; 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 = baycom_set_mac_address; dev->type = ARPHRD_AX25; /* AF_AX25 device */ diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c index 2946e037a9b..1756f0ed54c 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) dev->flags = 0; #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) - dev->hard_header = ax25_encapsulate; + dev->hard_header = ax25_hard_header; dev->rebuild_header = ax25_rebuild_header; #endif diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c index f515245a3fd..3be3f916643 100644 --- a/drivers/net/hamradio/dmascc.c +++ b/drivers/net/hamradio/dmascc.c @@ -449,12 +449,12 @@ module_exit(dmascc_exit); static void dev_setup(struct net_device *dev) { dev->type = ARPHRD_AX25; - dev->hard_header_len = 73; + dev->hard_header_len = AX25_MAX_HEADER_LEN; dev->mtu = 1500; - dev->addr_len = 7; + dev->addr_len = AX25_ADDR_LEN; dev->tx_queue_len = 64; - memcpy(dev->broadcast, ax25_broadcast, 7); - memcpy(dev->dev_addr, ax25_test, 7); + memcpy(dev->broadcast, ax25_broadcast, AX25_ADDR_LEN); + memcpy(dev->dev_addr, ax25_test, AX25_ADDR_LEN); } 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) dev->do_ioctl = scc_ioctl; dev->hard_start_xmit = scc_send_packet; dev->get_stats = scc_get_stats; - dev->hard_header = ax25_encapsulate; + dev->hard_header = ax25_hard_header; dev->rebuild_header = ax25_rebuild_header; dev->set_mac_address = scc_set_mac_address; } diff --git a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c index b4c836e4fe8..dacc7687b97 100644 --- a/drivers/net/hamradio/hdlcdrv.c +++ b/drivers/net/hamradio/hdlcdrv.c @@ -42,7 +42,6 @@ /*****************************************************************************/ -#include <linux/config.h> #include <linux/module.h> #include <linux/types.h> #include <linux/net.h> @@ -52,20 +51,14 @@ #include <linux/errno.h> #include <linux/init.h> #include <linux/bitops.h> -#include <asm/uaccess.h> #include <linux/netdevice.h> #include <linux/if_arp.h> -#include <linux/etherdevice.h> #include <linux/skbuff.h> #include <linux/hdlcdrv.h> -/* prototypes for ax25_encapsulate and ax25_rebuild_header */ #include <net/ax25.h> +#include <asm/uaccess.h> -/* make genksyms happy */ -#include <linux/ip.h> -#include <linux/udp.h> -#include <linux/tcp.h> #include <linux/crc-ccitt.h> /* --------------------------------------------------------------------- */ @@ -708,13 +701,8 @@ static void hdlcdrv_setup(struct net_device *dev) s->skb = NULL; -#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) - dev->hard_header = ax25_encapsulate; + dev->hard_header = ax25_hard_header; 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 = hdlcdrv_set_mac_address; dev->type = ARPHRD_AX25; /* AF_AX25 device */ diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index 63b1a2b86ac..d9fe64b46f4 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 { #ifdef CONFIG_INET if (type != htons(ETH_P_AX25)) - return ax25_encapsulate(skb, dev, type, daddr, saddr, len); + return ax25_hard_header(skb, dev, type, daddr, saddr, len); #endif return 0; } diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c index c27e417f32b..6ace0e914fd 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) dev->stop = scc_net_close; dev->hard_start_xmit = scc_net_tx; - dev->hard_header = ax25_encapsulate; + dev->hard_header = ax25_hard_header; dev->rebuild_header = ax25_rebuild_header; dev->set_mac_address = scc_net_set_mac_address; dev->get_stats = scc_net_get_stats; diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c index f52ee3162c5..fe22479eb20 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->hard_header = ax25_hard_header; 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) diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index dc57352e5a9..7599f52e15b 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -6893,8 +6893,7 @@ static struct net_device_stats *tg3_get_stats(struct net_device *dev) get_stat64(&hw_stats->tx_octets); stats->rx_errors = old_stats->rx_errors + - get_stat64(&hw_stats->rx_errors) + - get_stat64(&hw_stats->rx_discards); + get_stat64(&hw_stats->rx_errors); stats->tx_errors = old_stats->tx_errors + get_stat64(&hw_stats->tx_errors) + get_stat64(&hw_stats->tx_mac_errors) + @@ -6922,6 +6921,9 @@ static struct net_device_stats *tg3_get_stats(struct net_device *dev) stats->rx_crc_errors = old_stats->rx_crc_errors + calc_crc_errors(tp); + stats->rx_missed_errors = old_stats->rx_missed_errors + + get_stat64(&hw_stats->rx_discards); + return stats; } @@ -8303,6 +8305,7 @@ static struct ethtool_ops tg3_ethtool_ops = { .get_ethtool_stats = tg3_get_ethtool_stats, .get_coalesce = tg3_get_coalesce, .set_coalesce = tg3_set_coalesce, + .get_perm_addr = ethtool_op_get_perm_addr, }; static void __devinit tg3_get_eeprom_size(struct tg3 *tp) @@ -9781,6 +9784,7 @@ static int __devinit tg3_get_macaddr_sparc(struct tg3 *tp) if (prom_getproplen(node, "local-mac-address") == 6) { prom_getproperty(node, "local-mac-address", dev->dev_addr, 6); + memcpy(dev->perm_addr, dev->dev_addr, 6); return 0; } } @@ -9792,6 +9796,7 @@ static int __devinit tg3_get_default_macaddr_sparc(struct tg3 *tp) struct net_device *dev = tp->dev; memcpy(dev->dev_addr, idprom->id_ethaddr, 6); + memcpy(dev->perm_addr, idprom->id_ethaddr, 6); return 0; } #endif @@ -9861,6 +9866,7 @@ static int __devinit tg3_get_device_address(struct tg3 *tp) #endif return -EINVAL; } + memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); return 0; } |