Lines Matching refs:ifindex
106 int ifindex; member
130 int ifindex; member
177 static char *bcm_proc_getifname(struct net *net, char *result, int ifindex) in bcm_proc_getifname() argument
181 if (!ifindex) in bcm_proc_getifname()
185 dev = dev_get_by_index_rcu(net, ifindex); in bcm_proc_getifname()
207 seq_printf(m, " / bound %s", bcm_proc_getifname(net, ifname, bo->ifindex)); in bcm_proc_show()
219 bcm_proc_getifname(net, ifname, op->ifindex)); in bcm_proc_show()
248 bcm_proc_getifname(net, ifname, op->ifindex)); in bcm_proc_show()
282 if (!op->ifindex) in bcm_can_tx()
285 dev = dev_get_by_index(sock_net(op->sk), op->ifindex); in bcm_can_tx()
296 can_skb_prv(skb)->ifindex = dev->ifindex; in bcm_can_tx()
663 op->rx_ifindex = skb->dev->ifindex; in bcm_rx_handler()
712 struct bcm_msg_head *mh, int ifindex) in bcm_find_op() argument
717 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) && in bcm_find_op()
763 int ifindex) in bcm_delete_rx_op() argument
768 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) && in bcm_delete_rx_op()
779 if (op->ifindex) { in bcm_delete_rx_op()
789 op->ifindex); in bcm_delete_rx_op()
814 int ifindex) in bcm_delete_tx_op() argument
819 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) && in bcm_delete_tx_op()
834 int ifindex) in bcm_read_op() argument
836 struct bcm_op *op = bcm_find_op(ops, msg_head, ifindex); in bcm_read_op()
857 int ifindex, struct sock *sk) in bcm_tx_setup() argument
866 if (!ifindex) in bcm_tx_setup()
878 op = bcm_find_op(&bo->tx_ops, msg_head, ifindex); in bcm_tx_setup()
966 op->ifindex = ifindex; in bcm_tx_setup()
1036 int ifindex, struct sock *sk) in bcm_rx_setup() argument
1064 op = bcm_find_op(&bo->rx_ops, msg_head, ifindex); in bcm_rx_setup()
1144 op->ifindex = ifindex; in bcm_rx_setup()
1147 op->rx_ifindex = ifindex; in bcm_rx_setup()
1213 if (ifindex) { in bcm_rx_setup()
1216 dev = dev_get_by_index(sock_net(sk), ifindex); in bcm_rx_setup()
1246 static int bcm_tx_send(struct msghdr *msg, int ifindex, struct sock *sk, in bcm_tx_send() argument
1254 if (!ifindex) in bcm_tx_send()
1269 dev = dev_get_by_index(sock_net(sk), ifindex); in bcm_tx_send()
1275 can_skb_prv(skb)->ifindex = dev->ifindex; in bcm_tx_send()
1295 int ifindex = bo->ifindex; /* default ifindex for this bcm_op */ in bcm_sendmsg() local
1318 if (!ifindex && msg->msg_name) { in bcm_sendmsg()
1329 ifindex = addr->can_ifindex; in bcm_sendmsg()
1331 if (ifindex) { in bcm_sendmsg()
1334 dev = dev_get_by_index(sock_net(sk), ifindex); in bcm_sendmsg()
1352 ret = bcm_tx_setup(&msg_head, msg, ifindex, sk); in bcm_sendmsg()
1356 ret = bcm_rx_setup(&msg_head, msg, ifindex, sk); in bcm_sendmsg()
1360 if (bcm_delete_tx_op(&bo->tx_ops, &msg_head, ifindex)) in bcm_sendmsg()
1367 if (bcm_delete_rx_op(&bo->rx_ops, &msg_head, ifindex)) in bcm_sendmsg()
1376 ret = bcm_read_op(&bo->tx_ops, &msg_head, ifindex); in bcm_sendmsg()
1382 ret = bcm_read_op(&bo->rx_ops, &msg_head, ifindex); in bcm_sendmsg()
1390 ret = bcm_tx_send(msg, ifindex, sk, cfsiz); in bcm_sendmsg()
1427 if (bo->bound && bo->ifindex == dev->ifindex) { in bcm_notify()
1429 bo->ifindex = 0; in bcm_notify()
1443 if (bo->bound && bo->ifindex == dev->ifindex) { in bcm_notify()
1482 bo->ifindex = 0; in bcm_init()
1540 if (op->ifindex) { in bcm_release()
1549 dev = dev_get_by_index(net, op->ifindex); in bcm_release()
1570 bo->ifindex = 0; in bcm_release()
1616 bo->ifindex = dev->ifindex; in bcm_connect()
1621 bo->ifindex = 0; in bcm_connect()