Lines Matching refs:ifindex

95 	int ifindex;  member
120 int ifindex; member
141 static char *bcm_proc_getifname(char *result, int ifindex) in bcm_proc_getifname() argument
145 if (!ifindex) in bcm_proc_getifname()
149 dev = dev_get_by_index_rcu(&init_net, ifindex); in bcm_proc_getifname()
170 seq_printf(m, " / bound %s", bcm_proc_getifname(ifname, bo->ifindex)); in bcm_proc_show()
182 op->can_id, bcm_proc_getifname(ifname, op->ifindex)); in bcm_proc_show()
208 bcm_proc_getifname(ifname, op->ifindex), in bcm_proc_show()
249 if (!op->ifindex) in bcm_can_tx()
252 dev = dev_get_by_index(&init_net, op->ifindex); in bcm_can_tx()
263 can_skb_prv(skb)->ifindex = dev->ifindex; in bcm_can_tx()
646 op->rx_ifindex = skb->dev->ifindex; in bcm_rx_handler()
694 int ifindex) in bcm_find_op() argument
699 if ((op->can_id == can_id) && (op->ifindex == ifindex)) in bcm_find_op()
742 static int bcm_delete_rx_op(struct list_head *ops, canid_t can_id, int ifindex) in bcm_delete_rx_op() argument
747 if ((op->can_id == can_id) && (op->ifindex == ifindex)) { in bcm_delete_rx_op()
754 if (op->ifindex) { in bcm_delete_rx_op()
764 op->ifindex); in bcm_delete_rx_op()
787 static int bcm_delete_tx_op(struct list_head *ops, canid_t can_id, int ifindex) in bcm_delete_tx_op() argument
792 if ((op->can_id == can_id) && (op->ifindex == ifindex)) { in bcm_delete_tx_op()
806 int ifindex) in bcm_read_op() argument
808 struct bcm_op *op = bcm_find_op(ops, msg_head->can_id, ifindex); in bcm_read_op()
829 int ifindex, struct sock *sk) in bcm_tx_setup() argument
837 if (!ifindex) in bcm_tx_setup()
845 op = bcm_find_op(&bo->tx_ops, msg_head->can_id, ifindex); in bcm_tx_setup()
918 op->ifindex = ifindex; in bcm_tx_setup()
986 int ifindex, struct sock *sk) in bcm_rx_setup() argument
1010 op = bcm_find_op(&bo->rx_ops, msg_head->can_id, ifindex); in bcm_rx_setup()
1085 op->ifindex = ifindex; in bcm_rx_setup()
1088 op->rx_ifindex = ifindex; in bcm_rx_setup()
1160 if (ifindex) { in bcm_rx_setup()
1163 dev = dev_get_by_index(&init_net, ifindex); in bcm_rx_setup()
1192 static int bcm_tx_send(struct msghdr *msg, int ifindex, struct sock *sk) in bcm_tx_send() argument
1199 if (!ifindex) in bcm_tx_send()
1214 dev = dev_get_by_index(&init_net, ifindex); in bcm_tx_send()
1220 can_skb_prv(skb)->ifindex = dev->ifindex; in bcm_tx_send()
1240 int ifindex = bo->ifindex; /* default ifindex for this bcm_op */ in bcm_sendmsg() local
1253 if (!ifindex && msg->msg_name) { in bcm_sendmsg()
1264 ifindex = addr->can_ifindex; in bcm_sendmsg()
1266 if (ifindex) { in bcm_sendmsg()
1269 dev = dev_get_by_index(&init_net, ifindex); in bcm_sendmsg()
1293 ret = bcm_tx_setup(&msg_head, msg, ifindex, sk); in bcm_sendmsg()
1297 ret = bcm_rx_setup(&msg_head, msg, ifindex, sk); in bcm_sendmsg()
1301 if (bcm_delete_tx_op(&bo->tx_ops, msg_head.can_id, ifindex)) in bcm_sendmsg()
1308 if (bcm_delete_rx_op(&bo->rx_ops, msg_head.can_id, ifindex)) in bcm_sendmsg()
1317 ret = bcm_read_op(&bo->tx_ops, &msg_head, ifindex); in bcm_sendmsg()
1323 ret = bcm_read_op(&bo->rx_ops, &msg_head, ifindex); in bcm_sendmsg()
1331 ret = bcm_tx_send(msg, ifindex, sk); in bcm_sendmsg()
1373 if (bo->bound && bo->ifindex == dev->ifindex) { in bcm_notifier()
1375 bo->ifindex = 0; in bcm_notifier()
1389 if (bo->bound && bo->ifindex == dev->ifindex) { in bcm_notifier()
1407 bo->ifindex = 0; in bcm_init()
1450 if (op->ifindex) { in bcm_release()
1459 dev = dev_get_by_index(&init_net, op->ifindex); in bcm_release()
1480 bo->ifindex = 0; in bcm_release()
1518 bo->ifindex = dev->ifindex; in bcm_connect()
1523 bo->ifindex = 0; in bcm_connect()