Commit Graph

980 Commits (ac0059db128ace46e74629d15100ea8519c0f080)

Author SHA1 Message Date
Marc Kleine-Budde ab9bd4f287
Merge pull request #318 from jgressma/feat/canfdtest-custom-can-ids-squashed
canfdtest: enables program use alongside existing CAN bus traffic
2021-10-25 15:33:09 +02:00
Jean Gressmann 2dde06801a canfdtest: adds support for custom CAN IDs
This change enables the use of this app alongside the traffic
typically found on a CAN bus.
2021-10-25 11:20:58 +02:00
Marc Kleine-Budde 607b643e0f
Merge pull request #319 from marckleinebudde/fix-j1939cat
j1939cat: properly fix printf format string to work both on 32 and 64 bit systems
2021-10-21 11:24:12 +02:00
Marc Kleine-Budde eb0eb78896 j1939cat: properly fix printf format string to work both on 32 and 64 bit systems
Fixes: 7b8457ce9f ("j1939cat: fix long long unsigned int warning in x_name printf")
Fixes: cc155d2f63 ("j1939cat: make use of new RX UAPI")
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2021-10-21 11:20:12 +02:00
Oliver Hartkopp 0edab8a402 cangen: improve help text to point out decimal places for the gap value
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2021-10-20 06:12:27 +02:00
Oliver Hartkopp 622fcbb9b3 Makefile: remove obsolete requirements for lib.h
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2021-10-19 08:57:22 +02:00
Marc Kleine-Budde 02e8b1ff39
Merge pull request #316 from Rubusch/lothar/cansniffer
cansniffer: fix detection of invalid provided CAN interface, refacs
2021-10-19 08:43:20 +02:00
Lothar Rubusch 9fd2b2e617 Makefile: clean mcp251xfd/*.o
make distclean depend on clean target in Makefile

Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
2021-10-18 22:30:21 +01:00
Lothar Rubusch 8bf57429fc cansniffer: simplify conditional cases
refactoring, reduce some levels of indention

Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
2021-10-18 22:30:21 +01:00
Lothar Rubusch 93a6cd6dfb cansniffer: simplify, avoiding else case indention
refactoring

Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
2021-10-18 22:08:44 +01:00
Lothar Rubusch d9368a6003 cansniffer: simplify logic
refactoring

Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
2021-10-18 22:08:05 +01:00
Lothar Rubusch c36bdc743f cansniffer: fix warning on unused variable
make use of former (not really) used "ret" in main()

Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
2021-10-18 22:02:21 +01:00
Oliver Hartkopp f7307b8290 can-utils: check for return values of if_nametoindex()
if_nametoindex() returns zero and a specific errno in the case the network
interface does not exist. The missing check leads to the use of the 'any'
CAN device but leaves the user alone as the user gets no error message.

Reported-by: Lothar Rubusch <lotophagon@protonmail.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2021-10-18 09:37:46 +02:00
Marc Kleine-Budde 5a3d1703d2
Merge pull request #314 from gibsson/master
j1939cat: fix comparison signs issue
2021-10-13 16:48:40 +02:00
Gary Bisson 57cc73d413 j1939cat: fix comparison signs issue
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
2021-10-13 16:32:32 +02:00
Marc Kleine-Budde 4236614ab6
Merge pull request #315 from marckleinebudde/can-calc-bit-timing
can-calc-bit-timing: can_fixup_bittiming(): change type of tseg1 and alltseg to unsigned int
2021-10-13 15:25:26 +02:00
Marc Kleine-Budde e03f3e1049 can-calc-bit-timing: can_fixup_bittiming(): change type of tseg1 and alltseg to unsigned int
All timing calculation is done with unsigned integers, so change type
of tseg1 and alltseg to unsigned int, too.

Link: https://lore.kernel.org/all/20211013130653.1513627-1-mkl@pengutronix.de
Link: https://github.com/linux-can/can-utils/pull/314
Reported-by: Gary Bisson <bisson.gary@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2021-10-13 15:21:56 +02:00
Oliver Hartkopp 7b8457ce9f j1939cat: fix long long unsigned int warning in x_name printf
warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 8 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]

Fixes: cc155d2f63 ("j1939cat: make use of new RX UAPI")
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2021-10-11 20:54:22 +02:00
Marc Kleine-Budde 9f269db070
Merge pull request #311 from olerem/j1939-rx-2021.07.16
J1939 rx state support
2021-08-20 13:56:50 +02:00
Oleksij Rempel cc155d2f63 j1939cat: make use of new RX UAPI
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
2021-08-20 13:38:42 +02:00
Oleksij Rempel 0107f07d83 include: import j1939.h from kernel v5.14-rc5+netdev-next
Import latest j1939.h to provide support for the RX state notifications

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
2021-08-20 10:21:20 +02:00
Marc Kleine-Budde 3615bac17e
Merge pull request #301 from kurt-vd/canbusload-fd
[V2] canbusload with FD support
2021-06-24 15:03:07 +02:00
Kurt Van Dijck 6382765bf6 canbusload: count databitrate seperately
Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
2021-06-24 14:44:50 +02:00
Marc Kleine-Budde c1aae77740
Merge pull request #302 from kurt-vd/more-chips-bittiming
[v2] more chips bittiming
2021-06-24 14:34:07 +02:00
Kurt Van Dijck 37f316ebc3 can-calc-bittiming: add mcan
Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
2021-06-24 14:16:22 +02:00
Kurt Van Dijck e319afb10f canbusload: count full payload for CANFD frames
Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
2021-06-24 12:47:37 +02:00
Kurt Van Dijck e9a298ec21 can-calc-bittiming: add c_can
Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
2021-06-24 05:19:15 +02:00
Kurt Van Dijck e19b5abb5c can-calc-bittiming: add stm32 bxcan
Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
2021-06-24 05:19:11 +02:00
Marc Kleine-Budde e9dd86fa5c
Merge pull request #300 from hartkopp/master
canplayer: add interactive single-step frame processing mode
2021-06-07 16:14:23 +02:00
Oliver Hartkopp affdc1b799 can: uapi: update can.h to latest upstream version
This update includes:

commit f5076c6ba02e ("can: uapi: can.h: mark union inside struct can_frame packed")
commit 7e97d274db92 ("can: uapi: update CAN-FD frame description")
commit 025468842212 ("can: uapi: introduce CANFD_FDF flag for mixed content in struct canfd_frame")

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2021-06-01 19:55:40 +02:00
Marc Kleine-Budde a70801f1ce
Merge pull request #297 from marckleinebudde/fix-candump
candump: fix epoll_wait() returning -1, errno == -EINTR
2021-05-28 12:22:59 +02:00
Marc Kleine-Budde 1b4e317083 candump: fix epoll_wait() returning -1, errno == -EINTR
-EINTR is not an error, just restart the syscall.

Fixes: 639498bc80 ("candump: use epoll_wait() instead of select()")
Link: https://github.com/linux-can/can-utils/issues/296
Reported-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2021-05-28 11:57:38 +02:00
Marc Kleine-Budde f8a2cf01fa
Merge pull request #293 from marckleinebudde/misc-cleanups
Misc cleanups
2021-05-06 15:59:52 +02:00
Marc Kleine-Budde b88a64e9fc slcan_attach: add bit rate table for -s parameter
Reported-by: Chris Fiege <chris.fiege.pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2021-05-06 15:56:07 +02:00
Marc Kleine-Budde 70eda640d5 slcan_attach: remove trailing whitespace
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2021-05-06 15:54:39 +02:00
Marc Kleine-Budde fd6829eb4f canfdtest: main(): sort switch/case in cmd line parser alphabetically
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2021-05-04 12:00:39 +02:00
Marc Kleine-Budde 4b94546cf9 canfdtest: print_usage(): sort options alphabetically
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2021-05-04 11:58:25 +02:00
Oliver Hartkopp aaa7fd215f canplayer: add interactive single-step frame processing mode
Wait for ENTER key to process next CAN frame from the log file.

As the new line is printed each time this approach doesn't win a
design price. But this feature is very uncommon and setting the
terminal into some raw mode to get the raw keyboard hits would
introduce a big code overhead to handle e.g. CTRL-C signals which
is a vital functionality for canplayer.

Link: https://github.com/linux-can/can-utils/issues/280
Suggested-by: https://github.com/nico0481
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2021-04-17 13:01:29 +02:00
Oliver Hartkopp 553f0d282b canplayer: fix usec overflow handling
Commit 9c2de072a0 ("asc2log: Correct usec overflow handling") fixed the
usec overflow handling which is contained in a similar code snippet in
canplayer too.

Cc: Simon Tegelid <simon.tegelid@niradynamics.se>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2021-04-16 16:18:40 +02:00
Simon Tegelid 9c2de072a0 asc2log: Correct usec overflow handling
This commit fixes these lines
(1614188635.1000000) can1 4A8##28001E9A318ACC0 R
to become this
(1614188636.000000) can1 4A8##28001E9A318ACC0 R
2021-04-16 14:30:50 +02:00
Marc Kleine-Budde 5116452e6d
Merge pull request #285 from kurnev/kurnev-patch-1
Update description for candump
2021-04-14 18:14:23 +02:00
Egor Kurnev bdf3e96ef9
Update candump.c 2021-04-14 18:49:49 +03:00
Oliver Hartkopp 02b330a87d cangen: fix help text for burst send option
The option '-c' requires a value. Add this hint to the help text.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2021-04-07 13:42:28 +02:00
Marc Kleine-Budde d2f5b3dbe0
Merge pull request #283 from Lauszus/master
Clarify that the mcp251x uses half of the external OSC clock as the base clock
2021-03-23 08:11:47 +01:00
Kristian Sloth Lauszus f11949b7d8 Use the name member to clarify the OSC clock connected to the mcp251x 2021-03-23 00:35:38 +01:00
Kristian Sloth Lauszus b1312a03f0 Added OSC with a clock of 8 MHz to the mcp251x reference clocks 2021-03-23 00:20:19 +01:00
Kristian Sloth Lauszus 890dcc4735 Added comment to clarify that the mcp251x uses half of the external OSC clock as the base clock 2021-03-23 00:19:56 +01:00
Marc Kleine-Budde cafc4bf748
Merge pull request #278 from marckleinebudde/mcp251xfd-dump
mcp251xfd-dump: add tool to decode chip and driver state of mcp251xfd
2021-02-13 23:45:57 +01:00
Marc Kleine-Budde 1792aebd8b mcp251xfd: add sample dev-coredump udev rule
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2021-02-13 23:36:43 +01:00
Marc Kleine-Budde 66de96d337 mcp251xfd-dump: add tool to decode chip and driver state of mcp251xfd
It works on dev coredump data generated by the mcp251xfd driver in
case of failures, as well as on regmap based register dumps.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2021-02-13 23:36:43 +01:00