public inbox for linux-can@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cangen: Support RTR frames with random or increment CAN IDs
@ 2012-11-07  8:14 Alexander Stein
  2012-11-07  9:07 ` Oliver Hartkopp
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Stein @ 2012-11-07  8:14 UTC (permalink / raw)
  To: linux-can; +Cc: Alexander Stein

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
---
 cangen.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/cangen.c b/cangen.c
index efb8251..0037605 100644
--- a/cangen.c
+++ b/cangen.c
@@ -339,6 +339,9 @@ int main(int argc, char **argv)
 				frame.can_id |= CAN_EFF_FLAG;
 			} else
 				frame.can_id &= CAN_SFF_MASK;
+
+			if (rtr_frame)
+				frame.can_id |= CAN_RTR_FLAG;
 		}
 
 		if (dlc_mode == MODE_RANDOM) {
@@ -412,6 +415,9 @@ resend:
 				frame.can_id |= CAN_EFF_FLAG;
 			} else
 				frame.can_id &= CAN_SFF_MASK;
+
+			if (rtr_frame)
+				frame.can_id |= CAN_RTR_FLAG;
 		}
 
 		if (dlc_mode == MODE_INCREMENT) {
-- 
1.7.8.6


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-07  9:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-07  8:14 [PATCH] cangen: Support RTR frames with random or increment CAN IDs Alexander Stein
2012-11-07  9:07 ` Oliver Hartkopp
2012-11-07  9:26   ` Alexander Stein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox