summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2010-10-20 02:02:26 +0200
committerDavid S. Miller <davem@davemloft.net>2010-10-21 13:27:03 +0200
commit612eef4f4714d5c0e7127b7b245dbfc444d14a4b (patch)
tree3b04fca92d4d043163b36fbd8694d025e52c66ea /drivers
parentcan: mcp251x: fix endless loop in interrupt handler if CANINTF_MERRF is set (diff)
downloadlinux-612eef4f4714d5c0e7127b7b245dbfc444d14a4b.tar.xz
linux-612eef4f4714d5c0e7127b7b245dbfc444d14a4b.zip
can: mcp251x: fix generation of error frames
The function "mcp251x_error_skb" is used to generate error frames. They are identified by the "CAN_ERR_FLAG" in can_id. The function overwrites the can_id so that the frames show up as normal frames instead of error frames. This patch fixes the problem by or'ing the can_id instead of overwriting it. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Tested-by: Jargalan Nermunkh <jargalan.nermunkh@criticallink.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/can/mcp251x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c
index 59f40bce1ffc..6aadc3e32bd5 100644
--- a/drivers/net/can/mcp251x.c
+++ b/drivers/net/can/mcp251x.c
@@ -705,7 +705,7 @@ static void mcp251x_error_skb(struct net_device *net, int can_id, int data1)
skb = alloc_can_err_skb(net, &frame);
if (skb) {
- frame->can_id = can_id;
+ frame->can_id |= can_id;
frame->data[1] = data1;
netif_rx_ni(skb);
} else {