qlcnic: Fix bug in TX statistics

o Driver was not updating TX stats so it was not populating
statistics in `ifconfig` command output.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Manish Chopra and committed by David S. Miller 1ac6762a f663dd9a

Changed files
+5 -1
drivers
net
ethernet
+1
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
··· 1711 1711 void qlcnic_83xx_detach_mailbox_work(struct qlcnic_adapter *); 1712 1712 void qlcnic_83xx_reinit_mbx_work(struct qlcnic_mailbox *mbx); 1713 1713 void qlcnic_83xx_free_mailbox(struct qlcnic_mailbox *mbx); 1714 + void qlcnic_update_stats(struct qlcnic_adapter *); 1714 1715 1715 1716 /* Adapter hardware abstraction */ 1716 1717 struct qlcnic_hardware_ops {
+1 -1
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
··· 1267 1267 return data; 1268 1268 } 1269 1269 1270 - static void qlcnic_update_stats(struct qlcnic_adapter *adapter) 1270 + void qlcnic_update_stats(struct qlcnic_adapter *adapter) 1271 1271 { 1272 1272 struct qlcnic_host_tx_ring *tx_ring; 1273 1273 int ring;
+3
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
··· 2780 2780 struct qlcnic_adapter *adapter = netdev_priv(netdev); 2781 2781 struct net_device_stats *stats = &netdev->stats; 2782 2782 2783 + if (test_bit(__QLCNIC_DEV_UP, &adapter->state)) 2784 + qlcnic_update_stats(adapter); 2785 + 2783 2786 stats->rx_packets = adapter->stats.rx_pkts + adapter->stats.lro_pkts; 2784 2787 stats->tx_packets = adapter->stats.xmitfinished; 2785 2788 stats->rx_bytes = adapter->stats.rxbytes + adapter->stats.lrobytes;