search for: can_mask

Displaying 1 result from an estimated 1 matches for "can_mask".

2012 Jun 12
6
[RFC] net/sched/em_canid: Ematch rule to match CAN frames according to their CAN IDs
...of the sk_buff structure. + */ +static canid_t em_canid_get_id(struct sk_buff *skb) +{ + /* CAN ID is stored within the data field */ + struct can_frame *cf = (struct can_frame *)skb->data; + + return cf->can_id; +} + +static void em_canid_sff_match_add(struct canid_match *cm, u32 can_id, u32 can_mask) +{ + int i; + + /* Limit can_mask and can_id to SFF range to + protect against write after end of array */ + can_mask &= CAN_SFF_MASK; + can_id &= can_mask; + + /* single frame */ + if (can_mask == CAN_SFF_MASK) { + set_bit(can_id, cm->match_sff); + return; + } + + /* all frames */ +...