I am attempting to read a socketCAN device inside a driver.
I am setting up an skb and passing that along with pertinent information to the can_rx_register call to register a callback named sc_rcv.
// callback
static void sc_rcv(struct sk_buff *skbr, void *data)
// initialization
result = can_rx_register(&init_net, dev, 10 | CAN_INV_FILTER, CAN_SFF_MASK, &sc_rcv, skb, "mycan", 0);
I am able to receive packets but I get repeated packets and I'm not sure why.
I am looking for an example of how this is implemented.