projects
/
elmcan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31929f2
)
Don't count RTR DLC as sent bytes
author
norly
<ny-git@enpas.org>
Sun, 12 Jun 2022 13:49:27 +0000
(15:49 +0200)
committer
norly
<ny-git@enpas.org>
Sun, 12 Jun 2022 13:49:27 +0000
(15:49 +0200)
RTR frames don't actually carry data, so bytes sent is 0.
module/can327.c
patch
|
blob
|
history
diff --git
a/module/can327.c
b/module/can327.c
index 799905fd2d29fc4fa48fa3e96c03f8e08bd11b25..82dbc668271e21f4696f1c9de7eb812d3cc4347b 100644
(file)
--- a/
module/can327.c
+++ b/
module/can327.c
@@
-887,7
+887,7
@@
static netdev_tx_t can327_netdev_start_xmit(struct sk_buff *skb,
spin_unlock(&elm->lock);
dev->stats.tx_packets++;
- dev->stats.tx_bytes += frame->len;
+ dev->stats.tx_bytes += frame->
can_id & CAN_RTR_FLAG ? 0 : frame->
len;
out:
kfree_skb(skb);