aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/benet/be.h1
-rw-r--r--drivers/net/benet/be_ethtool.c2
-rw-r--r--drivers/net/benet/be_main.c6
3 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index a80da0e14a52..4b61a9154222 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -181,7 +181,6 @@ struct be_drvr_stats {
181 181
182struct be_stats_obj { 182struct be_stats_obj {
183 struct be_drvr_stats drvr_stats; 183 struct be_drvr_stats drvr_stats;
184 struct net_device_stats net_stats;
185 struct be_dma_mem cmd; 184 struct be_dma_mem cmd;
186}; 185};
187 186
diff --git a/drivers/net/benet/be_ethtool.c b/drivers/net/benet/be_ethtool.c
index 77c66da8738c..333729bd6d92 100644
--- a/drivers/net/benet/be_ethtool.c
+++ b/drivers/net/benet/be_ethtool.c
@@ -234,7 +234,7 @@ be_get_ethtool_stats(struct net_device *netdev,
234 struct be_rxf_stats *rxf_stats = &hw_stats->rxf; 234 struct be_rxf_stats *rxf_stats = &hw_stats->rxf;
235 struct be_port_rxf_stats *port_stats = 235 struct be_port_rxf_stats *port_stats =
236 &rxf_stats->port[adapter->port_num]; 236 &rxf_stats->port[adapter->port_num];
237 struct net_device_stats *net_stats = &adapter->stats.net_stats; 237 struct net_device_stats *net_stats = &netdev->stats;
238 struct be_erx_stats *erx_stats = &hw_stats->erx; 238 struct be_erx_stats *erx_stats = &hw_stats->erx;
239 void *p = NULL; 239 void *p = NULL;
240 int i; 240 int i;
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
270static struct net_device_stats *be_get_stats(struct net_device *dev) 270static 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
277static u32 be_calc_rate(u64 bytes, unsigned long ticks) 275static u32 be_calc_rate(u64 bytes, unsigned long ticks)