aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-03-18 13:19:15 -0400
committerMarc Kleine-Budde <mkl@pengutronix.de>2014-04-01 05:55:02 -0400
commitb1d8e431bd5639c03ff99d08fd2d5d621969bdc5 (patch)
tree198ba84b0bb5735de9818244a0d9531583cb9f0c /drivers
parent5a7513adab521909e836fa5b9aaabbf22b48859f (diff)
can: c_can: Avoid led toggling for every packet.
There is no point to toggle the RX led for every packet. Especially if we have a full FIFO we want to avoid everything we can. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/can/c_can/c_can.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c
index 42c038d523c9..01dc4941e3d0 100644
--- a/drivers/net/can/c_can/c_can.c
+++ b/drivers/net/can/c_can/c_can.c
@@ -433,9 +433,6 @@ static int c_can_read_msg_object(struct net_device *dev, int iface, int ctrl)
433 433
434 stats->rx_packets++; 434 stats->rx_packets++;
435 stats->rx_bytes += frame->can_dlc; 435 stats->rx_bytes += frame->can_dlc;
436
437 can_led_event(dev, CAN_LED_EVENT_RX);
438
439 return 0; 436 return 0;
440} 437}
441 438
@@ -901,6 +898,10 @@ static int c_can_do_rx_poll(struct net_device *dev, int quota)
901 pkts += n; 898 pkts += n;
902 quota -= n; 899 quota -= n;
903 } 900 }
901
902 if (pkts)
903 can_led_event(dev, CAN_LED_EVENT_RX);
904
904 return pkts; 905 return pkts;
905} 906}
906 907