geneve: fix tx_errors statistics
authorHaishuang Yan <yanhaishuang@cmss.chinamobile.com>
Tue, 21 Jun 2016 08:26:49 +0000 (16:26 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Jun 2016 19:16:12 +0000 (15:16 -0400)
Tx errors present summation of errors encountered while transmitting
packets.

Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/geneve.c

index 305a04e..cc39cef 100644 (file)
@@ -958,8 +958,8 @@ tx_error:
                dev->stats.collisions++;
        else if (err == -ENETUNREACH)
                dev->stats.tx_carrier_errors++;
-       else
-               dev->stats.tx_errors++;
+
+       dev->stats.tx_errors++;
        return NETDEV_TX_OK;
 }
 
@@ -1048,8 +1048,8 @@ tx_error:
                dev->stats.collisions++;
        else if (err == -ENETUNREACH)
                dev->stats.tx_carrier_errors++;
-       else
-               dev->stats.tx_errors++;
+
+       dev->stats.tx_errors++;
        return NETDEV_TX_OK;
 }
 #endif