]> rtime.felk.cvut.cz Git - linux-lin.git/blobdiff - sllin/sllin.c
sllin: add single-response flag
[linux-lin.git] / sllin / sllin.c
index 3437631c465b83a7569ad9cb1dddd6ab164d8c94..1febab2e3e48795d0d5a6066d2ab640b6f6b4bca 100644 (file)
@@ -41,7 +41,7 @@
  * Funded by:  Volkswagen Group Research
  */
 
-#define DEBUG                  1 /* Enables pr_debug() printouts */
+//#define DEBUG                        1 /* Enables pr_debug() printouts */
 
 #include <linux/module.h>
 #include <linux/moduleparam.h>
@@ -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;