Lines Matching full:rcv
445 struct receiver *rcv; in can_rx_register() local
458 rcv = kmem_cache_alloc(rcv_cache, GFP_KERNEL); in can_rx_register()
459 if (!rcv) in can_rx_register()
467 rcv->can_id = can_id; in can_rx_register()
468 rcv->mask = mask; in can_rx_register()
469 rcv->matches = 0; in can_rx_register()
470 rcv->func = func; in can_rx_register()
471 rcv->data = data; in can_rx_register()
472 rcv->ident = ident; in can_rx_register()
473 rcv->sk = sk; in can_rx_register()
475 hlist_add_head_rcu(&rcv->list, rcv_list); in can_rx_register()
490 struct receiver *rcv = container_of(rp, struct receiver, rcu); in can_rx_delete_receiver() local
491 struct sock *sk = rcv->sk; in can_rx_delete_receiver()
493 kmem_cache_free(rcv_cache, rcv); in can_rx_delete_receiver()
514 struct receiver *rcv = NULL; in can_rx_unregister() local
534 hlist_for_each_entry_rcu(rcv, rcv_list, list) { in can_rx_unregister()
535 if (rcv->can_id == can_id && rcv->mask == mask && in can_rx_unregister()
536 rcv->func == func && rcv->data == data) in can_rx_unregister()
541 * 'rcv' will be NULL if no matching list item was found for removal. in can_rx_unregister()
546 if (!rcv) { in can_rx_unregister()
552 hlist_del_rcu(&rcv->list); in can_rx_unregister()
562 if (rcv) { in can_rx_unregister()
563 if (rcv->sk) in can_rx_unregister()
564 sock_hold(rcv->sk); in can_rx_unregister()
565 call_rcu(&rcv->rcu, can_rx_delete_receiver); in can_rx_unregister()
570 static inline void deliver(struct sk_buff *skb, struct receiver *rcv) in deliver() argument
572 rcv->func(skb, rcv->data); in deliver()
573 rcv->matches++; in deliver()
578 struct receiver *rcv; in can_rcv_filter() local
588 hlist_for_each_entry_rcu(rcv, &dev_rcv_lists->rx[RX_ERR], list) { in can_rcv_filter()
589 if (can_id & rcv->mask) { in can_rcv_filter()
590 deliver(skb, rcv); in can_rcv_filter()
598 hlist_for_each_entry_rcu(rcv, &dev_rcv_lists->rx[RX_ALL], list) { in can_rcv_filter()
599 deliver(skb, rcv); in can_rcv_filter()
604 hlist_for_each_entry_rcu(rcv, &dev_rcv_lists->rx[RX_FIL], list) { in can_rcv_filter()
605 if ((can_id & rcv->mask) == rcv->can_id) { in can_rcv_filter()
606 deliver(skb, rcv); in can_rcv_filter()
612 hlist_for_each_entry_rcu(rcv, &dev_rcv_lists->rx[RX_INV], list) { in can_rcv_filter()
613 if ((can_id & rcv->mask) != rcv->can_id) { in can_rcv_filter()
614 deliver(skb, rcv); in can_rcv_filter()
624 hlist_for_each_entry_rcu(rcv, &dev_rcv_lists->rx_eff[effhash(can_id)], list) { in can_rcv_filter()
625 if (rcv->can_id == can_id) { in can_rcv_filter()
626 deliver(skb, rcv); in can_rcv_filter()
632 hlist_for_each_entry_rcu(rcv, &dev_rcv_lists->rx_sff[can_id], list) { in can_rcv_filter()
633 deliver(skb, rcv); in can_rcv_filter()