Lines Matching refs:ifindex
103 int ifindex; member
127 int ifindex; member
174 static char *bcm_proc_getifname(struct net *net, char *result, int ifindex) in bcm_proc_getifname() argument
178 if (!ifindex) in bcm_proc_getifname()
182 dev = dev_get_by_index_rcu(net, ifindex); in bcm_proc_getifname()
204 seq_printf(m, " / bound %s", bcm_proc_getifname(net, ifname, bo->ifindex)); in bcm_proc_show()
216 bcm_proc_getifname(net, ifname, op->ifindex)); in bcm_proc_show()
245 bcm_proc_getifname(net, ifname, op->ifindex)); in bcm_proc_show()
278 if (!op->ifindex) in bcm_can_tx()
281 dev = dev_get_by_index(sock_net(op->sk), op->ifindex); in bcm_can_tx()
292 can_skb_prv(skb)->ifindex = dev->ifindex; in bcm_can_tx()
659 op->rx_ifindex = skb->dev->ifindex; in bcm_rx_handler()
708 struct bcm_msg_head *mh, int ifindex) in bcm_find_op() argument
713 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) && in bcm_find_op()
752 int ifindex) in bcm_delete_rx_op() argument
757 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) && in bcm_delete_rx_op()
765 if (op->ifindex) { in bcm_delete_rx_op()
775 op->ifindex); in bcm_delete_rx_op()
801 int ifindex) in bcm_delete_tx_op() argument
806 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) && in bcm_delete_tx_op()
821 int ifindex) in bcm_read_op() argument
823 struct bcm_op *op = bcm_find_op(ops, msg_head, ifindex); in bcm_read_op()
844 int ifindex, struct sock *sk) in bcm_tx_setup() argument
853 if (!ifindex) in bcm_tx_setup()
865 op = bcm_find_op(&bo->tx_ops, msg_head, ifindex); in bcm_tx_setup()
955 op->ifindex = ifindex; in bcm_tx_setup()
1019 int ifindex, struct sock *sk) in bcm_rx_setup() argument
1047 op = bcm_find_op(&bo->rx_ops, msg_head, ifindex); in bcm_rx_setup()
1127 op->ifindex = ifindex; in bcm_rx_setup()
1130 op->rx_ifindex = ifindex; in bcm_rx_setup()
1196 if (ifindex) { in bcm_rx_setup()
1199 dev = dev_get_by_index(sock_net(sk), ifindex); in bcm_rx_setup()
1229 static int bcm_tx_send(struct msghdr *msg, int ifindex, struct sock *sk, in bcm_tx_send() argument
1237 if (!ifindex) in bcm_tx_send()
1252 dev = dev_get_by_index(sock_net(sk), ifindex); in bcm_tx_send()
1258 can_skb_prv(skb)->ifindex = dev->ifindex; in bcm_tx_send()
1278 int ifindex = bo->ifindex; /* default ifindex for this bcm_op */ in bcm_sendmsg() local
1301 if (!ifindex && msg->msg_name) { in bcm_sendmsg()
1312 ifindex = addr->can_ifindex; in bcm_sendmsg()
1314 if (ifindex) { in bcm_sendmsg()
1317 dev = dev_get_by_index(sock_net(sk), ifindex); in bcm_sendmsg()
1335 ret = bcm_tx_setup(&msg_head, msg, ifindex, sk); in bcm_sendmsg()
1339 ret = bcm_rx_setup(&msg_head, msg, ifindex, sk); in bcm_sendmsg()
1343 if (bcm_delete_tx_op(&bo->tx_ops, &msg_head, ifindex)) in bcm_sendmsg()
1350 if (bcm_delete_rx_op(&bo->rx_ops, &msg_head, ifindex)) in bcm_sendmsg()
1359 ret = bcm_read_op(&bo->tx_ops, &msg_head, ifindex); in bcm_sendmsg()
1365 ret = bcm_read_op(&bo->rx_ops, &msg_head, ifindex); in bcm_sendmsg()
1373 ret = bcm_tx_send(msg, ifindex, sk, cfsiz); in bcm_sendmsg()
1410 if (bo->bound && bo->ifindex == dev->ifindex) { in bcm_notify()
1412 bo->ifindex = 0; in bcm_notify()
1426 if (bo->bound && bo->ifindex == dev->ifindex) { in bcm_notify()
1465 bo->ifindex = 0; in bcm_init()
1517 if (op->ifindex) { in bcm_release()
1526 dev = dev_get_by_index(net, op->ifindex); in bcm_release()
1553 bo->ifindex = 0; in bcm_release()
1599 bo->ifindex = dev->ifindex; in bcm_connect()
1604 bo->ifindex = 0; in bcm_connect()