projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0674208
)
can: bittiming: can_validate_bitrate(): report error via netlink
author
Marc Kleine-Budde
<mkl@pengutronix.de>
Wed, 1 Feb 2023 19:27:47 +0000
(20:27 +0100)
committer
Marc Kleine-Budde
<mkl@pengutronix.de>
Mon, 6 Feb 2023 12:57:27 +0000
(13:57 +0100)
Report an error to user space via netlink if the requested bit rate is
not supported by the device.
Link:
https://lore.kernel.org/all/20230202110854.2318594-18-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/dev/bittiming.c
patch
|
blob
|
history
diff --git
a/drivers/net/can/dev/bittiming.c
b/drivers/net/can/dev/bittiming.c
index 55714e08ca3addac4b880432456b06534c291283..0b93900b1dfa38225694a6f8166e64affeaee106 100644
(file)
--- a/
drivers/net/can/dev/bittiming.c
+++ b/
drivers/net/can/dev/bittiming.c
@@
-124,6
+124,9
@@
can_validate_bitrate(const struct net_device *dev, const struct can_bittiming *b
return 0;
}
+ NL_SET_ERR_MSG_FMT(extack, "bitrate %u bps not supported",
+ bt->brp);
+
return -EINVAL;
}