From: Manish Chopra Date: Mon, 22 Sep 2014 09:51:53 +0000 (-0400) Subject: qlcnic: Fix ordering of stats in stats buffer. X-Git-Tag: Ubuntu-snapdragon-4.4.0-1050.54~9564^2~19^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=3456399b031c4bd71b90521301c646b62dfd0caa;p=mirror_ubuntu-artful-kernel.git qlcnic: Fix ordering of stats in stats buffer. o When TX queues are not allocated, driver does not fill TX queues stats in the buffer. However, it is also not advancing data pointer by TX queue stats length, which would misplace all successive stats data in the buffer and will result in mismatch between stats strings and it's values. o Fix this by advancing data pointer by TX queue stats length when queues are not allocated. Signed-off-by: Manish Chopra Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c index 863c4456d2d1..494e8105adee 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c @@ -1343,6 +1343,8 @@ static void qlcnic_get_ethtool_stats(struct net_device *dev, tx_ring = &adapter->tx_ring[ring]; data = qlcnic_fill_tx_queue_stats(data, tx_ring); qlcnic_update_stats(adapter); + } else { + data += QLCNIC_TX_STATS_LEN; } }