Lines Matching refs:op

164 	struct bcm_op *op;  in bcm_proc_show()  local
173 list_for_each_entry(op, &bo->rx_ops, list) { in bcm_proc_show()
178 if (!op->frames_abs) in bcm_proc_show()
182 op->can_id, bcm_proc_getifname(ifname, op->ifindex)); in bcm_proc_show()
183 seq_printf(m, "[%u]%c ", op->nframes, in bcm_proc_show()
184 (op->flags & RX_CHECK_DLC)?'d':' '); in bcm_proc_show()
185 if (op->kt_ival1.tv64) in bcm_proc_show()
188 ktime_to_us(op->kt_ival1)); in bcm_proc_show()
190 if (op->kt_ival2.tv64) in bcm_proc_show()
193 ktime_to_us(op->kt_ival2)); in bcm_proc_show()
196 op->frames_filtered, op->frames_abs); in bcm_proc_show()
198 reduction = 100 - (op->frames_filtered * 100) / op->frames_abs; in bcm_proc_show()
204 list_for_each_entry(op, &bo->tx_ops, list) { in bcm_proc_show()
207 op->can_id, in bcm_proc_show()
208 bcm_proc_getifname(ifname, op->ifindex), in bcm_proc_show()
209 op->nframes); in bcm_proc_show()
211 if (op->kt_ival1.tv64) in bcm_proc_show()
213 (long long) ktime_to_us(op->kt_ival1)); in bcm_proc_show()
215 if (op->kt_ival2.tv64) in bcm_proc_show()
217 (long long) ktime_to_us(op->kt_ival2)); in bcm_proc_show()
219 seq_printf(m, "# sent %ld\n", op->frames_abs); in bcm_proc_show()
242 static void bcm_can_tx(struct bcm_op *op) in bcm_can_tx() argument
246 struct can_frame *cf = &op->frames[op->currframe]; in bcm_can_tx()
249 if (!op->ifindex) in bcm_can_tx()
252 dev = dev_get_by_index(&init_net, op->ifindex); in bcm_can_tx()
270 can_skb_set_owner(skb, op->sk); in bcm_can_tx()
274 op->currframe++; in bcm_can_tx()
275 op->frames_abs++; in bcm_can_tx()
278 if (op->currframe >= op->nframes) in bcm_can_tx()
279 op->currframe = 0; in bcm_can_tx()
288 static void bcm_send_to_user(struct bcm_op *op, struct bcm_msg_head *head, in bcm_send_to_user() argument
294 struct sock *sk = op->sk; in bcm_send_to_user()
322 skb->tstamp = op->rx_stamp; in bcm_send_to_user()
336 addr->can_ifindex = op->rx_ifindex; in bcm_send_to_user()
348 static void bcm_tx_start_timer(struct bcm_op *op) in bcm_tx_start_timer() argument
350 if (op->kt_ival1.tv64 && op->count) in bcm_tx_start_timer()
351 hrtimer_start(&op->timer, in bcm_tx_start_timer()
352 ktime_add(ktime_get(), op->kt_ival1), in bcm_tx_start_timer()
354 else if (op->kt_ival2.tv64) in bcm_tx_start_timer()
355 hrtimer_start(&op->timer, in bcm_tx_start_timer()
356 ktime_add(ktime_get(), op->kt_ival2), in bcm_tx_start_timer()
362 struct bcm_op *op = (struct bcm_op *)data; in bcm_tx_timeout_tsklet() local
365 if (op->kt_ival1.tv64 && (op->count > 0)) { in bcm_tx_timeout_tsklet()
367 op->count--; in bcm_tx_timeout_tsklet()
368 if (!op->count && (op->flags & TX_COUNTEVT)) { in bcm_tx_timeout_tsklet()
372 msg_head.flags = op->flags; in bcm_tx_timeout_tsklet()
373 msg_head.count = op->count; in bcm_tx_timeout_tsklet()
374 msg_head.ival1 = op->ival1; in bcm_tx_timeout_tsklet()
375 msg_head.ival2 = op->ival2; in bcm_tx_timeout_tsklet()
376 msg_head.can_id = op->can_id; in bcm_tx_timeout_tsklet()
379 bcm_send_to_user(op, &msg_head, NULL, 0); in bcm_tx_timeout_tsklet()
381 bcm_can_tx(op); in bcm_tx_timeout_tsklet()
383 } else if (op->kt_ival2.tv64) in bcm_tx_timeout_tsklet()
384 bcm_can_tx(op); in bcm_tx_timeout_tsklet()
386 bcm_tx_start_timer(op); in bcm_tx_timeout_tsklet()
394 struct bcm_op *op = container_of(hrtimer, struct bcm_op, timer); in bcm_tx_timeout_handler() local
396 tasklet_schedule(&op->tsklet); in bcm_tx_timeout_handler()
404 static void bcm_rx_changed(struct bcm_op *op, struct can_frame *data) in bcm_rx_changed() argument
409 op->frames_filtered++; in bcm_rx_changed()
412 if (op->frames_filtered > ULONG_MAX/100) in bcm_rx_changed()
413 op->frames_filtered = op->frames_abs = 0; in bcm_rx_changed()
419 head.flags = op->flags; in bcm_rx_changed()
420 head.count = op->count; in bcm_rx_changed()
421 head.ival1 = op->ival1; in bcm_rx_changed()
422 head.ival2 = op->ival2; in bcm_rx_changed()
423 head.can_id = op->can_id; in bcm_rx_changed()
426 bcm_send_to_user(op, &head, data, 1); in bcm_rx_changed()
434 static void bcm_rx_update_and_send(struct bcm_op *op, in bcm_rx_update_and_send() argument
444 if (!op->kt_ival2.tv64) { in bcm_rx_update_and_send()
446 bcm_rx_changed(op, lastdata); in bcm_rx_update_and_send()
451 if (hrtimer_active(&op->thrtimer)) in bcm_rx_update_and_send()
455 if (!op->kt_lastmsg.tv64) in bcm_rx_update_and_send()
459 if (ktime_us_delta(ktime_get(), op->kt_lastmsg) < in bcm_rx_update_and_send()
460 ktime_to_us(op->kt_ival2)) { in bcm_rx_update_and_send()
462 hrtimer_start(&op->thrtimer, in bcm_rx_update_and_send()
463 ktime_add(op->kt_lastmsg, op->kt_ival2), in bcm_rx_update_and_send()
470 bcm_rx_changed(op, lastdata); in bcm_rx_update_and_send()
471 op->kt_lastmsg = ktime_get(); in bcm_rx_update_and_send()
478 static void bcm_rx_cmp_to_index(struct bcm_op *op, unsigned int index, in bcm_rx_cmp_to_index() argument
486 if (!(op->last_frames[index].can_dlc & RX_RECV)) { in bcm_rx_cmp_to_index()
488 bcm_rx_update_and_send(op, &op->last_frames[index], rxdata); in bcm_rx_cmp_to_index()
494 if ((GET_U64(&op->frames[index]) & GET_U64(rxdata)) != in bcm_rx_cmp_to_index()
495 (GET_U64(&op->frames[index]) & GET_U64(&op->last_frames[index]))) { in bcm_rx_cmp_to_index()
496 bcm_rx_update_and_send(op, &op->last_frames[index], rxdata); in bcm_rx_cmp_to_index()
500 if (op->flags & RX_CHECK_DLC) { in bcm_rx_cmp_to_index()
502 if (rxdata->can_dlc != (op->last_frames[index].can_dlc & in bcm_rx_cmp_to_index()
504 bcm_rx_update_and_send(op, &op->last_frames[index], in bcm_rx_cmp_to_index()
514 static void bcm_rx_starttimer(struct bcm_op *op) in bcm_rx_starttimer() argument
516 if (op->flags & RX_NO_AUTOTIMER) in bcm_rx_starttimer()
519 if (op->kt_ival1.tv64) in bcm_rx_starttimer()
520 hrtimer_start(&op->timer, op->kt_ival1, HRTIMER_MODE_REL); in bcm_rx_starttimer()
525 struct bcm_op *op = (struct bcm_op *)data; in bcm_rx_timeout_tsklet() local
530 msg_head.flags = op->flags; in bcm_rx_timeout_tsklet()
531 msg_head.count = op->count; in bcm_rx_timeout_tsklet()
532 msg_head.ival1 = op->ival1; in bcm_rx_timeout_tsklet()
533 msg_head.ival2 = op->ival2; in bcm_rx_timeout_tsklet()
534 msg_head.can_id = op->can_id; in bcm_rx_timeout_tsklet()
537 bcm_send_to_user(op, &msg_head, NULL, 0); in bcm_rx_timeout_tsklet()
545 struct bcm_op *op = container_of(hrtimer, struct bcm_op, timer); in bcm_rx_timeout_handler() local
548 tasklet_hi_schedule(&op->tsklet); in bcm_rx_timeout_handler()
553 if ((op->flags & RX_ANNOUNCE_RESUME) && op->last_frames) { in bcm_rx_timeout_handler()
555 memset(op->last_frames, 0, op->nframes * CFSIZ); in bcm_rx_timeout_handler()
564 static inline int bcm_rx_do_flush(struct bcm_op *op, int update, in bcm_rx_do_flush() argument
567 if ((op->last_frames) && (op->last_frames[index].can_dlc & RX_THR)) { in bcm_rx_do_flush()
569 bcm_rx_changed(op, &op->last_frames[index]); in bcm_rx_do_flush()
581 static int bcm_rx_thr_flush(struct bcm_op *op, int update) in bcm_rx_thr_flush() argument
585 if (op->nframes > 1) { in bcm_rx_thr_flush()
589 for (i = 1; i < op->nframes; i++) in bcm_rx_thr_flush()
590 updated += bcm_rx_do_flush(op, update, i); in bcm_rx_thr_flush()
594 updated += bcm_rx_do_flush(op, update, 0); in bcm_rx_thr_flush()
602 struct bcm_op *op = (struct bcm_op *)data; in bcm_rx_thr_tsklet() local
605 bcm_rx_thr_flush(op, 1); in bcm_rx_thr_tsklet()
614 struct bcm_op *op = container_of(hrtimer, struct bcm_op, thrtimer); in bcm_rx_thr_handler() local
616 tasklet_schedule(&op->thrtsklet); in bcm_rx_thr_handler()
618 if (bcm_rx_thr_flush(op, 0)) { in bcm_rx_thr_handler()
619 hrtimer_forward(hrtimer, ktime_get(), op->kt_ival2); in bcm_rx_thr_handler()
623 op->kt_lastmsg = ktime_set(0, 0); in bcm_rx_thr_handler()
633 struct bcm_op *op = (struct bcm_op *)data; in bcm_rx_handler() local
638 hrtimer_cancel(&op->timer); in bcm_rx_handler()
640 if (op->can_id != rxframe->can_id) in bcm_rx_handler()
644 op->rx_stamp = skb->tstamp; in bcm_rx_handler()
646 op->rx_ifindex = skb->dev->ifindex; in bcm_rx_handler()
648 op->frames_abs++; in bcm_rx_handler()
650 if (op->flags & RX_RTR_FRAME) { in bcm_rx_handler()
652 bcm_can_tx(op); in bcm_rx_handler()
656 if (op->flags & RX_FILTER_ID) { in bcm_rx_handler()
658 bcm_rx_update_and_send(op, &op->last_frames[0], rxframe); in bcm_rx_handler()
662 if (op->nframes == 1) { in bcm_rx_handler()
664 bcm_rx_cmp_to_index(op, 0, rxframe); in bcm_rx_handler()
668 if (op->nframes > 1) { in bcm_rx_handler()
676 for (i = 1; i < op->nframes; i++) { in bcm_rx_handler()
677 if ((GET_U64(&op->frames[0]) & GET_U64(rxframe)) == in bcm_rx_handler()
678 (GET_U64(&op->frames[0]) & in bcm_rx_handler()
679 GET_U64(&op->frames[i]))) { in bcm_rx_handler()
680 bcm_rx_cmp_to_index(op, i, rxframe); in bcm_rx_handler()
687 bcm_rx_starttimer(op); in bcm_rx_handler()
696 struct bcm_op *op; in bcm_find_op() local
698 list_for_each_entry(op, ops, list) { in bcm_find_op()
699 if ((op->can_id == can_id) && (op->ifindex == ifindex)) in bcm_find_op()
700 return op; in bcm_find_op()
706 static void bcm_remove_op(struct bcm_op *op) in bcm_remove_op() argument
708 hrtimer_cancel(&op->timer); in bcm_remove_op()
709 hrtimer_cancel(&op->thrtimer); in bcm_remove_op()
711 if (op->tsklet.func) in bcm_remove_op()
712 tasklet_kill(&op->tsklet); in bcm_remove_op()
714 if (op->thrtsklet.func) in bcm_remove_op()
715 tasklet_kill(&op->thrtsklet); in bcm_remove_op()
717 if ((op->frames) && (op->frames != &op->sframe)) in bcm_remove_op()
718 kfree(op->frames); in bcm_remove_op()
720 if ((op->last_frames) && (op->last_frames != &op->last_sframe)) in bcm_remove_op()
721 kfree(op->last_frames); in bcm_remove_op()
723 kfree(op); in bcm_remove_op()
726 static void bcm_rx_unreg(struct net_device *dev, struct bcm_op *op) in bcm_rx_unreg() argument
728 if (op->rx_reg_dev == dev) { in bcm_rx_unreg()
729 can_rx_unregister(dev, op->can_id, REGMASK(op->can_id), in bcm_rx_unreg()
730 bcm_rx_handler, op); in bcm_rx_unreg()
733 op->rx_reg_dev = NULL; in bcm_rx_unreg()
736 "mismatch %p %p\n", op->rx_reg_dev, dev); in bcm_rx_unreg()
744 struct bcm_op *op, *n; in bcm_delete_rx_op() local
746 list_for_each_entry_safe(op, n, ops, list) { in bcm_delete_rx_op()
747 if ((op->can_id == can_id) && (op->ifindex == ifindex)) { in bcm_delete_rx_op()
754 if (op->ifindex) { in bcm_delete_rx_op()
760 if (op->rx_reg_dev) { in bcm_delete_rx_op()
764 op->ifindex); in bcm_delete_rx_op()
766 bcm_rx_unreg(dev, op); in bcm_delete_rx_op()
771 can_rx_unregister(NULL, op->can_id, in bcm_delete_rx_op()
772 REGMASK(op->can_id), in bcm_delete_rx_op()
773 bcm_rx_handler, op); in bcm_delete_rx_op()
775 list_del(&op->list); in bcm_delete_rx_op()
776 bcm_remove_op(op); in bcm_delete_rx_op()
789 struct bcm_op *op, *n; in bcm_delete_tx_op() local
791 list_for_each_entry_safe(op, n, ops, list) { in bcm_delete_tx_op()
792 if ((op->can_id == can_id) && (op->ifindex == ifindex)) { in bcm_delete_tx_op()
793 list_del(&op->list); in bcm_delete_tx_op()
794 bcm_remove_op(op); in bcm_delete_tx_op()
808 struct bcm_op *op = bcm_find_op(ops, msg_head->can_id, ifindex); in bcm_read_op() local
810 if (!op) in bcm_read_op()
814 msg_head->flags = op->flags; in bcm_read_op()
815 msg_head->count = op->count; in bcm_read_op()
816 msg_head->ival1 = op->ival1; in bcm_read_op()
817 msg_head->ival2 = op->ival2; in bcm_read_op()
818 msg_head->nframes = op->nframes; in bcm_read_op()
820 bcm_send_to_user(op, msg_head, op->frames, 0); in bcm_read_op()
832 struct bcm_op *op; in bcm_tx_setup() local
845 op = bcm_find_op(&bo->tx_ops, msg_head->can_id, ifindex); in bcm_tx_setup()
847 if (op) { in bcm_tx_setup()
855 if (msg_head->nframes > op->nframes) in bcm_tx_setup()
860 err = memcpy_from_msg((u8 *)&op->frames[i], msg, CFSIZ); in bcm_tx_setup()
862 if (op->frames[i].can_dlc > 8) in bcm_tx_setup()
870 op->frames[i].can_id = msg_head->can_id; in bcm_tx_setup()
877 op = kzalloc(OPSIZ, GFP_KERNEL); in bcm_tx_setup()
878 if (!op) in bcm_tx_setup()
881 op->can_id = msg_head->can_id; in bcm_tx_setup()
885 op->frames = kmalloc(msg_head->nframes * CFSIZ, in bcm_tx_setup()
887 if (!op->frames) { in bcm_tx_setup()
888 kfree(op); in bcm_tx_setup()
892 op->frames = &op->sframe; in bcm_tx_setup()
895 err = memcpy_from_msg((u8 *)&op->frames[i], msg, CFSIZ); in bcm_tx_setup()
897 if (op->frames[i].can_dlc > 8) in bcm_tx_setup()
901 if (op->frames != &op->sframe) in bcm_tx_setup()
902 kfree(op->frames); in bcm_tx_setup()
903 kfree(op); in bcm_tx_setup()
909 op->frames[i].can_id = msg_head->can_id; in bcm_tx_setup()
914 op->last_frames = NULL; in bcm_tx_setup()
917 op->sk = sk; in bcm_tx_setup()
918 op->ifindex = ifindex; in bcm_tx_setup()
921 hrtimer_init(&op->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); in bcm_tx_setup()
922 op->timer.function = bcm_tx_timeout_handler; in bcm_tx_setup()
925 tasklet_init(&op->tsklet, bcm_tx_timeout_tsklet, in bcm_tx_setup()
926 (unsigned long) op); in bcm_tx_setup()
929 hrtimer_init(&op->thrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); in bcm_tx_setup()
932 list_add(&op->list, &bo->tx_ops); in bcm_tx_setup()
936 if (op->nframes != msg_head->nframes) { in bcm_tx_setup()
937 op->nframes = msg_head->nframes; in bcm_tx_setup()
939 op->currframe = 0; in bcm_tx_setup()
944 op->flags = msg_head->flags; in bcm_tx_setup()
946 if (op->flags & TX_RESET_MULTI_IDX) { in bcm_tx_setup()
948 op->currframe = 0; in bcm_tx_setup()
951 if (op->flags & SETTIMER) { in bcm_tx_setup()
953 op->count = msg_head->count; in bcm_tx_setup()
954 op->ival1 = msg_head->ival1; in bcm_tx_setup()
955 op->ival2 = msg_head->ival2; in bcm_tx_setup()
956 op->kt_ival1 = timeval_to_ktime(msg_head->ival1); in bcm_tx_setup()
957 op->kt_ival2 = timeval_to_ktime(msg_head->ival2); in bcm_tx_setup()
960 if (!op->kt_ival1.tv64 && !op->kt_ival2.tv64) in bcm_tx_setup()
961 hrtimer_cancel(&op->timer); in bcm_tx_setup()
964 if (op->flags & STARTTIMER) { in bcm_tx_setup()
965 hrtimer_cancel(&op->timer); in bcm_tx_setup()
967 op->flags |= TX_ANNOUNCE; in bcm_tx_setup()
970 if (op->flags & TX_ANNOUNCE) { in bcm_tx_setup()
971 bcm_can_tx(op); in bcm_tx_setup()
972 if (op->count) in bcm_tx_setup()
973 op->count--; in bcm_tx_setup()
976 if (op->flags & STARTTIMER) in bcm_tx_setup()
977 bcm_tx_start_timer(op); in bcm_tx_setup()
989 struct bcm_op *op; in bcm_rx_setup() local
1010 op = bcm_find_op(&bo->rx_ops, msg_head->can_id, ifindex); in bcm_rx_setup()
1011 if (op) { in bcm_rx_setup()
1019 if (msg_head->nframes > op->nframes) in bcm_rx_setup()
1024 err = memcpy_from_msg((u8 *)op->frames, msg, in bcm_rx_setup()
1030 memset(op->last_frames, 0, msg_head->nframes * CFSIZ); in bcm_rx_setup()
1033 op->nframes = msg_head->nframes; in bcm_rx_setup()
1040 op = kzalloc(OPSIZ, GFP_KERNEL); in bcm_rx_setup()
1041 if (!op) in bcm_rx_setup()
1044 op->can_id = msg_head->can_id; in bcm_rx_setup()
1045 op->nframes = msg_head->nframes; in bcm_rx_setup()
1049 op->frames = kmalloc(msg_head->nframes * CFSIZ, in bcm_rx_setup()
1051 if (!op->frames) { in bcm_rx_setup()
1052 kfree(op); in bcm_rx_setup()
1057 op->last_frames = kzalloc(msg_head->nframes * CFSIZ, in bcm_rx_setup()
1059 if (!op->last_frames) { in bcm_rx_setup()
1060 kfree(op->frames); in bcm_rx_setup()
1061 kfree(op); in bcm_rx_setup()
1066 op->frames = &op->sframe; in bcm_rx_setup()
1067 op->last_frames = &op->last_sframe; in bcm_rx_setup()
1071 err = memcpy_from_msg((u8 *)op->frames, msg, in bcm_rx_setup()
1074 if (op->frames != &op->sframe) in bcm_rx_setup()
1075 kfree(op->frames); in bcm_rx_setup()
1076 if (op->last_frames != &op->last_sframe) in bcm_rx_setup()
1077 kfree(op->last_frames); in bcm_rx_setup()
1078 kfree(op); in bcm_rx_setup()
1084 op->sk = sk; in bcm_rx_setup()
1085 op->ifindex = ifindex; in bcm_rx_setup()
1088 op->rx_ifindex = ifindex; in bcm_rx_setup()
1091 hrtimer_init(&op->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); in bcm_rx_setup()
1092 op->timer.function = bcm_rx_timeout_handler; in bcm_rx_setup()
1095 tasklet_init(&op->tsklet, bcm_rx_timeout_tsklet, in bcm_rx_setup()
1096 (unsigned long) op); in bcm_rx_setup()
1098 hrtimer_init(&op->thrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); in bcm_rx_setup()
1099 op->thrtimer.function = bcm_rx_thr_handler; in bcm_rx_setup()
1102 tasklet_init(&op->thrtsklet, bcm_rx_thr_tsklet, in bcm_rx_setup()
1103 (unsigned long) op); in bcm_rx_setup()
1106 list_add(&op->list, &bo->rx_ops); in bcm_rx_setup()
1114 op->flags = msg_head->flags; in bcm_rx_setup()
1116 if (op->flags & RX_RTR_FRAME) { in bcm_rx_setup()
1119 hrtimer_cancel(&op->thrtimer); in bcm_rx_setup()
1120 hrtimer_cancel(&op->timer); in bcm_rx_setup()
1127 if ((op->flags & TX_CP_CAN_ID) || in bcm_rx_setup()
1128 (op->frames[0].can_id == op->can_id)) in bcm_rx_setup()
1129 op->frames[0].can_id = op->can_id & ~CAN_RTR_FLAG; in bcm_rx_setup()
1132 if (op->flags & SETTIMER) { in bcm_rx_setup()
1135 op->ival1 = msg_head->ival1; in bcm_rx_setup()
1136 op->ival2 = msg_head->ival2; in bcm_rx_setup()
1137 op->kt_ival1 = timeval_to_ktime(msg_head->ival1); in bcm_rx_setup()
1138 op->kt_ival2 = timeval_to_ktime(msg_head->ival2); in bcm_rx_setup()
1141 if (!op->kt_ival1.tv64) in bcm_rx_setup()
1142 hrtimer_cancel(&op->timer); in bcm_rx_setup()
1148 op->kt_lastmsg = ktime_set(0, 0); in bcm_rx_setup()
1149 hrtimer_cancel(&op->thrtimer); in bcm_rx_setup()
1150 bcm_rx_thr_flush(op, 1); in bcm_rx_setup()
1153 if ((op->flags & STARTTIMER) && op->kt_ival1.tv64) in bcm_rx_setup()
1154 hrtimer_start(&op->timer, op->kt_ival1, in bcm_rx_setup()
1165 err = can_rx_register(dev, op->can_id, in bcm_rx_setup()
1166 REGMASK(op->can_id), in bcm_rx_setup()
1167 bcm_rx_handler, op, in bcm_rx_setup()
1170 op->rx_reg_dev = dev; in bcm_rx_setup()
1175 err = can_rx_register(NULL, op->can_id, in bcm_rx_setup()
1176 REGMASK(op->can_id), in bcm_rx_setup()
1177 bcm_rx_handler, op, "bcm"); in bcm_rx_setup()
1180 list_del(&op->list); in bcm_rx_setup()
1181 bcm_remove_op(op); in bcm_rx_setup()
1353 struct bcm_op *op; in bcm_notifier() local
1368 list_for_each_entry(op, &bo->rx_ops, list) in bcm_notifier()
1369 if (op->rx_reg_dev == dev) in bcm_notifier()
1370 bcm_rx_unreg(dev, op); in bcm_notifier()
1429 struct bcm_op *op, *next; in bcm_release() local
1442 list_for_each_entry_safe(op, next, &bo->tx_ops, list) in bcm_release()
1443 bcm_remove_op(op); in bcm_release()
1445 list_for_each_entry_safe(op, next, &bo->rx_ops, list) { in bcm_release()
1450 if (op->ifindex) { in bcm_release()
1456 if (op->rx_reg_dev) { in bcm_release()
1459 dev = dev_get_by_index(&init_net, op->ifindex); in bcm_release()
1461 bcm_rx_unreg(dev, op); in bcm_release()
1466 can_rx_unregister(NULL, op->can_id, in bcm_release()
1467 REGMASK(op->can_id), in bcm_release()
1468 bcm_rx_handler, op); in bcm_release()
1470 bcm_remove_op(op); in bcm_release()