Lines Matching refs:ifindex
106 int ifindex; member
130 int ifindex; member
187 static char *bcm_proc_getifname(struct net *net, char *result, int ifindex) in bcm_proc_getifname() argument
191 if (!ifindex) in bcm_proc_getifname()
195 dev = dev_get_by_index_rcu(net, ifindex); in bcm_proc_getifname()
217 seq_printf(m, " / bound %s", bcm_proc_getifname(net, ifname, bo->ifindex)); in bcm_proc_show()
229 bcm_proc_getifname(net, ifname, op->ifindex)); in bcm_proc_show()
258 bcm_proc_getifname(net, ifname, op->ifindex)); in bcm_proc_show()
292 if (!op->ifindex) in bcm_can_tx()
295 dev = dev_get_by_index(sock_net(op->sk), op->ifindex); in bcm_can_tx()
306 can_skb_prv(skb)->ifindex = dev->ifindex; in bcm_can_tx()
698 op->rx_ifindex = skb->dev->ifindex; in bcm_rx_handler()
757 struct bcm_msg_head *mh, int ifindex) in bcm_find_op() argument
762 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) && in bcm_find_op()
808 int ifindex) in bcm_delete_rx_op() argument
813 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) && in bcm_delete_rx_op()
824 if (op->ifindex) { in bcm_delete_rx_op()
834 op->ifindex); in bcm_delete_rx_op()
859 int ifindex) in bcm_delete_tx_op() argument
864 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) && in bcm_delete_tx_op()
879 int ifindex) in bcm_read_op() argument
881 struct bcm_op *op = bcm_find_op(ops, msg_head, ifindex); in bcm_read_op()
902 int ifindex, struct sock *sk) in bcm_tx_setup() argument
911 if (!ifindex) in bcm_tx_setup()
923 op = bcm_find_op(&bo->tx_ops, msg_head, ifindex); in bcm_tx_setup()
1011 op->ifindex = ifindex; in bcm_tx_setup()
1081 int ifindex, struct sock *sk) in bcm_rx_setup() argument
1109 op = bcm_find_op(&bo->rx_ops, msg_head, ifindex); in bcm_rx_setup()
1189 op->ifindex = ifindex; in bcm_rx_setup()
1192 op->rx_ifindex = ifindex; in bcm_rx_setup()
1258 if (ifindex) { in bcm_rx_setup()
1261 dev = dev_get_by_index(sock_net(sk), ifindex); in bcm_rx_setup()
1291 static int bcm_tx_send(struct msghdr *msg, int ifindex, struct sock *sk, in bcm_tx_send() argument
1299 if (!ifindex) in bcm_tx_send()
1314 dev = dev_get_by_index(sock_net(sk), ifindex); in bcm_tx_send()
1320 can_skb_prv(skb)->ifindex = dev->ifindex; in bcm_tx_send()
1340 int ifindex = bo->ifindex; /* default ifindex for this bcm_op */ in bcm_sendmsg() local
1363 if (!ifindex && msg->msg_name) { in bcm_sendmsg()
1374 ifindex = addr->can_ifindex; in bcm_sendmsg()
1376 if (ifindex) { in bcm_sendmsg()
1379 dev = dev_get_by_index(sock_net(sk), ifindex); in bcm_sendmsg()
1397 ret = bcm_tx_setup(&msg_head, msg, ifindex, sk); in bcm_sendmsg()
1401 ret = bcm_rx_setup(&msg_head, msg, ifindex, sk); in bcm_sendmsg()
1405 if (bcm_delete_tx_op(&bo->tx_ops, &msg_head, ifindex)) in bcm_sendmsg()
1412 if (bcm_delete_rx_op(&bo->rx_ops, &msg_head, ifindex)) in bcm_sendmsg()
1421 ret = bcm_read_op(&bo->tx_ops, &msg_head, ifindex); in bcm_sendmsg()
1427 ret = bcm_read_op(&bo->rx_ops, &msg_head, ifindex); in bcm_sendmsg()
1435 ret = bcm_tx_send(msg, ifindex, sk, cfsiz); in bcm_sendmsg()
1472 if (bo->bound && bo->ifindex == dev->ifindex) { in bcm_notify()
1480 bo->ifindex = 0; in bcm_notify()
1494 if (bo->bound && bo->ifindex == dev->ifindex) { in bcm_notify()
1533 bo->ifindex = 0; in bcm_init()
1591 if (op->ifindex) { in bcm_release()
1600 dev = dev_get_by_index(net, op->ifindex); in bcm_release()
1621 bo->ifindex = 0; in bcm_release()
1667 bo->ifindex = dev->ifindex; in bcm_connect()
1672 bo->ifindex = 0; in bcm_connect()