Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278512
b: refs/heads/master
c: 0e6c9da
h: refs/heads/master
v: v3
  • Loading branch information
Matt Carlson authored and David S. Miller committed Dec 9, 2011
1 parent fd4f37d commit 768a6d1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 43598813386f6205edf3c21f1fe97f731ccb4f15
refs/heads/master: 0e6c9da35ef774109a1b5740144c9d442bd5a5b5
14 changes: 7 additions & 7 deletions trunk/drivers/net/ethernet/broadcom/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -9770,7 +9770,8 @@ static int tg3_open(struct net_device *dev)

static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *,
struct rtnl_link_stats64 *);
static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *);
static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *,
struct tg3_ethtool_stats *);

static int tg3_close(struct net_device *dev)
{
Expand Down Expand Up @@ -9804,9 +9805,7 @@ static int tg3_close(struct net_device *dev)
tg3_ints_fini(tp);

tg3_get_stats64(tp->dev, &tp->net_stats_prev);

memcpy(&tp->estats_prev, tg3_get_estats(tp),
sizeof(tp->estats_prev));
tg3_get_estats(tp, &tp->estats_prev);

tg3_napi_fini(tp);

Expand Down Expand Up @@ -9854,9 +9853,9 @@ static u64 calc_crc_errors(struct tg3 *tp)
estats->member = old_estats->member + \
get_stat64(&hw_stats->member)

static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *tp)
static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *tp,
struct tg3_ethtool_stats *estats)
{
struct tg3_ethtool_stats *estats = &tp->estats;
struct tg3_ethtool_stats *old_estats = &tp->estats_prev;
struct tg3_hw_stats *hw_stats = tp->hw_stats;

Expand Down Expand Up @@ -10762,7 +10761,8 @@ static void tg3_get_ethtool_stats(struct net_device *dev,
struct ethtool_stats *estats, u64 *tmp_stats)
{
struct tg3 *tp = netdev_priv(dev);
memcpy(tmp_stats, tg3_get_estats(tp), sizeof(tp->estats));

tg3_get_estats(tp, (struct tg3_ethtool_stats *)tmp_stats);
}

static __be32 *tg3_vpd_readblock(struct tg3 *tp, u32 *vpdlen)
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/ethernet/broadcom/tg3.h
Original file line number Diff line number Diff line change
Expand Up @@ -3013,7 +3013,6 @@ struct tg3 {
unsigned long rx_dropped;
unsigned long tx_dropped;
struct rtnl_link_stats64 net_stats_prev;
struct tg3_ethtool_stats estats;
struct tg3_ethtool_stats estats_prev;

DECLARE_BITMAP(tg3_flags, TG3_FLAG_NUMBER_OF_FLAGS);
Expand Down

0 comments on commit 768a6d1

Please sign in to comment.