sfc: Fix transposed ptp_{under, over}size_sync_windows statistics
authorBen Hutchings <bhutchings@solarflare.com>
Fri, 17 Jan 2014 19:48:17 +0000 (19:48 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jan 2014 22:46:12 +0000 (14:46 -0800)
Somehow I transposed these two while bringing the original statistics
support upstream.

Fixes: 99691c4ac112 ('sfc: Add PTP counters to ethtool stats')
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Shradha Shah <sshah@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/ptp.c

index 7aa070813960552e08fa48d775f6de69c98f63ef..eb75fbd11a0115c73195f7d820ed051e3f720d71 100644 (file)
@@ -753,9 +753,9 @@ efx_ptp_process_times(struct efx_nic *efx, MCDI_DECLARE_STRUCT_PTR(synch_buf),
                if (window < SYNCHRONISATION_GRANULARITY_NS) {
                        ++ptp->invalid_sync_windows;
                } else if (corrected >= MAX_SYNCHRONISATION_NS) {
-                       ++ptp->undersize_sync_windows;
-               } else if (corrected < ptp->min_synchronisation_ns) {
                        ++ptp->oversize_sync_windows;
+               } else if (corrected < ptp->min_synchronisation_ns) {
+                       ++ptp->undersize_sync_windows;
                } else {
                        ngood++;
                        last_good = i;