Lines Matching refs:receivers
38 static struct can_recv receivers[CONFIG_NET_SOCKETS_CAN_RECEIVERS]; variable
103 for (i = 0; i < ARRAY_SIZE(receivers); i++) { in zcan_received_cb()
108 if (!receivers[i].ctx || in zcan_received_cb()
109 receivers[i].iface != net_pkt_iface(pkt)) { in zcan_received_cb()
115 if ((sframe.can_id & receivers[i].can_mask) != in zcan_received_cb()
116 (receivers[i].can_id & receivers[i].can_mask)) { in zcan_received_cb()
125 if (pkt != NULL && ARRAY_SIZE(receivers) > 1) { in zcan_received_cb()
140 ctx = receivers[i].ctx; in zcan_received_cb()
383 for (i = 0; i < ARRAY_SIZE(receivers); i++) { in is_already_attached()
384 if (receivers[i].ctx != ctx && receivers[i].iface == iface && in is_already_attached()
385 ((receivers[i].can_id & receivers[i].can_mask) == in is_already_attached()
418 for (i = 0; i < ARRAY_SIZE(receivers); i++) { in can_close_socket()
419 if (receivers[i].ctx == ctx) { in can_close_socket()
422 receivers[i].ctx = NULL; in can_close_socket()
424 sfilter.can_id = receivers[i].can_id; in can_close_socket()
425 sfilter.can_mask = receivers[i].can_mask; in can_close_socket()
548 NET_DBG("Max %zu receivers", ARRAY_SIZE(receivers)); in can_register_receiver()
550 for (i = 0; i < ARRAY_SIZE(receivers); i++) { in can_register_receiver()
551 if (receivers[i].ctx != NULL) { in can_register_receiver()
555 receivers[i].ctx = ctx; in can_register_receiver()
556 receivers[i].iface = iface; in can_register_receiver()
557 receivers[i].can_id = can_id; in can_register_receiver()
558 receivers[i].can_mask = can_mask; in can_register_receiver()
572 for (i = 0; i < ARRAY_SIZE(receivers); i++) { in can_unregister_receiver()
573 if (receivers[i].ctx == ctx && in can_unregister_receiver()
574 receivers[i].iface == iface && in can_unregister_receiver()
575 receivers[i].can_id == can_id && in can_unregister_receiver()
576 receivers[i].can_mask == can_mask) { in can_unregister_receiver()
577 receivers[i].ctx = NULL; in can_unregister_receiver()