]> rtime.felk.cvut.cz Git - linux-lin.git/commitdiff
sllin: add single-response flag
authorTomas Tvaroha <tomas.tvaroha@e4t.cz>
Fri, 19 Aug 2016 09:21:52 +0000 (11:21 +0200)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Mon, 20 Mar 2017 08:58:43 +0000 (09:58 +0100)
sllin/linux/lin_bus.h
sllin/sllin.c

index dbd9a783e2c76ea22edd3eea43a41b42638f5f66..151d18f89e87e9041df350c4d702e11c9f933d2a 100644 (file)
@@ -11,6 +11,7 @@
 
 #define LIN_CACHE_RESPONSE     (1 << (LIN_CANFR_FLAGS_OFFS))
 #define LIN_CHECKSUM_EXTENDED  (1 << (LIN_CANFR_FLAGS_OFFS + 1))
+#define LIN_SINGLE_RESPONSE (1 << (LIN_CANFR_FLAGS_OFFS + 2))
 
 
 /* Error flags */
index 908cce9735e78ca4766e002d11aa10cc661ac7df..1febab2e3e48795d0d5a6066d2ab640b6f6b4bca 100644 (file)
@@ -1106,6 +1106,9 @@ static int sllin_kwthread(void *ptr)
                                if ((sce->frame_fl & LIN_CACHE_RESPONSE)
                                        && (sce->dlc > 0)) {
 
+                                       if (sce->frame_fl & LIN_SINGLE_RESPONSE)
+                                               sce->frame_fl &= ~LIN_CACHE_RESPONSE;
+
                                        netdev_dbg(sl->dev, "Sending LIN response from linfr_cache\n");
 
                                        lin_data = sce->data;
@@ -1256,6 +1259,9 @@ slstate_response_wait:
                        if ((sce->frame_fl & LIN_CACHE_RESPONSE)
                                        && (sce->dlc > 0)) {
 
+                               if (sce->frame_fl & LIN_SINGLE_RESPONSE)
+                                       sce->frame_fl &= ~LIN_CACHE_RESPONSE;
+
                                netdev_dbg(sl->dev, "Sending LIN response from linfr_cache\n");
 
                                lin_data = sce->data;