Lines Matching full:rcv
446 struct receiver *rcv; in can_rx_register() local
460 rcv = kmem_cache_alloc(rcv_cache, GFP_KERNEL); in can_rx_register()
461 if (!rcv) in can_rx_register()
469 rcv->can_id = can_id; in can_rx_register()
470 rcv->mask = mask; in can_rx_register()
471 rcv->matches = 0; in can_rx_register()
472 rcv->func = func; in can_rx_register()
473 rcv->data = data; in can_rx_register()
474 rcv->ident = ident; in can_rx_register()
475 rcv->sk = sk; in can_rx_register()
477 hlist_add_head_rcu(&rcv->list, rcv_list); in can_rx_register()
492 struct receiver *rcv = container_of(rp, struct receiver, rcu); in can_rx_delete_receiver() local
493 struct sock *sk = rcv->sk; in can_rx_delete_receiver()
495 kmem_cache_free(rcv_cache, rcv); in can_rx_delete_receiver()
516 struct receiver *rcv = NULL; in can_rx_unregister() local
536 hlist_for_each_entry_rcu(rcv, rcv_list, list) { in can_rx_unregister()
537 if (rcv->can_id == can_id && rcv->mask == mask && in can_rx_unregister()
538 rcv->func == func && rcv->data == data) in can_rx_unregister()
543 * 'rcv' will be NULL if no matching list item was found for removal. in can_rx_unregister()
548 if (!rcv) { in can_rx_unregister()
554 hlist_del_rcu(&rcv->list); in can_rx_unregister()
564 if (rcv) { in can_rx_unregister()
565 if (rcv->sk) in can_rx_unregister()
566 sock_hold(rcv->sk); in can_rx_unregister()
567 call_rcu(&rcv->rcu, can_rx_delete_receiver); in can_rx_unregister()
572 static inline void deliver(struct sk_buff *skb, struct receiver *rcv) in deliver() argument
574 rcv->func(skb, rcv->data); in deliver()
575 rcv->matches++; in deliver()
580 struct receiver *rcv; in can_rcv_filter() local
590 hlist_for_each_entry_rcu(rcv, &dev_rcv_lists->rx[RX_ERR], list) { in can_rcv_filter()
591 if (can_id & rcv->mask) { in can_rcv_filter()
592 deliver(skb, rcv); in can_rcv_filter()
600 hlist_for_each_entry_rcu(rcv, &dev_rcv_lists->rx[RX_ALL], list) { in can_rcv_filter()
601 deliver(skb, rcv); in can_rcv_filter()
606 hlist_for_each_entry_rcu(rcv, &dev_rcv_lists->rx[RX_FIL], list) { in can_rcv_filter()
607 if ((can_id & rcv->mask) == rcv->can_id) { in can_rcv_filter()
608 deliver(skb, rcv); in can_rcv_filter()
614 hlist_for_each_entry_rcu(rcv, &dev_rcv_lists->rx[RX_INV], list) { in can_rcv_filter()
615 if ((can_id & rcv->mask) != rcv->can_id) { in can_rcv_filter()
616 deliver(skb, rcv); in can_rcv_filter()
626 hlist_for_each_entry_rcu(rcv, &dev_rcv_lists->rx_eff[effhash(can_id)], list) { in can_rcv_filter()
627 if (rcv->can_id == can_id) { in can_rcv_filter()
628 deliver(skb, rcv); in can_rcv_filter()
634 hlist_for_each_entry_rcu(rcv, &dev_rcv_lists->rx_sff[can_id], list) { in can_rcv_filter()
635 deliver(skb, rcv); in can_rcv_filter()