Commit 3456399b authored by Manish Chopra's avatar Manish Chopra Committed by David S. Miller

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: default avatarManish Chopra <manish.chopra@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6c0fd0df
...@@ -1343,6 +1343,8 @@ static void qlcnic_get_ethtool_stats(struct net_device *dev, ...@@ -1343,6 +1343,8 @@ static void qlcnic_get_ethtool_stats(struct net_device *dev,
tx_ring = &adapter->tx_ring[ring]; tx_ring = &adapter->tx_ring[ring];
data = qlcnic_fill_tx_queue_stats(data, tx_ring); data = qlcnic_fill_tx_queue_stats(data, tx_ring);
qlcnic_update_stats(adapter); qlcnic_update_stats(adapter);
} else {
data += QLCNIC_TX_STATS_LEN;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment