diff options
author | Manish Chopra <manish.chopra@qlogic.com> | 2014-09-22 09:51:53 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-26 19:11:31 (GMT) |
commit | 3456399b031c4bd71b90521301c646b62dfd0caa (patch) | |
tree | ec7c7c14b734ac1657501ea6b07cbe0374ca54f4 /drivers | |
parent | 6c0fd0df0c44d1129ab65fc28d17f23a1c006a0c (diff) | |
download | linux-3456399b031c4bd71b90521301c646b62dfd0caa.tar.xz |
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 <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c index 863c445..494e810 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; } } |