diff options
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 10 |
1 files changed, 8 insertions, 2 deletions
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 | ||