| 6153a7ea | 27-Jul-2022 |
Vincent Mailhol <[email protected]> |
can: slcan: add software tx timestamps
TX timestamps were added to the can_put_echo_skb() function of can_dev modules in [1]. However, slcan does not rely on that function and as such does not offer
can: slcan: add software tx timestamps
TX timestamps were added to the can_put_echo_skb() function of can_dev modules in [1]. However, slcan does not rely on that function and as such does not offer TX timestamping.
Add a call to skb_tx_timestamp() in the slc_xmit() function so that the module now supports TX software timestamps.
[1] commit 741b91f1b0ea ("can: dev: can_put_echo_skb(): add software tx timestamps") Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=741b91f1b0ea34f00f6a7d4539b767c409291fcf
CC: Dario Binacchi <[email protected]> Signed-off-by: Vincent Mailhol <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
show more ...
|
| 4aeccfd8 | 28-Jul-2022 |
Dario Binacchi <[email protected]> |
MAINTAINERS: Add maintainer for the slcan driver
At the suggestion of its author Oliver Hartkopp ([1]), I take over the maintainer-ship and add myself to the authors of the driver.
[1] https://lore
MAINTAINERS: Add maintainer for the slcan driver
At the suggestion of its author Oliver Hartkopp ([1]), I take over the maintainer-ship and add myself to the authors of the driver.
[1] https://lore.kernel.org/all/[email protected]
Suggested-by: Oliver Hartkopp <[email protected]> Signed-off-by: Dario Binacchi <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
show more ...
|
| 3e720131 | 28-Jul-2022 |
Dario Binacchi <[email protected]> |
can: slcan: add support for listen-only mode
For non-legacy, i.e. ip based configuration, add support for listen-only mode. If listen-only is requested send a listen-only ("L\r") command instead of
can: slcan: add support for listen-only mode
For non-legacy, i.e. ip based configuration, add support for listen-only mode. If listen-only is requested send a listen-only ("L\r") command instead of an open ("O\r") command to the adapter.
Signed-off-by: Dario Binacchi <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
show more ...
|
| 341c5724 | 28-Jul-2022 |
Dario Binacchi <[email protected]> |
can: slcan: use the generic can_change_mtu()
It is useless to define a custom function that does nothing but always return the same error code. Better to use the generic can_change_mtu() function.
can: slcan: use the generic can_change_mtu()
It is useless to define a custom function that does nothing but always return the same error code. Better to use the generic can_change_mtu() function.
Signed-off-by: Dario Binacchi <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
show more ...
|
| 0cef03b1 | 28-Jul-2022 |
Dario Binacchi <[email protected]> |
can: slcan: change every `slc' occurrence in `slcan'
In the driver there are parts of code where the prefix `slc' is used and others where the prefix `slcan' is used instead. The patch replaces ever
can: slcan: change every `slc' occurrence in `slcan'
In the driver there are parts of code where the prefix `slc' is used and others where the prefix `slcan' is used instead. The patch replaces every occurrence of `slc' with `slcan', except for the netdev functions where, to avoid compilation conflicts, it was necessary to replace `slc' with `slcan_netdev'.
The patch does not make any functional changes.
Signed-off-by: Dario Binacchi <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
show more ...
|
| cfcb4465 | 28-Jul-2022 |
Dario Binacchi <[email protected]> |
can: slcan: remove legacy infrastructure
Taking inspiration from the drivers/net/can/can327.c driver and at the suggestion of its author Max Staudt, I removed legacy stuff like `SLCAN_MAGIC' and `sl
can: slcan: remove legacy infrastructure
Taking inspiration from the drivers/net/can/can327.c driver and at the suggestion of its author Max Staudt, I removed legacy stuff like `SLCAN_MAGIC' and `slcan_devs' resulting in simplification of the code and its maintainability.
The use of slcan_devs is derived from a very old kernel, since slip.c is about 30 years old, so today's kernel allows us to remove it.
The .hangup() ldisc function, which only called the ldisc .close(), has been removed since the ldisc layer calls .close() in a good place anyway.
The old slcanX name has been dropped in order to use the standard canX interface naming. The ioctl SIOCGIFNAME can be used to query the name of the created interface. Furthermore, there are several ways to get stable interfaces names in user space, e.g. udev or systemd-networkd.
The `maxdev' module parameter has also been removed.
CC: Max Staudt <[email protected]> Signed-off-by: Dario Binacchi <[email protected]> Reviewed-by: Max Staudt <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
show more ...
|
| c6887023 | 15-Jul-2022 |
Dario Binacchi <[email protected]> |
can: slcan: do not sleep with a spin lock held
We can't call close_candev() with a spin lock held, so release the lock before calling it. After calling close_candev(), we can update the fields of th
can: slcan: do not sleep with a spin lock held
We can't call close_candev() with a spin lock held, so release the lock before calling it. After calling close_candev(), we can update the fields of the private `struct can_priv' without having to acquire the lock.
Fixes: c4e54b063f42f ("can: slcan: use CAN network device driver API") Link: https://lore.kernel.org/linux-kernel/Ysrf1Yc5DaRGN1WE@xsang-OptiPlex-9020/ Link: https://lore.kernel.org/all/[email protected] Reported-by: kernel test robot <[email protected]> Signed-off-by: Dario Binacchi <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
show more ...
|
| 18de712a | 03-Jul-2022 |
Marc Kleine-Budde <[email protected]> |
can: slcan: clean up if/else
Remove braces after if() for single statement blocks, also remove else after return() in if() block.
Link: https://lore.kernel.org/all/20220704125954.1587880-6-mkl@peng
can: slcan: clean up if/else
Remove braces after if() for single statement blocks, also remove else after return() in if() block.
Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
show more ...
|
| 69a65396 | 03-Jul-2022 |
Marc Kleine-Budde <[email protected]> |
can: slcan: convert comparison to NULL into !val
All comparison to NULL could be written "!val", convert them to make checkpatch happy.
Link: https://lore.kernel.org/all/20220704125954.1587880-5-mk
can: slcan: convert comparison to NULL into !val
All comparison to NULL could be written "!val", convert them to make checkpatch happy.
Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
show more ...
|