linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: linux-can@vger.kernel.org
Cc: Oliver Hartkopp <socketcan@hartkopp.net>
Subject: [PATCH v2 5/5] can: bcm: add documentation for CAN FD support
Date: Mon, 30 May 2016 20:36:30 +0200	[thread overview]
Message-ID: <1464633390-24299-6-git-send-email-socketcan@hartkopp.net> (raw)
In-Reply-To: <1464633390-24299-1-git-send-email-socketcan@hartkopp.net>

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
---
 Documentation/networking/can.txt | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt
index d58ff84..3ec4375 100644
--- a/Documentation/networking/can.txt
+++ b/Documentation/networking/can.txt
@@ -852,6 +852,28 @@ solution for a couple of reasons:
 
     write(s, &msg, sizeof(msg));
 
+  4.2.6 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


  parent reply	other threads:[~2016-05-30 18:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-30 18:36 [PATCH v2 0/5] Add support for CAN FD to broadcast manager (CAN_BCM) Oliver Hartkopp
2016-05-30 18:36 ` [PATCH v2 1/5] can: bcm: fix indention style Oliver Hartkopp
2016-05-30 18:36 ` [PATCH v2 2/5] can: bcm: use CAN frame instead of can_frame in comments Oliver Hartkopp
2016-05-30 18:36 ` [PATCH v2 3/5] can: bcm: unify bcm_msg_head handling and prepare function parameters Oliver Hartkopp
2016-05-30 18:36 ` [PATCH v2 4/5] can: bcm: add support for CAN FD frames Oliver Hartkopp
2016-05-30 18:36 ` Oliver Hartkopp [this message]
2016-05-30 18:43 ` Request for testing - Re: [PATCH v2 0/5] Add support for CAN FD to broadcast manager (CAN_BCM) Oliver Hartkopp

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=1464633390-24299-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).