#include <linux/rcupdate.h>
#include <linux/can.h>
+#ifndef CAN_SFF_ID_BITS
+ #define CAN_SFF_ID_BITS 11
+ #define CAN_EFF_ID_BITS 29
+#endif
+
#define SFF_BITMAP 1
#undef SFF_BITMAP
(when 'tc filter show' is invoked) AND
when matching EFF frames*/
#ifdef SFF_BITMAP
- DECLARE_BITMAP(match_sff, CAN_SFF_MASK + 1); /* For each SFF Can ID (11 bit)
+ DECLARE_BITMAP(match_sff, (1 << CAN_SFF_ID_BITS)); /* For each SFF Can ID (11 bit)
there is one record in this bitfield */
#endif
int inv_match_en; /* Inverted match flag */
return;
}
/* Add record (set bit to 1) for each ID that conforms particular rule */
- for (i = 0; i <= CAN_SFF_MASK; i++) {
+ for (i = 0; i < (1 << CAN_SFF_ID_BITS); i++) {
if ((i & can_mask) == can_id)
set_bit(i, rls->match_sff);
}