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()
661 op->rx_ifindex = skb->dev->ifindex; in bcm_rx_handler()
710 struct bcm_msg_head *mh, int ifindex) in bcm_find_op() argument
715 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) && in bcm_find_op()
761 int ifindex) in bcm_delete_rx_op() argument
766 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) && in bcm_delete_rx_op()
777 if (op->ifindex) { in bcm_delete_rx_op()
787 op->ifindex); in bcm_delete_rx_op()
812 int ifindex) in bcm_delete_tx_op() argument
817 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) && in bcm_delete_tx_op()
832 int ifindex) in bcm_read_op() argument
834 struct bcm_op *op = bcm_find_op(ops, msg_head, ifindex); in bcm_read_op()
855 int ifindex, struct sock *sk) in bcm_tx_setup() argument
864 if (!ifindex) in bcm_tx_setup()
876 op = bcm_find_op(&bo->tx_ops, msg_head, ifindex); in bcm_tx_setup()
966 op->ifindex = ifindex; in bcm_tx_setup()
1030 int ifindex, struct sock *sk) in bcm_rx_setup() argument
1058 op = bcm_find_op(&bo->rx_ops, msg_head, ifindex); in bcm_rx_setup()
1138 op->ifindex = ifindex; in bcm_rx_setup()
1141 op->rx_ifindex = ifindex; in bcm_rx_setup()
1207 if (ifindex) { in bcm_rx_setup()
1210 dev = dev_get_by_index(sock_net(sk), ifindex); in bcm_rx_setup()
1240 static int bcm_tx_send(struct msghdr *msg, int ifindex, struct sock *sk, in bcm_tx_send() argument
1248 if (!ifindex) in bcm_tx_send()
1263 dev = dev_get_by_index(sock_net(sk), ifindex); in bcm_tx_send()
1269 can_skb_prv(skb)->ifindex = dev->ifindex; in bcm_tx_send()
1289 int ifindex = bo->ifindex; /* default ifindex for this bcm_op */ in bcm_sendmsg() local
1312 if (!ifindex && msg->msg_name) { in bcm_sendmsg()
1323 ifindex = addr->can_ifindex; in bcm_sendmsg()
1325 if (ifindex) { in bcm_sendmsg()
1328 dev = dev_get_by_index(sock_net(sk), ifindex); in bcm_sendmsg()
1346 ret = bcm_tx_setup(&msg_head, msg, ifindex, sk); in bcm_sendmsg()
1350 ret = bcm_rx_setup(&msg_head, msg, ifindex, sk); in bcm_sendmsg()
1354 if (bcm_delete_tx_op(&bo->tx_ops, &msg_head, ifindex)) in bcm_sendmsg()
1361 if (bcm_delete_rx_op(&bo->rx_ops, &msg_head, ifindex)) in bcm_sendmsg()
1370 ret = bcm_read_op(&bo->tx_ops, &msg_head, ifindex); in bcm_sendmsg()
1376 ret = bcm_read_op(&bo->rx_ops, &msg_head, ifindex); in bcm_sendmsg()
1384 ret = bcm_tx_send(msg, ifindex, sk, cfsiz); in bcm_sendmsg()
1421 if (bo->bound && bo->ifindex == dev->ifindex) { in bcm_notify()
1423 bo->ifindex = 0; in bcm_notify()
1437 if (bo->bound && bo->ifindex == dev->ifindex) { in bcm_notify()
1476 bo->ifindex = 0; in bcm_init()
1528 if (op->ifindex) { in bcm_release()
1537 dev = dev_get_by_index(net, op->ifindex); in bcm_release()
1564 bo->ifindex = 0; in bcm_release()
1610 bo->ifindex = dev->ifindex; in bcm_connect()
1615 bo->ifindex = 0; in bcm_connect()