Lines Matching refs:op
169 struct bcm_op *op; in bcm_proc_show() local
178 list_for_each_entry(op, &bo->rx_ops, list) { in bcm_proc_show()
183 if (!op->frames_abs) in bcm_proc_show()
187 op->can_id, bcm_proc_getifname(ifname, op->ifindex)); in bcm_proc_show()
188 seq_printf(m, "[%u]%c ", op->nframes, in bcm_proc_show()
189 (op->flags & RX_CHECK_DLC)?'d':' '); in bcm_proc_show()
190 if (op->kt_ival1.tv64) in bcm_proc_show()
193 ktime_to_us(op->kt_ival1)); in bcm_proc_show()
195 if (op->kt_ival2.tv64) in bcm_proc_show()
198 ktime_to_us(op->kt_ival2)); in bcm_proc_show()
201 op->frames_filtered, op->frames_abs); in bcm_proc_show()
203 reduction = 100 - (op->frames_filtered * 100) / op->frames_abs; in bcm_proc_show()
209 list_for_each_entry(op, &bo->tx_ops, list) { in bcm_proc_show()
212 op->can_id, in bcm_proc_show()
213 bcm_proc_getifname(ifname, op->ifindex), in bcm_proc_show()
214 op->nframes); in bcm_proc_show()
216 if (op->kt_ival1.tv64) in bcm_proc_show()
218 (long long) ktime_to_us(op->kt_ival1)); in bcm_proc_show()
220 if (op->kt_ival2.tv64) in bcm_proc_show()
222 (long long) ktime_to_us(op->kt_ival2)); in bcm_proc_show()
224 seq_printf(m, "# sent %ld\n", op->frames_abs); in bcm_proc_show()
247 static void bcm_can_tx(struct bcm_op *op) in bcm_can_tx() argument
251 struct can_frame *cf = &op->frames[op->currframe]; in bcm_can_tx()
254 if (!op->ifindex) in bcm_can_tx()
257 dev = dev_get_by_index(&init_net, op->ifindex); in bcm_can_tx()
275 can_skb_set_owner(skb, op->sk); in bcm_can_tx()
279 op->currframe++; in bcm_can_tx()
280 op->frames_abs++; in bcm_can_tx()
283 if (op->currframe >= op->nframes) in bcm_can_tx()
284 op->currframe = 0; in bcm_can_tx()
293 static void bcm_send_to_user(struct bcm_op *op, struct bcm_msg_head *head, in bcm_send_to_user() argument
299 struct sock *sk = op->sk; in bcm_send_to_user()
327 skb->tstamp = op->rx_stamp; in bcm_send_to_user()
341 addr->can_ifindex = op->rx_ifindex; in bcm_send_to_user()
353 static void bcm_tx_start_timer(struct bcm_op *op) in bcm_tx_start_timer() argument
355 if (op->kt_ival1.tv64 && op->count) in bcm_tx_start_timer()
356 hrtimer_start(&op->timer, in bcm_tx_start_timer()
357 ktime_add(ktime_get(), op->kt_ival1), in bcm_tx_start_timer()
359 else if (op->kt_ival2.tv64) in bcm_tx_start_timer()
360 hrtimer_start(&op->timer, in bcm_tx_start_timer()
361 ktime_add(ktime_get(), op->kt_ival2), in bcm_tx_start_timer()
367 struct bcm_op *op = (struct bcm_op *)data; in bcm_tx_timeout_tsklet() local
370 if (op->kt_ival1.tv64 && (op->count > 0)) { in bcm_tx_timeout_tsklet()
372 op->count--; in bcm_tx_timeout_tsklet()
373 if (!op->count && (op->flags & TX_COUNTEVT)) { in bcm_tx_timeout_tsklet()
377 msg_head.flags = op->flags; in bcm_tx_timeout_tsklet()
378 msg_head.count = op->count; in bcm_tx_timeout_tsklet()
379 msg_head.ival1 = op->ival1; in bcm_tx_timeout_tsklet()
380 msg_head.ival2 = op->ival2; in bcm_tx_timeout_tsklet()
381 msg_head.can_id = op->can_id; in bcm_tx_timeout_tsklet()
384 bcm_send_to_user(op, &msg_head, NULL, 0); in bcm_tx_timeout_tsklet()
386 bcm_can_tx(op); in bcm_tx_timeout_tsklet()
388 } else if (op->kt_ival2.tv64) in bcm_tx_timeout_tsklet()
389 bcm_can_tx(op); in bcm_tx_timeout_tsklet()
391 bcm_tx_start_timer(op); in bcm_tx_timeout_tsklet()
399 struct bcm_op *op = container_of(hrtimer, struct bcm_op, timer); in bcm_tx_timeout_handler() local
401 tasklet_schedule(&op->tsklet); in bcm_tx_timeout_handler()
409 static void bcm_rx_changed(struct bcm_op *op, struct can_frame *data) in bcm_rx_changed() argument
414 op->frames_filtered++; in bcm_rx_changed()
417 if (op->frames_filtered > ULONG_MAX/100) in bcm_rx_changed()
418 op->frames_filtered = op->frames_abs = 0; in bcm_rx_changed()
424 head.flags = op->flags; in bcm_rx_changed()
425 head.count = op->count; in bcm_rx_changed()
426 head.ival1 = op->ival1; in bcm_rx_changed()
427 head.ival2 = op->ival2; in bcm_rx_changed()
428 head.can_id = op->can_id; in bcm_rx_changed()
431 bcm_send_to_user(op, &head, data, 1); in bcm_rx_changed()
439 static void bcm_rx_update_and_send(struct bcm_op *op, in bcm_rx_update_and_send() argument
449 if (!op->kt_ival2.tv64) { in bcm_rx_update_and_send()
451 bcm_rx_changed(op, lastdata); in bcm_rx_update_and_send()
456 if (hrtimer_active(&op->thrtimer)) in bcm_rx_update_and_send()
460 if (!op->kt_lastmsg.tv64) in bcm_rx_update_and_send()
464 if (ktime_us_delta(ktime_get(), op->kt_lastmsg) < in bcm_rx_update_and_send()
465 ktime_to_us(op->kt_ival2)) { in bcm_rx_update_and_send()
467 hrtimer_start(&op->thrtimer, in bcm_rx_update_and_send()
468 ktime_add(op->kt_lastmsg, op->kt_ival2), in bcm_rx_update_and_send()
475 bcm_rx_changed(op, lastdata); in bcm_rx_update_and_send()
476 op->kt_lastmsg = ktime_get(); in bcm_rx_update_and_send()
483 static void bcm_rx_cmp_to_index(struct bcm_op *op, unsigned int index, in bcm_rx_cmp_to_index() argument
491 if (!(op->last_frames[index].can_dlc & RX_RECV)) { in bcm_rx_cmp_to_index()
493 bcm_rx_update_and_send(op, &op->last_frames[index], rxdata); in bcm_rx_cmp_to_index()
499 if ((GET_U64(&op->frames[index]) & GET_U64(rxdata)) != in bcm_rx_cmp_to_index()
500 (GET_U64(&op->frames[index]) & GET_U64(&op->last_frames[index]))) { in bcm_rx_cmp_to_index()
501 bcm_rx_update_and_send(op, &op->last_frames[index], rxdata); in bcm_rx_cmp_to_index()
505 if (op->flags & RX_CHECK_DLC) { in bcm_rx_cmp_to_index()
507 if (rxdata->can_dlc != (op->last_frames[index].can_dlc & in bcm_rx_cmp_to_index()
509 bcm_rx_update_and_send(op, &op->last_frames[index], in bcm_rx_cmp_to_index()
519 static void bcm_rx_starttimer(struct bcm_op *op) in bcm_rx_starttimer() argument
521 if (op->flags & RX_NO_AUTOTIMER) in bcm_rx_starttimer()
524 if (op->kt_ival1.tv64) in bcm_rx_starttimer()
525 hrtimer_start(&op->timer, op->kt_ival1, HRTIMER_MODE_REL); in bcm_rx_starttimer()
530 struct bcm_op *op = (struct bcm_op *)data; in bcm_rx_timeout_tsklet() local
535 msg_head.flags = op->flags; in bcm_rx_timeout_tsklet()
536 msg_head.count = op->count; in bcm_rx_timeout_tsklet()
537 msg_head.ival1 = op->ival1; in bcm_rx_timeout_tsklet()
538 msg_head.ival2 = op->ival2; in bcm_rx_timeout_tsklet()
539 msg_head.can_id = op->can_id; in bcm_rx_timeout_tsklet()
542 bcm_send_to_user(op, &msg_head, NULL, 0); in bcm_rx_timeout_tsklet()
550 struct bcm_op *op = container_of(hrtimer, struct bcm_op, timer); in bcm_rx_timeout_handler() local
553 tasklet_hi_schedule(&op->tsklet); in bcm_rx_timeout_handler()
558 if ((op->flags & RX_ANNOUNCE_RESUME) && op->last_frames) { in bcm_rx_timeout_handler()
560 memset(op->last_frames, 0, op->nframes * CFSIZ); in bcm_rx_timeout_handler()
569 static inline int bcm_rx_do_flush(struct bcm_op *op, int update, in bcm_rx_do_flush() argument
572 if ((op->last_frames) && (op->last_frames[index].can_dlc & RX_THR)) { in bcm_rx_do_flush()
574 bcm_rx_changed(op, &op->last_frames[index]); in bcm_rx_do_flush()
586 static int bcm_rx_thr_flush(struct bcm_op *op, int update) in bcm_rx_thr_flush() argument
590 if (op->nframes > 1) { in bcm_rx_thr_flush()
594 for (i = 1; i < op->nframes; i++) in bcm_rx_thr_flush()
595 updated += bcm_rx_do_flush(op, update, i); in bcm_rx_thr_flush()
599 updated += bcm_rx_do_flush(op, update, 0); in bcm_rx_thr_flush()
607 struct bcm_op *op = (struct bcm_op *)data; in bcm_rx_thr_tsklet() local
610 bcm_rx_thr_flush(op, 1); in bcm_rx_thr_tsklet()
619 struct bcm_op *op = container_of(hrtimer, struct bcm_op, thrtimer); in bcm_rx_thr_handler() local
621 tasklet_schedule(&op->thrtsklet); in bcm_rx_thr_handler()
623 if (bcm_rx_thr_flush(op, 0)) { in bcm_rx_thr_handler()
624 hrtimer_forward(hrtimer, ktime_get(), op->kt_ival2); in bcm_rx_thr_handler()
628 op->kt_lastmsg = ktime_set(0, 0); in bcm_rx_thr_handler()
638 struct bcm_op *op = (struct bcm_op *)data; in bcm_rx_handler() local
643 hrtimer_cancel(&op->timer); in bcm_rx_handler()
645 if (op->can_id != rxframe->can_id) in bcm_rx_handler()
649 op->rx_stamp = skb->tstamp; in bcm_rx_handler()
651 op->rx_ifindex = skb->dev->ifindex; in bcm_rx_handler()
653 op->frames_abs++; in bcm_rx_handler()
655 if (op->flags & RX_RTR_FRAME) { in bcm_rx_handler()
657 bcm_can_tx(op); in bcm_rx_handler()
661 if (op->flags & RX_FILTER_ID) { in bcm_rx_handler()
663 bcm_rx_update_and_send(op, &op->last_frames[0], rxframe); in bcm_rx_handler()
667 if (op->nframes == 1) { in bcm_rx_handler()
669 bcm_rx_cmp_to_index(op, 0, rxframe); in bcm_rx_handler()
673 if (op->nframes > 1) { in bcm_rx_handler()
681 for (i = 1; i < op->nframes; i++) { in bcm_rx_handler()
682 if ((GET_U64(&op->frames[0]) & GET_U64(rxframe)) == in bcm_rx_handler()
683 (GET_U64(&op->frames[0]) & in bcm_rx_handler()
684 GET_U64(&op->frames[i]))) { in bcm_rx_handler()
685 bcm_rx_cmp_to_index(op, i, rxframe); in bcm_rx_handler()
692 bcm_rx_starttimer(op); in bcm_rx_handler()
701 struct bcm_op *op; in bcm_find_op() local
703 list_for_each_entry(op, ops, list) { in bcm_find_op()
704 if ((op->can_id == can_id) && (op->ifindex == ifindex)) in bcm_find_op()
705 return op; in bcm_find_op()
711 static void bcm_remove_op(struct bcm_op *op) in bcm_remove_op() argument
713 hrtimer_cancel(&op->timer); in bcm_remove_op()
714 hrtimer_cancel(&op->thrtimer); in bcm_remove_op()
716 if (op->tsklet.func) in bcm_remove_op()
717 tasklet_kill(&op->tsklet); in bcm_remove_op()
719 if (op->thrtsklet.func) in bcm_remove_op()
720 tasklet_kill(&op->thrtsklet); in bcm_remove_op()
722 if ((op->frames) && (op->frames != &op->sframe)) in bcm_remove_op()
723 kfree(op->frames); in bcm_remove_op()
725 if ((op->last_frames) && (op->last_frames != &op->last_sframe)) in bcm_remove_op()
726 kfree(op->last_frames); in bcm_remove_op()
728 kfree(op); in bcm_remove_op()
731 static void bcm_rx_unreg(struct net_device *dev, struct bcm_op *op) in bcm_rx_unreg() argument
733 if (op->rx_reg_dev == dev) { in bcm_rx_unreg()
734 can_rx_unregister(dev, op->can_id, REGMASK(op->can_id), in bcm_rx_unreg()
735 bcm_rx_handler, op); in bcm_rx_unreg()
738 op->rx_reg_dev = NULL; in bcm_rx_unreg()
741 "mismatch %p %p\n", op->rx_reg_dev, dev); in bcm_rx_unreg()
749 struct bcm_op *op, *n; in bcm_delete_rx_op() local
751 list_for_each_entry_safe(op, n, ops, list) { in bcm_delete_rx_op()
752 if ((op->can_id == can_id) && (op->ifindex == ifindex)) { in bcm_delete_rx_op()
759 if (op->ifindex) { in bcm_delete_rx_op()
765 if (op->rx_reg_dev) { in bcm_delete_rx_op()
769 op->ifindex); in bcm_delete_rx_op()
771 bcm_rx_unreg(dev, op); in bcm_delete_rx_op()
776 can_rx_unregister(NULL, op->can_id, in bcm_delete_rx_op()
777 REGMASK(op->can_id), in bcm_delete_rx_op()
778 bcm_rx_handler, op); in bcm_delete_rx_op()
780 list_del(&op->list); in bcm_delete_rx_op()
781 bcm_remove_op(op); in bcm_delete_rx_op()
794 struct bcm_op *op, *n; in bcm_delete_tx_op() local
796 list_for_each_entry_safe(op, n, ops, list) { in bcm_delete_tx_op()
797 if ((op->can_id == can_id) && (op->ifindex == ifindex)) { in bcm_delete_tx_op()
798 list_del(&op->list); in bcm_delete_tx_op()
799 bcm_remove_op(op); in bcm_delete_tx_op()
813 struct bcm_op *op = bcm_find_op(ops, msg_head->can_id, ifindex); in bcm_read_op() local
815 if (!op) in bcm_read_op()
819 msg_head->flags = op->flags; in bcm_read_op()
820 msg_head->count = op->count; in bcm_read_op()
821 msg_head->ival1 = op->ival1; in bcm_read_op()
822 msg_head->ival2 = op->ival2; in bcm_read_op()
823 msg_head->nframes = op->nframes; in bcm_read_op()
825 bcm_send_to_user(op, msg_head, op->frames, 0); in bcm_read_op()
837 struct bcm_op *op; in bcm_tx_setup() local
850 op = bcm_find_op(&bo->tx_ops, msg_head->can_id, ifindex); in bcm_tx_setup()
852 if (op) { in bcm_tx_setup()
860 if (msg_head->nframes > op->nframes) in bcm_tx_setup()
865 err = memcpy_from_msg((u8 *)&op->frames[i], msg, CFSIZ); in bcm_tx_setup()
867 if (op->frames[i].can_dlc > 8) in bcm_tx_setup()
875 op->frames[i].can_id = msg_head->can_id; in bcm_tx_setup()
882 op = kzalloc(OPSIZ, GFP_KERNEL); in bcm_tx_setup()
883 if (!op) in bcm_tx_setup()
886 op->can_id = msg_head->can_id; in bcm_tx_setup()
890 op->frames = kmalloc(msg_head->nframes * CFSIZ, in bcm_tx_setup()
892 if (!op->frames) { in bcm_tx_setup()
893 kfree(op); in bcm_tx_setup()
897 op->frames = &op->sframe; in bcm_tx_setup()
900 err = memcpy_from_msg((u8 *)&op->frames[i], msg, CFSIZ); in bcm_tx_setup()
902 if (op->frames[i].can_dlc > 8) in bcm_tx_setup()
906 if (op->frames != &op->sframe) in bcm_tx_setup()
907 kfree(op->frames); in bcm_tx_setup()
908 kfree(op); in bcm_tx_setup()
914 op->frames[i].can_id = msg_head->can_id; in bcm_tx_setup()
919 op->last_frames = NULL; in bcm_tx_setup()
922 op->sk = sk; in bcm_tx_setup()
923 op->ifindex = ifindex; in bcm_tx_setup()
926 hrtimer_init(&op->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); in bcm_tx_setup()
927 op->timer.function = bcm_tx_timeout_handler; in bcm_tx_setup()
930 tasklet_init(&op->tsklet, bcm_tx_timeout_tsklet, in bcm_tx_setup()
931 (unsigned long) op); in bcm_tx_setup()
934 hrtimer_init(&op->thrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); in bcm_tx_setup()
937 list_add(&op->list, &bo->tx_ops); in bcm_tx_setup()
941 if (op->nframes != msg_head->nframes) { in bcm_tx_setup()
942 op->nframes = msg_head->nframes; in bcm_tx_setup()
944 op->currframe = 0; in bcm_tx_setup()
949 op->flags = msg_head->flags; in bcm_tx_setup()
951 if (op->flags & TX_RESET_MULTI_IDX) { in bcm_tx_setup()
953 op->currframe = 0; in bcm_tx_setup()
956 if (op->flags & SETTIMER) { in bcm_tx_setup()
958 op->count = msg_head->count; in bcm_tx_setup()
959 op->ival1 = msg_head->ival1; in bcm_tx_setup()
960 op->ival2 = msg_head->ival2; in bcm_tx_setup()
961 op->kt_ival1 = bcm_timeval_to_ktime(msg_head->ival1); in bcm_tx_setup()
962 op->kt_ival2 = bcm_timeval_to_ktime(msg_head->ival2); in bcm_tx_setup()
965 if (!op->kt_ival1.tv64 && !op->kt_ival2.tv64) in bcm_tx_setup()
966 hrtimer_cancel(&op->timer); in bcm_tx_setup()
969 if (op->flags & STARTTIMER) { in bcm_tx_setup()
970 hrtimer_cancel(&op->timer); in bcm_tx_setup()
972 op->flags |= TX_ANNOUNCE; in bcm_tx_setup()
975 if (op->flags & TX_ANNOUNCE) { in bcm_tx_setup()
976 bcm_can_tx(op); in bcm_tx_setup()
977 if (op->count) in bcm_tx_setup()
978 op->count--; in bcm_tx_setup()
981 if (op->flags & STARTTIMER) in bcm_tx_setup()
982 bcm_tx_start_timer(op); in bcm_tx_setup()
994 struct bcm_op *op; in bcm_rx_setup() local
1015 op = bcm_find_op(&bo->rx_ops, msg_head->can_id, ifindex); in bcm_rx_setup()
1016 if (op) { in bcm_rx_setup()
1024 if (msg_head->nframes > op->nframes) in bcm_rx_setup()
1029 err = memcpy_from_msg((u8 *)op->frames, msg, in bcm_rx_setup()
1035 memset(op->last_frames, 0, msg_head->nframes * CFSIZ); in bcm_rx_setup()
1038 op->nframes = msg_head->nframes; in bcm_rx_setup()
1045 op = kzalloc(OPSIZ, GFP_KERNEL); in bcm_rx_setup()
1046 if (!op) in bcm_rx_setup()
1049 op->can_id = msg_head->can_id; in bcm_rx_setup()
1050 op->nframes = msg_head->nframes; in bcm_rx_setup()
1054 op->frames = kmalloc(msg_head->nframes * CFSIZ, in bcm_rx_setup()
1056 if (!op->frames) { in bcm_rx_setup()
1057 kfree(op); in bcm_rx_setup()
1062 op->last_frames = kzalloc(msg_head->nframes * CFSIZ, in bcm_rx_setup()
1064 if (!op->last_frames) { in bcm_rx_setup()
1065 kfree(op->frames); in bcm_rx_setup()
1066 kfree(op); in bcm_rx_setup()
1071 op->frames = &op->sframe; in bcm_rx_setup()
1072 op->last_frames = &op->last_sframe; in bcm_rx_setup()
1076 err = memcpy_from_msg((u8 *)op->frames, msg, in bcm_rx_setup()
1079 if (op->frames != &op->sframe) in bcm_rx_setup()
1080 kfree(op->frames); in bcm_rx_setup()
1081 if (op->last_frames != &op->last_sframe) in bcm_rx_setup()
1082 kfree(op->last_frames); in bcm_rx_setup()
1083 kfree(op); in bcm_rx_setup()
1089 op->sk = sk; in bcm_rx_setup()
1090 op->ifindex = ifindex; in bcm_rx_setup()
1093 op->rx_ifindex = ifindex; in bcm_rx_setup()
1096 hrtimer_init(&op->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); in bcm_rx_setup()
1097 op->timer.function = bcm_rx_timeout_handler; in bcm_rx_setup()
1100 tasklet_init(&op->tsklet, bcm_rx_timeout_tsklet, in bcm_rx_setup()
1101 (unsigned long) op); in bcm_rx_setup()
1103 hrtimer_init(&op->thrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); in bcm_rx_setup()
1104 op->thrtimer.function = bcm_rx_thr_handler; in bcm_rx_setup()
1107 tasklet_init(&op->thrtsklet, bcm_rx_thr_tsklet, in bcm_rx_setup()
1108 (unsigned long) op); in bcm_rx_setup()
1111 list_add(&op->list, &bo->rx_ops); in bcm_rx_setup()
1119 op->flags = msg_head->flags; in bcm_rx_setup()
1121 if (op->flags & RX_RTR_FRAME) { in bcm_rx_setup()
1124 hrtimer_cancel(&op->thrtimer); in bcm_rx_setup()
1125 hrtimer_cancel(&op->timer); in bcm_rx_setup()
1132 if ((op->flags & TX_CP_CAN_ID) || in bcm_rx_setup()
1133 (op->frames[0].can_id == op->can_id)) in bcm_rx_setup()
1134 op->frames[0].can_id = op->can_id & ~CAN_RTR_FLAG; in bcm_rx_setup()
1137 if (op->flags & SETTIMER) { in bcm_rx_setup()
1140 op->ival1 = msg_head->ival1; in bcm_rx_setup()
1141 op->ival2 = msg_head->ival2; in bcm_rx_setup()
1142 op->kt_ival1 = bcm_timeval_to_ktime(msg_head->ival1); in bcm_rx_setup()
1143 op->kt_ival2 = bcm_timeval_to_ktime(msg_head->ival2); in bcm_rx_setup()
1146 if (!op->kt_ival1.tv64) in bcm_rx_setup()
1147 hrtimer_cancel(&op->timer); in bcm_rx_setup()
1153 op->kt_lastmsg = ktime_set(0, 0); in bcm_rx_setup()
1154 hrtimer_cancel(&op->thrtimer); in bcm_rx_setup()
1155 bcm_rx_thr_flush(op, 1); in bcm_rx_setup()
1158 if ((op->flags & STARTTIMER) && op->kt_ival1.tv64) in bcm_rx_setup()
1159 hrtimer_start(&op->timer, op->kt_ival1, in bcm_rx_setup()
1170 err = can_rx_register(dev, op->can_id, in bcm_rx_setup()
1171 REGMASK(op->can_id), in bcm_rx_setup()
1172 bcm_rx_handler, op, in bcm_rx_setup()
1175 op->rx_reg_dev = dev; in bcm_rx_setup()
1180 err = can_rx_register(NULL, op->can_id, in bcm_rx_setup()
1181 REGMASK(op->can_id), in bcm_rx_setup()
1182 bcm_rx_handler, op, "bcm"); in bcm_rx_setup()
1185 list_del(&op->list); in bcm_rx_setup()
1186 bcm_remove_op(op); in bcm_rx_setup()
1358 struct bcm_op *op; in bcm_notifier() local
1373 list_for_each_entry(op, &bo->rx_ops, list) in bcm_notifier()
1374 if (op->rx_reg_dev == dev) in bcm_notifier()
1375 bcm_rx_unreg(dev, op); in bcm_notifier()
1434 struct bcm_op *op, *next; in bcm_release() local
1447 list_for_each_entry_safe(op, next, &bo->tx_ops, list) in bcm_release()
1448 bcm_remove_op(op); in bcm_release()
1450 list_for_each_entry_safe(op, next, &bo->rx_ops, list) { in bcm_release()
1455 if (op->ifindex) { in bcm_release()
1461 if (op->rx_reg_dev) { in bcm_release()
1464 dev = dev_get_by_index(&init_net, op->ifindex); in bcm_release()
1466 bcm_rx_unreg(dev, op); in bcm_release()
1471 can_rx_unregister(NULL, op->can_id, in bcm_release()
1472 REGMASK(op->can_id), in bcm_release()
1473 bcm_rx_handler, op); in bcm_release()
1475 bcm_remove_op(op); in bcm_release()