Lines Matching refs:ifindex

104 	int ifindex;  member
128 int ifindex; member
175 static char *bcm_proc_getifname(struct net *net, char *result, int ifindex) in bcm_proc_getifname() argument
179 if (!ifindex) in bcm_proc_getifname()
183 dev = dev_get_by_index_rcu(net, ifindex); in bcm_proc_getifname()
205 seq_printf(m, " / bound %s", bcm_proc_getifname(net, ifname, bo->ifindex)); in bcm_proc_show()
217 bcm_proc_getifname(net, ifname, op->ifindex)); in bcm_proc_show()
246 bcm_proc_getifname(net, ifname, op->ifindex)); in bcm_proc_show()
280 if (!op->ifindex) in bcm_can_tx()
283 dev = dev_get_by_index(sock_net(op->sk), op->ifindex); in bcm_can_tx()
294 can_skb_prv(skb)->ifindex = dev->ifindex; in bcm_can_tx()
666 op->rx_ifindex = skb->dev->ifindex; in bcm_rx_handler()
715 struct bcm_msg_head *mh, int ifindex) in bcm_find_op() argument
720 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) && in bcm_find_op()
766 int ifindex) in bcm_delete_rx_op() argument
771 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) && in bcm_delete_rx_op()
782 if (op->ifindex) { in bcm_delete_rx_op()
792 op->ifindex); in bcm_delete_rx_op()
817 int ifindex) in bcm_delete_tx_op() argument
822 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) && in bcm_delete_tx_op()
837 int ifindex) in bcm_read_op() argument
839 struct bcm_op *op = bcm_find_op(ops, msg_head, ifindex); in bcm_read_op()
860 int ifindex, struct sock *sk) in bcm_tx_setup() argument
869 if (!ifindex) in bcm_tx_setup()
881 op = bcm_find_op(&bo->tx_ops, msg_head, ifindex); in bcm_tx_setup()
971 op->ifindex = ifindex; in bcm_tx_setup()
1035 int ifindex, struct sock *sk) in bcm_rx_setup() argument
1063 op = bcm_find_op(&bo->rx_ops, msg_head, ifindex); in bcm_rx_setup()
1143 op->ifindex = ifindex; in bcm_rx_setup()
1146 op->rx_ifindex = ifindex; in bcm_rx_setup()
1212 if (ifindex) { in bcm_rx_setup()
1215 dev = dev_get_by_index(sock_net(sk), ifindex); in bcm_rx_setup()
1245 static int bcm_tx_send(struct msghdr *msg, int ifindex, struct sock *sk, in bcm_tx_send() argument
1253 if (!ifindex) in bcm_tx_send()
1268 dev = dev_get_by_index(sock_net(sk), ifindex); in bcm_tx_send()
1274 can_skb_prv(skb)->ifindex = dev->ifindex; in bcm_tx_send()
1294 int ifindex = bo->ifindex; /* default ifindex for this bcm_op */ in bcm_sendmsg() local
1317 if (!ifindex && msg->msg_name) { in bcm_sendmsg()
1328 ifindex = addr->can_ifindex; in bcm_sendmsg()
1330 if (ifindex) { in bcm_sendmsg()
1333 dev = dev_get_by_index(sock_net(sk), ifindex); in bcm_sendmsg()
1351 ret = bcm_tx_setup(&msg_head, msg, ifindex, sk); in bcm_sendmsg()
1355 ret = bcm_rx_setup(&msg_head, msg, ifindex, sk); in bcm_sendmsg()
1359 if (bcm_delete_tx_op(&bo->tx_ops, &msg_head, ifindex)) in bcm_sendmsg()
1366 if (bcm_delete_rx_op(&bo->rx_ops, &msg_head, ifindex)) in bcm_sendmsg()
1375 ret = bcm_read_op(&bo->tx_ops, &msg_head, ifindex); in bcm_sendmsg()
1381 ret = bcm_read_op(&bo->rx_ops, &msg_head, ifindex); in bcm_sendmsg()
1389 ret = bcm_tx_send(msg, ifindex, sk, cfsiz); in bcm_sendmsg()
1426 if (bo->bound && bo->ifindex == dev->ifindex) { in bcm_notify()
1428 bo->ifindex = 0; in bcm_notify()
1442 if (bo->bound && bo->ifindex == dev->ifindex) { in bcm_notify()
1481 bo->ifindex = 0; in bcm_init()
1533 if (op->ifindex) { in bcm_release()
1542 dev = dev_get_by_index(net, op->ifindex); in bcm_release()
1569 bo->ifindex = 0; in bcm_release()
1615 bo->ifindex = dev->ifindex; in bcm_connect()
1620 bo->ifindex = 0; in bcm_connect()