aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/networking
diff options
context:
space:
mode:
authorOliver Hartkopp <socketcan@hartkopp.net>2016-06-17 09:35:28 -0400
committerMarc Kleine-Budde <mkl@pengutronix.de>2016-06-17 09:39:47 -0400
commit9be05c7f372940a2308e0301c5bdddab3022a449 (patch)
tree876d3852a6ee4d080cdd4bbc21aff8ca0304c545 /Documentation/networking
parent6f3b911d5f29b98752e5da86a295210c0c4f4e14 (diff)
can: bcm: add documentation for CAN FD support
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'Documentation/networking')
-rw-r--r--Documentation/networking/can.txt25
1 files changed, 24 insertions, 1 deletions
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt
index d58ff8467953..aa15b9ee2e70 100644
--- a/Documentation/networking/can.txt
+++ b/Documentation/networking/can.txt
@@ -31,6 +31,7 @@ This file contains
31 4.2.4 Broadcast Manager message sequence transmission 31 4.2.4 Broadcast Manager message sequence transmission
32 4.2.5 Broadcast Manager receive filter timers 32 4.2.5 Broadcast Manager receive filter timers
33 4.2.6 Broadcast Manager multiplex message receive filter 33 4.2.6 Broadcast Manager multiplex message receive filter
34 4.2.7 Broadcast Manager CAN FD support
34 4.3 connected transport protocols (SOCK_SEQPACKET) 35 4.3 connected transport protocols (SOCK_SEQPACKET)
35 4.4 unconnected transport protocols (SOCK_DGRAM) 36 4.4 unconnected transport protocols (SOCK_DGRAM)
36 37
@@ -799,7 +800,7 @@ solution for a couple of reasons:
799 } mytxmsg; 800 } mytxmsg;
800 801
801 (..) 802 (..)
802 mytxmsg.nframes = 4; 803 mytxmsg.msg_head.nframes = 4;
803 (..) 804 (..)
804 805
805 write(s, &mytxmsg, sizeof(mytxmsg)); 806 write(s, &mytxmsg, sizeof(mytxmsg));
@@ -852,6 +853,28 @@ solution for a couple of reasons:
852 853
853 write(s, &msg, sizeof(msg)); 854 write(s, &msg, sizeof(msg));
854 855
856 4.2.7 Broadcast Manager CAN FD support
857
858 The programming API of the CAN_BCM depends on struct can_frame which is
859 given as array directly behind the bcm_msg_head structure. To follow this
860 schema for the CAN FD frames a new flag 'CAN_FD_FRAME' in the bcm_msg_head
861 flags indicates that the concatenated CAN frame structures behind the
862 bcm_msg_head are defined as struct canfd_frame.
863
864 struct {
865 struct bcm_msg_head msg_head;
866 struct canfd_frame frame[5];
867 } msg;
868
869 msg.msg_head.opcode = RX_SETUP;
870 msg.msg_head.can_id = 0x42;
871 msg.msg_head.flags = CAN_FD_FRAME;
872 msg.msg_head.nframes = 5;
873 (..)
874
875 When using CAN FD frames for multiplex filtering the MUX mask is still
876 expected in the first 64 bit of the struct canfd_frame data section.
877
855 4.3 connected transport protocols (SOCK_SEQPACKET) 878 4.3 connected transport protocols (SOCK_SEQPACKET)
856 4.4 unconnected transport protocols (SOCK_DGRAM) 879 4.4 unconnected transport protocols (SOCK_DGRAM)
857 880