diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-12 18:55:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-12 18:55:09 -0400 |
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 83598e32179c..3a2ace01e444 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -5015,6 +5015,7 @@ static struct ethtool_ops bnx2_ethtool_ops = { | |||
5015 | .phys_id = bnx2_phys_id, | 5015 | .phys_id = bnx2_phys_id, |
5016 | .get_stats_count = bnx2_get_stats_count, | 5016 | .get_stats_count = bnx2_get_stats_count, |
5017 | .get_ethtool_stats = bnx2_get_ethtool_stats, | 5017 | .get_ethtool_stats = bnx2_get_ethtool_stats, |
5018 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
5018 | }; | 5019 | }; |
5019 | 5020 | ||
5020 | /* Called with rtnl_lock */ | 5021 | /* Called with rtnl_lock */ |
@@ -5442,6 +5443,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
5442 | pci_set_drvdata(pdev, dev); | 5443 | pci_set_drvdata(pdev, dev); |
5443 | 5444 | ||
5444 | memcpy(dev->dev_addr, bp->mac_addr, 6); | 5445 | memcpy(dev->dev_addr, bp->mac_addr, 6); |
5446 | memcpy(dev->perm_addr, bp->mac_addr, 6); | ||
5445 | bp->name = board_info[ent->driver_data].name, | 5447 | bp->name = board_info[ent->driver_data].name, |
5446 | printk(KERN_INFO "%s: %s (%c%d) PCI%s %s %dMHz found at mem %lx, " | 5448 | printk(KERN_INFO "%s: %s (%c%d) PCI%s %s %dMHz found at mem %lx, " |
5447 | "IRQ %d, ", | 5449 | "IRQ %d, ", |
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) |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index dc57352e5a97..7599f52e15b3 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) | |||
6893 | get_stat64(&hw_stats->tx_octets); | 6893 | get_stat64(&hw_stats->tx_octets); |
6894 | 6894 | ||
6895 | stats->rx_errors = old_stats->rx_errors + | 6895 | stats->rx_errors = old_stats->rx_errors + |
6896 | get_stat64(&hw_stats->rx_errors) + | 6896 | get_stat64(&hw_stats->rx_errors); |
6897 | get_stat64(&hw_stats->rx_discards); | ||
6898 | stats->tx_errors = old_stats->tx_errors + | 6897 | stats->tx_errors = old_stats->tx_errors + |
6899 | get_stat64(&hw_stats->tx_errors) + | 6898 | get_stat64(&hw_stats->tx_errors) + |
6900 | get_stat64(&hw_stats->tx_mac_errors) + | 6899 | get_stat64(&hw_stats->tx_mac_errors) + |
@@ -6922,6 +6921,9 @@ static struct net_device_stats *tg3_get_stats(struct net_device *dev) | |||
6922 | stats->rx_crc_errors = old_stats->rx_crc_errors + | 6921 | stats->rx_crc_errors = old_stats->rx_crc_errors + |
6923 | calc_crc_errors(tp); | 6922 | calc_crc_errors(tp); |
6924 | 6923 | ||
6924 | stats->rx_missed_errors = old_stats->rx_missed_errors + | ||
6925 | get_stat64(&hw_stats->rx_discards); | ||
6926 | |||
6925 | return stats; | 6927 | return stats; |
6926 | } | 6928 | } |
6927 | 6929 | ||
@@ -8303,6 +8305,7 @@ static struct ethtool_ops tg3_ethtool_ops = { | |||
8303 | .get_ethtool_stats = tg3_get_ethtool_stats, | 8305 | .get_ethtool_stats = tg3_get_ethtool_stats, |
8304 | .get_coalesce = tg3_get_coalesce, | 8306 | .get_coalesce = tg3_get_coalesce, |
8305 | .set_coalesce = tg3_set_coalesce, | 8307 | .set_coalesce = tg3_set_coalesce, |
8308 | .get_perm_addr = ethtool_op_get_perm_addr, | ||
8306 | }; | 8309 | }; |
8307 | 8310 | ||
8308 | static void __devinit tg3_get_eeprom_size(struct tg3 *tp) | 8311 | static void __devinit tg3_get_eeprom_size(struct tg3 *tp) |
@@ -9781,6 +9784,7 @@ static int __devinit tg3_get_macaddr_sparc(struct tg3 *tp) | |||
9781 | if (prom_getproplen(node, "local-mac-address") == 6) { | 9784 | if (prom_getproplen(node, "local-mac-address") == 6) { |
9782 | prom_getproperty(node, "local-mac-address", | 9785 | prom_getproperty(node, "local-mac-address", |
9783 | dev->dev_addr, 6); | 9786 | dev->dev_addr, 6); |
9787 | memcpy(dev->perm_addr, dev->dev_addr, 6); | ||
9784 | return 0; | 9788 | return 0; |
9785 | } | 9789 | } |
9786 | } | 9790 | } |
@@ -9792,6 +9796,7 @@ static int __devinit tg3_get_default_macaddr_sparc(struct tg3 *tp) | |||
9792 | struct net_device *dev = tp->dev; | 9796 | struct net_device *dev = tp->dev; |
9793 | 9797 | ||
9794 | memcpy(dev->dev_addr, idprom->id_ethaddr, 6); | 9798 | memcpy(dev->dev_addr, idprom->id_ethaddr, 6); |
9799 | memcpy(dev->perm_addr, idprom->id_ethaddr, 6); | ||
9795 | return 0; | 9800 | return 0; |
9796 | } | 9801 | } |
9797 | #endif | 9802 | #endif |
@@ -9861,6 +9866,7 @@ static int __devinit tg3_get_device_address(struct tg3 *tp) | |||
9861 | #endif | 9866 | #endif |
9862 | return -EINVAL; | 9867 | return -EINVAL; |
9863 | } | 9868 | } |
9869 | memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); | ||
9864 | return 0; | 9870 | return 0; |
9865 | } | 9871 | } |
9866 | 9872 | ||