RT-Socket-CAN: correct bug with filter registration
PATCH 1/1 RT-Socket-CAN: correct bug with filter registration
Hi Jan and Sebastian,
attached is the patch fixing the filter problem. I'm going to apply it to the trunk as well if there are no complaints.
Wolfgang.
ChangeLog +6 -0
@@ -1,3 +1,9 @@ +2008-10-29 Wolfgang Grandegger <[email protected]> + + * ksrc/drivers/can/rtcan_raw_filter.c(rtcan_raw_mount_filter): + Applying the filter mask required for fast filter checks got lost + somehow with commit 2202. + 2008-10-28 Gilles Chanteperdrix <[email protected]> * ksrc/nucleus/thread.c (xnthread_init): Change initialization
drivers/can/rtcan_raw_filter.c +3 -0
@@ -62,6 +62,9 @@ recv_filter->can_id = filter->can_id; recv_filter->can_mask = filter->can_mask & ~CAN_INV_FILTER ; } + +/* Apply mask for fast filter check */ + recv_filter->can_id &= recv_filter->can_mask; }
Quoted 4 lines · Wolfgang Grandegger
Hi Jan and Sebastian,
attached is the patch fixing the filter problem. I'm going to apply it to the trunk as well if there are no complaints.
No complaints from my side.
Quoted 29 lines
Wolfgang.
Index: ChangeLog
===================================================================ChangeLog +6
-0@@ -1,3 +1,9 @@ +2008-10-29 Wolfgang Grandegger <[email protected]> + + * ksrc/drivers/can/rtcan_raw_filter.c(rtcan_raw_mount_filter): + Applying the filter mask required for fast filter checks got lost + somehow with commit 2202. + 2008-10-28 Gilles Chanteperdrix <[email protected]> * ksrc/nucleus/thread.c (xnthread_init): Change initializationIndex:
ksrc/drivers/can/rtcan_raw_filter.c
===================================================================drivers/can/rtcan_raw_filter.c +3
-0@@ -62,6 +62,9 @@ recv_filter->can_id = filter->can_id; recv_filter->can_mask = filter->can_mask & ~CAN_INV_FILTER ; } + +/* Apply mask for fast filter check */ + recv_filter->can_id &= recv_filter->can_mask; }
Signature · 1 line
Sebastian
Quoted 26 lines · Wolfgang Grandegger
Hi Jan and Sebastian,
attached is the patch fixing the filter problem. I'm going to apply it to the trunk as well if there are no complaints.
Wolfgang.
Index: ChangeLog
===================================================================ChangeLog +6
-0@@ -1,3 +1,9 @@ +2008-10-29 Wolfgang Grandegger <[email protected]> + + * ksrc/drivers/can/rtcan_raw_filter.c(rtcan_raw_mount_filter): + Applying the filter mask required for fast filter checks got lost + somehow with commit 2202. + 2008-10-28 Gilles Chanteperdrix <[email protected]> * ksrc/nucleus/thread.c (xnthread_init): Change initializationIndex:
ksrc/drivers/can/rtcan_raw_filter.c
===================================================================
drivers/can/rtcan_raw_filter.c line 70
Quoted 9 lines
drivers/can/rtcan_raw_filter.c +3
-0@@ -62,6 +62,9 @@ recv_filter->can_id = filter->can_id; recv_filter->can_mask = filter->can_mask & ~CAN_INV_FILTER ; } + +/* Apply mask for fast filter check */ + recv_filter->can_id &= recv_filter->can_mask; }
Ack from me, too. Please commit to trunk and 2.4.x.
Thanks for spotting this, Sebastian!
Jan
Quoted 30 lines · Jan Kiszka
Quoted 29 lines · Wolfgang Grandegger
Hi Jan and Sebastian,
attached is the patch fixing the filter problem. I'm going to apply it to the trunk as well if there are no complaints.
Wolfgang.
Index: ChangeLog
===================================================================ChangeLog +6
-0@@ -1,3 +1,9 @@ +2008-10-29 Wolfgang Grandegger <[email protected]> + + * ksrc/drivers/can/rtcan_raw_filter.c(rtcan_raw_mount_filter): + Applying the filter mask required for fast filter checks got lost + somehow with commit 2202. + 2008-10-28 Gilles Chanteperdrix <[email protected]> * ksrc/nucleus/thread.c (xnthread_init): Change initializationIndex:
ksrc/drivers/can/rtcan_raw_filter.c
===================================================================drivers/can/rtcan_raw_filter.c +0
-0@@ -62,6 +62,9 @@ recv_filter->can_id = filter->can_id; recv_filter->can_mask = filter->can_mask & ~CAN_INV_FILTER ; }
Quoted 8 lines
drivers/can/rtcan_raw_filter.c line 70
Quoted 6 lines
drivers/can/rtcan_raw_filter.c +3
-0+ +/* Apply mask for fast filter check */ + recv_filter->can_id &= recv_filter->can_mask; }Ack from me, too. Please commit to trunk and 2.4.x.
I just applied it to both branches.
Thanks,
Wolfgang.