• Home
  • Raw
  • Download

Lines Matching refs:op

166 	struct bcm_op *op;  in bcm_proc_show()  local
175 list_for_each_entry(op, &bo->rx_ops, list) { in bcm_proc_show()
180 if (!op->frames_abs) in bcm_proc_show()
184 op->can_id, bcm_proc_getifname(ifname, op->ifindex)); in bcm_proc_show()
185 seq_printf(m, "[%u]%c ", op->nframes, in bcm_proc_show()
186 (op->flags & RX_CHECK_DLC)?'d':' '); in bcm_proc_show()
187 if (op->kt_ival1.tv64) in bcm_proc_show()
190 ktime_to_us(op->kt_ival1)); in bcm_proc_show()
192 if (op->kt_ival2.tv64) in bcm_proc_show()
195 ktime_to_us(op->kt_ival2)); in bcm_proc_show()
198 op->frames_filtered, op->frames_abs); in bcm_proc_show()
200 reduction = 100 - (op->frames_filtered * 100) / op->frames_abs; in bcm_proc_show()
206 list_for_each_entry(op, &bo->tx_ops, list) { in bcm_proc_show()
209 op->can_id, in bcm_proc_show()
210 bcm_proc_getifname(ifname, op->ifindex), in bcm_proc_show()
211 op->nframes); in bcm_proc_show()
213 if (op->kt_ival1.tv64) in bcm_proc_show()
215 (long long) ktime_to_us(op->kt_ival1)); in bcm_proc_show()
217 if (op->kt_ival2.tv64) in bcm_proc_show()
219 (long long) ktime_to_us(op->kt_ival2)); in bcm_proc_show()
221 seq_printf(m, "# sent %ld\n", op->frames_abs); in bcm_proc_show()
244 static void bcm_can_tx(struct bcm_op *op) in bcm_can_tx() argument
248 struct can_frame *cf = &op->frames[op->currframe]; in bcm_can_tx()
251 if (!op->ifindex) in bcm_can_tx()
254 dev = dev_get_by_index(&init_net, op->ifindex); in bcm_can_tx()
271 can_skb_set_owner(skb, op->sk); in bcm_can_tx()
275 op->currframe++; in bcm_can_tx()
276 op->frames_abs++; in bcm_can_tx()
279 if (op->currframe >= op->nframes) in bcm_can_tx()
280 op->currframe = 0; in bcm_can_tx()
289 static void bcm_send_to_user(struct bcm_op *op, struct bcm_msg_head *head, in bcm_send_to_user() argument
295 struct sock *sk = op->sk; in bcm_send_to_user()
323 skb->tstamp = op->rx_stamp; in bcm_send_to_user()
337 addr->can_ifindex = op->rx_ifindex; in bcm_send_to_user()
349 static void bcm_tx_start_timer(struct bcm_op *op) in bcm_tx_start_timer() argument
351 if (op->kt_ival1.tv64 && op->count) in bcm_tx_start_timer()
352 hrtimer_start(&op->timer, in bcm_tx_start_timer()
353 ktime_add(ktime_get(), op->kt_ival1), in bcm_tx_start_timer()
355 else if (op->kt_ival2.tv64) in bcm_tx_start_timer()
356 hrtimer_start(&op->timer, in bcm_tx_start_timer()
357 ktime_add(ktime_get(), op->kt_ival2), in bcm_tx_start_timer()
363 struct bcm_op *op = (struct bcm_op *)data; in bcm_tx_timeout_tsklet() local
366 if (op->kt_ival1.tv64 && (op->count > 0)) { in bcm_tx_timeout_tsklet()
368 op->count--; in bcm_tx_timeout_tsklet()
369 if (!op->count && (op->flags & TX_COUNTEVT)) { in bcm_tx_timeout_tsklet()
373 msg_head.flags = op->flags; in bcm_tx_timeout_tsklet()
374 msg_head.count = op->count; in bcm_tx_timeout_tsklet()
375 msg_head.ival1 = op->ival1; in bcm_tx_timeout_tsklet()
376 msg_head.ival2 = op->ival2; in bcm_tx_timeout_tsklet()
377 msg_head.can_id = op->can_id; in bcm_tx_timeout_tsklet()
380 bcm_send_to_user(op, &msg_head, NULL, 0); in bcm_tx_timeout_tsklet()
382 bcm_can_tx(op); in bcm_tx_timeout_tsklet()
384 } else if (op->kt_ival2.tv64) in bcm_tx_timeout_tsklet()
385 bcm_can_tx(op); in bcm_tx_timeout_tsklet()
387 bcm_tx_start_timer(op); in bcm_tx_timeout_tsklet()
395 struct bcm_op *op = container_of(hrtimer, struct bcm_op, timer); in bcm_tx_timeout_handler() local
397 tasklet_schedule(&op->tsklet); in bcm_tx_timeout_handler()
405 static void bcm_rx_changed(struct bcm_op *op, struct can_frame *data) in bcm_rx_changed() argument
410 op->frames_filtered++; in bcm_rx_changed()
413 if (op->frames_filtered > ULONG_MAX/100) in bcm_rx_changed()
414 op->frames_filtered = op->frames_abs = 0; in bcm_rx_changed()
420 head.flags = op->flags; in bcm_rx_changed()
421 head.count = op->count; in bcm_rx_changed()
422 head.ival1 = op->ival1; in bcm_rx_changed()
423 head.ival2 = op->ival2; in bcm_rx_changed()
424 head.can_id = op->can_id; in bcm_rx_changed()
427 bcm_send_to_user(op, &head, data, 1); in bcm_rx_changed()
435 static void bcm_rx_update_and_send(struct bcm_op *op, in bcm_rx_update_and_send() argument
445 if (!op->kt_ival2.tv64) { in bcm_rx_update_and_send()
447 bcm_rx_changed(op, lastdata); in bcm_rx_update_and_send()
452 if (hrtimer_active(&op->thrtimer)) in bcm_rx_update_and_send()
456 if (!op->kt_lastmsg.tv64) in bcm_rx_update_and_send()
460 if (ktime_us_delta(ktime_get(), op->kt_lastmsg) < in bcm_rx_update_and_send()
461 ktime_to_us(op->kt_ival2)) { in bcm_rx_update_and_send()
463 hrtimer_start(&op->thrtimer, in bcm_rx_update_and_send()
464 ktime_add(op->kt_lastmsg, op->kt_ival2), in bcm_rx_update_and_send()
471 bcm_rx_changed(op, lastdata); in bcm_rx_update_and_send()
472 op->kt_lastmsg = ktime_get(); in bcm_rx_update_and_send()
479 static void bcm_rx_cmp_to_index(struct bcm_op *op, unsigned int index, in bcm_rx_cmp_to_index() argument
487 if (!(op->last_frames[index].can_dlc & RX_RECV)) { in bcm_rx_cmp_to_index()
489 bcm_rx_update_and_send(op, &op->last_frames[index], rxdata); in bcm_rx_cmp_to_index()
495 if ((GET_U64(&op->frames[index]) & GET_U64(rxdata)) != in bcm_rx_cmp_to_index()
496 (GET_U64(&op->frames[index]) & GET_U64(&op->last_frames[index]))) { in bcm_rx_cmp_to_index()
497 bcm_rx_update_and_send(op, &op->last_frames[index], rxdata); in bcm_rx_cmp_to_index()
501 if (op->flags & RX_CHECK_DLC) { in bcm_rx_cmp_to_index()
503 if (rxdata->can_dlc != (op->last_frames[index].can_dlc & in bcm_rx_cmp_to_index()
505 bcm_rx_update_and_send(op, &op->last_frames[index], in bcm_rx_cmp_to_index()
515 static void bcm_rx_starttimer(struct bcm_op *op) in bcm_rx_starttimer() argument
517 if (op->flags & RX_NO_AUTOTIMER) in bcm_rx_starttimer()
520 if (op->kt_ival1.tv64) in bcm_rx_starttimer()
521 hrtimer_start(&op->timer, op->kt_ival1, HRTIMER_MODE_REL); in bcm_rx_starttimer()
526 struct bcm_op *op = (struct bcm_op *)data; in bcm_rx_timeout_tsklet() local
531 msg_head.flags = op->flags; in bcm_rx_timeout_tsklet()
532 msg_head.count = op->count; in bcm_rx_timeout_tsklet()
533 msg_head.ival1 = op->ival1; in bcm_rx_timeout_tsklet()
534 msg_head.ival2 = op->ival2; in bcm_rx_timeout_tsklet()
535 msg_head.can_id = op->can_id; in bcm_rx_timeout_tsklet()
538 bcm_send_to_user(op, &msg_head, NULL, 0); in bcm_rx_timeout_tsklet()
546 struct bcm_op *op = container_of(hrtimer, struct bcm_op, timer); in bcm_rx_timeout_handler() local
549 tasklet_hi_schedule(&op->tsklet); in bcm_rx_timeout_handler()
554 if ((op->flags & RX_ANNOUNCE_RESUME) && op->last_frames) { in bcm_rx_timeout_handler()
556 memset(op->last_frames, 0, op->nframes * CFSIZ); in bcm_rx_timeout_handler()
565 static inline int bcm_rx_do_flush(struct bcm_op *op, int update, in bcm_rx_do_flush() argument
568 if ((op->last_frames) && (op->last_frames[index].can_dlc & RX_THR)) { in bcm_rx_do_flush()
570 bcm_rx_changed(op, &op->last_frames[index]); in bcm_rx_do_flush()
582 static int bcm_rx_thr_flush(struct bcm_op *op, int update) in bcm_rx_thr_flush() argument
586 if (op->nframes > 1) { in bcm_rx_thr_flush()
590 for (i = 1; i < op->nframes; i++) in bcm_rx_thr_flush()
591 updated += bcm_rx_do_flush(op, update, i); in bcm_rx_thr_flush()
595 updated += bcm_rx_do_flush(op, update, 0); in bcm_rx_thr_flush()
603 struct bcm_op *op = (struct bcm_op *)data; in bcm_rx_thr_tsklet() local
606 bcm_rx_thr_flush(op, 1); in bcm_rx_thr_tsklet()
615 struct bcm_op *op = container_of(hrtimer, struct bcm_op, thrtimer); in bcm_rx_thr_handler() local
617 tasklet_schedule(&op->thrtsklet); in bcm_rx_thr_handler()
619 if (bcm_rx_thr_flush(op, 0)) { in bcm_rx_thr_handler()
620 hrtimer_forward(hrtimer, ktime_get(), op->kt_ival2); in bcm_rx_thr_handler()
624 op->kt_lastmsg = ktime_set(0, 0); in bcm_rx_thr_handler()
634 struct bcm_op *op = (struct bcm_op *)data; in bcm_rx_handler() local
639 hrtimer_cancel(&op->timer); in bcm_rx_handler()
641 if (op->can_id != rxframe->can_id) in bcm_rx_handler()
645 op->rx_stamp = skb->tstamp; in bcm_rx_handler()
647 op->rx_ifindex = skb->dev->ifindex; in bcm_rx_handler()
649 op->frames_abs++; in bcm_rx_handler()
651 if (op->flags & RX_RTR_FRAME) { in bcm_rx_handler()
653 bcm_can_tx(op); in bcm_rx_handler()
657 if (op->flags & RX_FILTER_ID) { in bcm_rx_handler()
659 bcm_rx_update_and_send(op, &op->last_frames[0], rxframe); in bcm_rx_handler()
663 if (op->nframes == 1) { in bcm_rx_handler()
665 bcm_rx_cmp_to_index(op, 0, rxframe); in bcm_rx_handler()
669 if (op->nframes > 1) { in bcm_rx_handler()
677 for (i = 1; i < op->nframes; i++) { in bcm_rx_handler()
678 if ((GET_U64(&op->frames[0]) & GET_U64(rxframe)) == in bcm_rx_handler()
679 (GET_U64(&op->frames[0]) & in bcm_rx_handler()
680 GET_U64(&op->frames[i]))) { in bcm_rx_handler()
681 bcm_rx_cmp_to_index(op, i, rxframe); in bcm_rx_handler()
688 bcm_rx_starttimer(op); in bcm_rx_handler()
697 struct bcm_op *op; in bcm_find_op() local
699 list_for_each_entry(op, ops, list) { in bcm_find_op()
700 if ((op->can_id == can_id) && (op->ifindex == ifindex)) in bcm_find_op()
701 return op; in bcm_find_op()
707 static void bcm_remove_op(struct bcm_op *op) in bcm_remove_op() argument
709 hrtimer_cancel(&op->timer); in bcm_remove_op()
710 hrtimer_cancel(&op->thrtimer); in bcm_remove_op()
712 if (op->tsklet.func) in bcm_remove_op()
713 tasklet_kill(&op->tsklet); in bcm_remove_op()
715 if (op->thrtsklet.func) in bcm_remove_op()
716 tasklet_kill(&op->thrtsklet); in bcm_remove_op()
718 if ((op->frames) && (op->frames != &op->sframe)) in bcm_remove_op()
719 kfree(op->frames); in bcm_remove_op()
721 if ((op->last_frames) && (op->last_frames != &op->last_sframe)) in bcm_remove_op()
722 kfree(op->last_frames); in bcm_remove_op()
724 kfree(op); in bcm_remove_op()
727 static void bcm_rx_unreg(struct net_device *dev, struct bcm_op *op) in bcm_rx_unreg() argument
729 if (op->rx_reg_dev == dev) { in bcm_rx_unreg()
730 can_rx_unregister(dev, op->can_id, REGMASK(op->can_id), in bcm_rx_unreg()
731 bcm_rx_handler, op); in bcm_rx_unreg()
734 op->rx_reg_dev = NULL; in bcm_rx_unreg()
737 "mismatch %p %p\n", op->rx_reg_dev, dev); in bcm_rx_unreg()
745 struct bcm_op *op, *n; in bcm_delete_rx_op() local
747 list_for_each_entry_safe(op, n, ops, list) { in bcm_delete_rx_op()
748 if ((op->can_id == can_id) && (op->ifindex == ifindex)) { in bcm_delete_rx_op()
755 if (op->ifindex) { in bcm_delete_rx_op()
761 if (op->rx_reg_dev) { in bcm_delete_rx_op()
765 op->ifindex); in bcm_delete_rx_op()
767 bcm_rx_unreg(dev, op); in bcm_delete_rx_op()
772 can_rx_unregister(NULL, op->can_id, in bcm_delete_rx_op()
773 REGMASK(op->can_id), in bcm_delete_rx_op()
774 bcm_rx_handler, op); in bcm_delete_rx_op()
776 list_del(&op->list); in bcm_delete_rx_op()
777 bcm_remove_op(op); in bcm_delete_rx_op()
790 struct bcm_op *op, *n; in bcm_delete_tx_op() local
792 list_for_each_entry_safe(op, n, ops, list) { in bcm_delete_tx_op()
793 if ((op->can_id == can_id) && (op->ifindex == ifindex)) { in bcm_delete_tx_op()
794 list_del(&op->list); in bcm_delete_tx_op()
795 bcm_remove_op(op); in bcm_delete_tx_op()
809 struct bcm_op *op = bcm_find_op(ops, msg_head->can_id, ifindex); in bcm_read_op() local
811 if (!op) in bcm_read_op()
815 msg_head->flags = op->flags; in bcm_read_op()
816 msg_head->count = op->count; in bcm_read_op()
817 msg_head->ival1 = op->ival1; in bcm_read_op()
818 msg_head->ival2 = op->ival2; in bcm_read_op()
819 msg_head->nframes = op->nframes; in bcm_read_op()
821 bcm_send_to_user(op, msg_head, op->frames, 0); in bcm_read_op()
833 struct bcm_op *op; in bcm_tx_setup() local
846 op = bcm_find_op(&bo->tx_ops, msg_head->can_id, ifindex); in bcm_tx_setup()
848 if (op) { in bcm_tx_setup()
856 if (msg_head->nframes > op->nframes) in bcm_tx_setup()
861 err = memcpy_fromiovec((u8 *)&op->frames[i], in bcm_tx_setup()
864 if (op->frames[i].can_dlc > 8) in bcm_tx_setup()
872 op->frames[i].can_id = msg_head->can_id; in bcm_tx_setup()
879 op = kzalloc(OPSIZ, GFP_KERNEL); in bcm_tx_setup()
880 if (!op) in bcm_tx_setup()
883 op->can_id = msg_head->can_id; in bcm_tx_setup()
887 op->frames = kmalloc(msg_head->nframes * CFSIZ, in bcm_tx_setup()
889 if (!op->frames) { in bcm_tx_setup()
890 kfree(op); in bcm_tx_setup()
894 op->frames = &op->sframe; in bcm_tx_setup()
897 err = memcpy_fromiovec((u8 *)&op->frames[i], in bcm_tx_setup()
900 if (op->frames[i].can_dlc > 8) in bcm_tx_setup()
904 if (op->frames != &op->sframe) in bcm_tx_setup()
905 kfree(op->frames); in bcm_tx_setup()
906 kfree(op); in bcm_tx_setup()
912 op->frames[i].can_id = msg_head->can_id; in bcm_tx_setup()
917 op->last_frames = NULL; in bcm_tx_setup()
920 op->sk = sk; in bcm_tx_setup()
921 op->ifindex = ifindex; in bcm_tx_setup()
924 hrtimer_init(&op->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); in bcm_tx_setup()
925 op->timer.function = bcm_tx_timeout_handler; in bcm_tx_setup()
928 tasklet_init(&op->tsklet, bcm_tx_timeout_tsklet, in bcm_tx_setup()
929 (unsigned long) op); in bcm_tx_setup()
932 hrtimer_init(&op->thrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); in bcm_tx_setup()
935 list_add(&op->list, &bo->tx_ops); in bcm_tx_setup()
939 if (op->nframes != msg_head->nframes) { in bcm_tx_setup()
940 op->nframes = msg_head->nframes; in bcm_tx_setup()
942 op->currframe = 0; in bcm_tx_setup()
947 op->flags = msg_head->flags; in bcm_tx_setup()
949 if (op->flags & TX_RESET_MULTI_IDX) { in bcm_tx_setup()
951 op->currframe = 0; in bcm_tx_setup()
954 if (op->flags & SETTIMER) { in bcm_tx_setup()
956 op->count = msg_head->count; in bcm_tx_setup()
957 op->ival1 = msg_head->ival1; in bcm_tx_setup()
958 op->ival2 = msg_head->ival2; in bcm_tx_setup()
959 op->kt_ival1 = timeval_to_ktime(msg_head->ival1); in bcm_tx_setup()
960 op->kt_ival2 = timeval_to_ktime(msg_head->ival2); in bcm_tx_setup()
963 if (!op->kt_ival1.tv64 && !op->kt_ival2.tv64) in bcm_tx_setup()
964 hrtimer_cancel(&op->timer); in bcm_tx_setup()
967 if (op->flags & STARTTIMER) { in bcm_tx_setup()
968 hrtimer_cancel(&op->timer); in bcm_tx_setup()
970 op->flags |= TX_ANNOUNCE; in bcm_tx_setup()
973 if (op->flags & TX_ANNOUNCE) { in bcm_tx_setup()
974 bcm_can_tx(op); in bcm_tx_setup()
975 if (op->count) in bcm_tx_setup()
976 op->count--; in bcm_tx_setup()
979 if (op->flags & STARTTIMER) in bcm_tx_setup()
980 bcm_tx_start_timer(op); in bcm_tx_setup()
992 struct bcm_op *op; in bcm_rx_setup() local
1013 op = bcm_find_op(&bo->rx_ops, msg_head->can_id, ifindex); in bcm_rx_setup()
1014 if (op) { in bcm_rx_setup()
1022 if (msg_head->nframes > op->nframes) in bcm_rx_setup()
1027 err = memcpy_fromiovec((u8 *)op->frames, in bcm_rx_setup()
1034 memset(op->last_frames, 0, msg_head->nframes * CFSIZ); in bcm_rx_setup()
1037 op->nframes = msg_head->nframes; in bcm_rx_setup()
1044 op = kzalloc(OPSIZ, GFP_KERNEL); in bcm_rx_setup()
1045 if (!op) in bcm_rx_setup()
1048 op->can_id = msg_head->can_id; in bcm_rx_setup()
1049 op->nframes = msg_head->nframes; in bcm_rx_setup()
1053 op->frames = kmalloc(msg_head->nframes * CFSIZ, in bcm_rx_setup()
1055 if (!op->frames) { in bcm_rx_setup()
1056 kfree(op); in bcm_rx_setup()
1061 op->last_frames = kzalloc(msg_head->nframes * CFSIZ, in bcm_rx_setup()
1063 if (!op->last_frames) { in bcm_rx_setup()
1064 kfree(op->frames); in bcm_rx_setup()
1065 kfree(op); in bcm_rx_setup()
1070 op->frames = &op->sframe; in bcm_rx_setup()
1071 op->last_frames = &op->last_sframe; in bcm_rx_setup()
1075 err = memcpy_fromiovec((u8 *)op->frames, msg->msg_iov, in bcm_rx_setup()
1078 if (op->frames != &op->sframe) in bcm_rx_setup()
1079 kfree(op->frames); in bcm_rx_setup()
1080 if (op->last_frames != &op->last_sframe) in bcm_rx_setup()
1081 kfree(op->last_frames); in bcm_rx_setup()
1082 kfree(op); in bcm_rx_setup()
1088 op->sk = sk; in bcm_rx_setup()
1089 op->ifindex = ifindex; in bcm_rx_setup()
1092 op->rx_ifindex = ifindex; in bcm_rx_setup()
1095 hrtimer_init(&op->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); in bcm_rx_setup()
1096 op->timer.function = bcm_rx_timeout_handler; in bcm_rx_setup()
1099 tasklet_init(&op->tsklet, bcm_rx_timeout_tsklet, in bcm_rx_setup()
1100 (unsigned long) op); in bcm_rx_setup()
1102 hrtimer_init(&op->thrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); in bcm_rx_setup()
1103 op->thrtimer.function = bcm_rx_thr_handler; in bcm_rx_setup()
1106 tasklet_init(&op->thrtsklet, bcm_rx_thr_tsklet, in bcm_rx_setup()
1107 (unsigned long) op); in bcm_rx_setup()
1110 list_add(&op->list, &bo->rx_ops); in bcm_rx_setup()
1118 op->flags = msg_head->flags; in bcm_rx_setup()
1120 if (op->flags & RX_RTR_FRAME) { in bcm_rx_setup()
1123 hrtimer_cancel(&op->thrtimer); in bcm_rx_setup()
1124 hrtimer_cancel(&op->timer); in bcm_rx_setup()
1131 if ((op->flags & TX_CP_CAN_ID) || in bcm_rx_setup()
1132 (op->frames[0].can_id == op->can_id)) in bcm_rx_setup()
1133 op->frames[0].can_id = op->can_id & ~CAN_RTR_FLAG; in bcm_rx_setup()
1136 if (op->flags & SETTIMER) { in bcm_rx_setup()
1139 op->ival1 = msg_head->ival1; in bcm_rx_setup()
1140 op->ival2 = msg_head->ival2; in bcm_rx_setup()
1141 op->kt_ival1 = timeval_to_ktime(msg_head->ival1); in bcm_rx_setup()
1142 op->kt_ival2 = timeval_to_ktime(msg_head->ival2); in bcm_rx_setup()
1145 if (!op->kt_ival1.tv64) in bcm_rx_setup()
1146 hrtimer_cancel(&op->timer); in bcm_rx_setup()
1152 op->kt_lastmsg = ktime_set(0, 0); in bcm_rx_setup()
1153 hrtimer_cancel(&op->thrtimer); in bcm_rx_setup()
1154 bcm_rx_thr_flush(op, 1); in bcm_rx_setup()
1157 if ((op->flags & STARTTIMER) && op->kt_ival1.tv64) in bcm_rx_setup()
1158 hrtimer_start(&op->timer, op->kt_ival1, in bcm_rx_setup()
1169 err = can_rx_register(dev, op->can_id, in bcm_rx_setup()
1170 REGMASK(op->can_id), in bcm_rx_setup()
1171 bcm_rx_handler, op, in bcm_rx_setup()
1174 op->rx_reg_dev = dev; in bcm_rx_setup()
1179 err = can_rx_register(NULL, op->can_id, in bcm_rx_setup()
1180 REGMASK(op->can_id), in bcm_rx_setup()
1181 bcm_rx_handler, op, "bcm", sk); in bcm_rx_setup()
1184 list_del(&op->list); in bcm_rx_setup()
1185 bcm_remove_op(op); in bcm_rx_setup()
1357 struct bcm_op *op; in bcm_notifier() local
1372 list_for_each_entry(op, &bo->rx_ops, list) in bcm_notifier()
1373 if (op->rx_reg_dev == dev) in bcm_notifier()
1374 bcm_rx_unreg(dev, op); in bcm_notifier()
1433 struct bcm_op *op, *next; in bcm_release() local
1446 list_for_each_entry_safe(op, next, &bo->tx_ops, list) in bcm_release()
1447 bcm_remove_op(op); in bcm_release()
1449 list_for_each_entry_safe(op, next, &bo->rx_ops, list) { in bcm_release()
1454 if (op->ifindex) { in bcm_release()
1460 if (op->rx_reg_dev) { in bcm_release()
1463 dev = dev_get_by_index(&init_net, op->ifindex); in bcm_release()
1465 bcm_rx_unreg(dev, op); in bcm_release()
1470 can_rx_unregister(NULL, op->can_id, in bcm_release()
1471 REGMASK(op->can_id), in bcm_release()
1472 bcm_rx_handler, op); in bcm_release()
1474 bcm_remove_op(op); in bcm_release()