@@ -555,8 +555,6 @@ static void handle_core_msg_overrun(struct acc_core *core,
skb_hwtstamps(skb)->hwtstamp = acc_ts2ktime(priv->ov, msg->ts);
- stats->rx_packets++;
- stats->rx_bytes += cf->len;
netif_rx(skb);
}
@@ -613,8 +611,6 @@ static void handle_core_msg_buserr(struct acc_core *core,
skb_hwtstamps(skb)->hwtstamp = acc_ts2ktime(priv->ov, msg->ts);
- stats->rx_packets++;
- stats->rx_bytes += cf->len;
netif_rx(skb);
}
@@ -668,8 +664,6 @@ handle_core_msg_errstatechange(struct acc_core *core,
skb_hwtstamps(skb)->hwtstamp = acc_ts2ktime(priv->ov, msg->ts);
- stats->rx_packets++;
- stats->rx_bytes += cf->len;
netif_rx(skb);
} else {
stats->rx_dropped++;
The CAN error message frames (i.e. error skb) are an interface specific to socket CAN. The payload of the CAN error message frames does not correspond to any actual data sent on the wire. Only an error flag and a delimiter are transmitted when an error occurs (c.f. ISO 11898-1 section 10.4.4.2 "Error flag"). For this reason, it makes no sense to increment the rx_packets and rx_bytes fields of struct net_device_stats because no actual payload were transmitted on the wire. This patch brings the esd_402_pci driver in line with the other CAN drivers which have been changed after a suggestion of Vincent Mailhol. Suggested-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: Stefan Mätje <stefan.maetje@esd.eu> --- drivers/net/can/esd/esdacc.c | 6 ------ 1 file changed, 6 deletions(-)