aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet/be_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/benet/be_main.c')
-rw-r--r--drivers/net/benet/be_main.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 2f9b50156e0..0e92a1f055a 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;
@@ -197,7 +197,7 @@ void netdev_stats_update(struct be_adapter *adapter)
197 /* no space available in linux */ 197 /* no space available in linux */
198 dev_stats->tx_dropped = 0; 198 dev_stats->tx_dropped = 0;
199 199
200 dev_stats->multicast = port_stats->tx_multicastframes; 200 dev_stats->multicast = port_stats->rx_multicast_frames;
201 dev_stats->collisions = 0; 201 dev_stats->collisions = 0;
202 202
203 /* detailed tx_errors */ 203 /* detailed tx_errors */
@@ -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)
@@ -1899,8 +1897,8 @@ static void be_netdev_init(struct net_device *netdev)
1899 struct be_adapter *adapter = netdev_priv(netdev); 1897 struct be_adapter *adapter = netdev_priv(netdev);
1900 1898
1901 netdev->features |= NETIF_F_SG | NETIF_F_HW_VLAN_RX | NETIF_F_TSO | 1899 netdev->features |= NETIF_F_SG | NETIF_F_HW_VLAN_RX | NETIF_F_TSO |
1902 NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_FILTER | NETIF_F_IP_CSUM | 1900 NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_FILTER | NETIF_F_HW_CSUM |
1903 NETIF_F_IPV6_CSUM | NETIF_F_GRO; 1901 NETIF_F_GRO;
1904 1902
1905 netdev->flags |= IFF_MULTICAST; 1903 netdev->flags |= IFF_MULTICAST;
1906 1904