From: Oliver Hartkopp <socketcan@hartkopp.net>
To: linux-can@vger.kernel.org
Cc: Oliver Hartkopp <socketcan@hartkopp.net>
Subject: [PATCH v4 5/5] can: bcm: add documentation for CAN FD support
Date: Sat, 4 Jun 2016 21:26:51 +0200 [thread overview]
Message-ID: <1465068411-24301-6-git-send-email-socketcan@hartkopp.net> (raw)
In-Reply-To: <1465068411-24301-1-git-send-email-socketcan@hartkopp.net>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
---
Documentation/networking/can.txt | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt
index d58ff84..aa15b9e 100644
--- a/Documentation/networking/can.txt
+++ b/Documentation/networking/can.txt
@@ -31,6 +31,7 @@ This file contains
4.2.4 Broadcast Manager message sequence transmission
4.2.5 Broadcast Manager receive filter timers
4.2.6 Broadcast Manager multiplex message receive filter
+ 4.2.7 Broadcast Manager CAN FD support
4.3 connected transport protocols (SOCK_SEQPACKET)
4.4 unconnected transport protocols (SOCK_DGRAM)
@@ -799,7 +800,7 @@ solution for a couple of reasons:
} mytxmsg;
(..)
- mytxmsg.nframes = 4;
+ mytxmsg.msg_head.nframes = 4;
(..)
write(s, &mytxmsg, sizeof(mytxmsg));
@@ -852,6 +853,28 @@ solution for a couple of reasons:
write(s, &msg, sizeof(msg));
+ 4.2.7 Broadcast Manager CAN FD support
+
+ The programming API of the CAN_BCM depends on struct can_frame which is
+ given as array directly behind the bcm_msg_head structure. To follow this
+ schema for the CAN FD frames a new flag 'CAN_FD_FRAME' in the bcm_msg_head
+ flags indicates that the concatenated CAN frame structures behind the
+ bcm_msg_head are defined as struct canfd_frame.
+
+ struct {
+ struct bcm_msg_head msg_head;
+ struct canfd_frame frame[5];
+ } msg;
+
+ msg.msg_head.opcode = RX_SETUP;
+ msg.msg_head.can_id = 0x42;
+ msg.msg_head.flags = CAN_FD_FRAME;
+ msg.msg_head.nframes = 5;
+ (..)
+
+ When using CAN FD frames for multiplex filtering the MUX mask is still
+ expected in the first 64 bit of the struct canfd_frame data section.
+
4.3 connected transport protocols (SOCK_SEQPACKET)
4.4 unconnected transport protocols (SOCK_DGRAM)
--
2.8.1
prev parent reply other threads:[~2016-06-04 19:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-04 19:26 [PATCH v4 0/5] Add support for CAN FD to broadcast manager (CAN_BCM) Oliver Hartkopp
2016-06-04 19:26 ` [PATCH v4 1/5] can: bcm: fix indention and other minor style issues Oliver Hartkopp
2016-06-04 19:26 ` [PATCH v4 2/5] can: bcm: use CAN frame instead of can_frame in comments Oliver Hartkopp
2016-06-04 19:26 ` [PATCH v4 3/5] can: bcm: unify bcm_msg_head handling and prepare function parameters Oliver Hartkopp
2016-06-04 19:26 ` [PATCH v4 4/5] can: bcm: add support for CAN FD frames Oliver Hartkopp
2016-06-17 10:23 ` Marc Kleine-Budde
2016-06-17 10:37 ` Oliver Hartkopp
2016-06-17 10:41 ` Marc Kleine-Budde
2016-06-04 19:26 ` Oliver Hartkopp [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465068411-24301-6-git-send-email-socketcan@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=linux-can@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).