drivers: can: rcar: remote transmission request filters are not supported

The receive path for the Renesas R-Car CAN controller supports two RX
FIFOs, which are currently configured for standard 11-bit CAN ID data
frames in FIFO0, and extended 29-bit CAN ID data frames in FIFO1.

As this leaves no room for matching remote transmission request (RTR)
frames, have the driver return -ENOTSUP instead of silently accepting RTR
filters.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2022-09-15 18:09:02 +02:00 committed by Fabio Baltieri
parent 6352773c4b
commit 5ec7acca86

View file

@ -955,6 +955,10 @@ static int can_rcar_add_rx_filter(const struct device *dev, can_rx_callback_t cb
struct can_rcar_data *data = dev->data;
int filter_id;
if (filter->rtr == CAN_REMOTEREQUEST) {
return -ENOTSUP;
}
k_mutex_lock(&data->rx_mutex, K_FOREVER);
filter_id = can_rcar_add_rx_filter_unlocked(dev, cb, cb_arg, filter);
k_mutex_unlock(&data->rx_mutex);