]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/virtual.c
Added glue required for RTL hardware filters updates.
[lincan.git] / lincan / src / virtual.c
index 80ce0fbd5f07df20f61c442eaf63e97e545bfd48..05a12f9d5026e69ca65f12702fcb4c9484a1f719 100644 (file)
@@ -302,7 +302,7 @@ void virtual_schedule_next(struct msgobj_t *obj)
                if(cmd>=0) {
                        mod_timer(&obj->tx_timeout,
                                jiffies+virtual_bus_latency(obj));
-                       CANMSG("virtual: scheduled delivery\n");
+                       DEBUGMSG("virtual: scheduled delivery\n");
 
                } else          
                        can_msgobj_clear_fl(obj,TX_LOCK);
@@ -325,7 +325,7 @@ void virtual_do_tx_timeout(unsigned long data)
                /* Free transmitted slot */
                canque_free_outslot(obj->qends, obj->tx_qedge, obj->tx_slot);
                obj->tx_slot=NULL;
-               CANMSG("virtual: delayed delivery\n");
+               DEBUGMSG("virtual: delayed delivery\n");
        }
        can_msgobj_clear_fl(obj,TX_LOCK);
 
@@ -337,6 +337,9 @@ void virtual_do_tx_timeout(unsigned long data)
  * @chip: pointer to chip state structure
  * @obj: pointer to message object structure
  *
+ * Function is responsible for initiating message transmition.
+ * It is responsible for clearing of object TX_REQUEST flag
+ *
  * Return Value: negative value reports error.
  * File: src/virtual.c
  */
@@ -348,6 +351,8 @@ int virtual_wakeup_tx(struct chip_t *chip, struct msgobj_t *obj)
        struct canque_slot_t *slot;
        int cmd;
 
+       can_msgobj_clear_fl(obj,TX_REQUEST);
+
     #ifndef CAN_WITH_RTL
        if(!virtual_bus_latency(obj)) {
     #endif /*CAN_WITH_RTL*/
@@ -355,7 +360,7 @@ int virtual_wakeup_tx(struct chip_t *chip, struct msgobj_t *obj)
                while((cmd=canque_test_outslot(obj->qends, &qedge, &slot)) >= 0){
                        if(cmd==0) {
                                canque_filter_msg2edges(obj->qends, &slot->msg);
-                               CANMSG("virtual: direct delivery\n");
+                               DEBUGMSG("virtual: direct delivery\n");
                        }
                        canque_free_outslot(obj->qends, qedge, slot);
                }