Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1d8e431 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Marc Kleine-Budde
Browse files

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: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 5a7513ad
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -433,9 +433,6 @@ static int c_can_read_msg_object(struct net_device *dev, int iface, int ctrl)

	stats->rx_packets++;
	stats->rx_bytes += frame->can_dlc;

	can_led_event(dev, CAN_LED_EVENT_RX);

	return 0;
}

@@ -901,6 +898,10 @@ static int c_can_do_rx_poll(struct net_device *dev, int quota)
		pkts += n;
		quota -= n;
	}

	if (pkts)
		can_led_event(dev, CAN_LED_EVENT_RX);

	return pkts;
}