diff options
author | Ajit Khaparde <ajitk@serverengines.com> | 2009-10-07 06:11:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-07 06:11:20 -0400 |
commit | 78122a52b39c9527fa3a32afbb6572964c17c651 (patch) | |
tree | 4cb39c1ddba9d552224dc1b1724637b091953beb /drivers/net/benet/be_main.c | |
parent | 32953543221cfe2bf0a24205fab225e5b8ed81a0 (diff) |
be2net: Get rid of net_device_stats from adapter.
adapter doesnot need to maintain a copy of net_device_stats.
Use the one already available in net_device. This patch takes care of the same.
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be_main.c')
-rw-r--r-- | drivers/net/benet/be_main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 6d5e81f7046f..0e92a1f055a2 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -141,7 +141,7 @@ void netdev_stats_update(struct be_adapter *adapter) | |||
141 | struct be_rxf_stats *rxf_stats = &hw_stats->rxf; | 141 | struct be_rxf_stats *rxf_stats = &hw_stats->rxf; |
142 | struct be_port_rxf_stats *port_stats = | 142 | struct be_port_rxf_stats *port_stats = |
143 | &rxf_stats->port[adapter->port_num]; | 143 | &rxf_stats->port[adapter->port_num]; |
144 | struct net_device_stats *dev_stats = &adapter->stats.net_stats; | 144 | struct net_device_stats *dev_stats = &adapter->netdev->stats; |
145 | struct be_erx_stats *erx_stats = &hw_stats->erx; | 145 | struct be_erx_stats *erx_stats = &hw_stats->erx; |
146 | 146 | ||
147 | dev_stats->rx_packets = port_stats->rx_total_frames; | 147 | dev_stats->rx_packets = port_stats->rx_total_frames; |
@@ -269,9 +269,7 @@ static void be_rx_eqd_update(struct be_adapter *adapter) | |||
269 | 269 | ||
270 | static struct net_device_stats *be_get_stats(struct net_device *dev) | 270 | static struct net_device_stats *be_get_stats(struct net_device *dev) |
271 | { | 271 | { |
272 | struct be_adapter *adapter = netdev_priv(dev); | 272 | return &dev->stats; |
273 | |||
274 | return &adapter->stats.net_stats; | ||
275 | } | 273 | } |
276 | 274 | ||
277 | static u32 be_calc_rate(u64 bytes, unsigned long ticks) | 275 | static u32 be_calc_rate(u64 bytes, unsigned long ticks) |