Lines Matching defs:ifindex

104 	int ifindex;
128 int ifindex;
175 static char *bcm_proc_getifname(struct net *net, char *result, int ifindex)
179 if (!ifindex)
183 dev = dev_get_by_index_rcu(net, ifindex);
205 seq_printf(m, " / bound %s", bcm_proc_getifname(net, ifname, bo->ifindex));
217 bcm_proc_getifname(net, ifname, op->ifindex));
246 bcm_proc_getifname(net, ifname, op->ifindex));
280 if (!op->ifindex)
283 dev = dev_get_by_index(sock_net(op->sk), op->ifindex);
294 can_skb_prv(skb)->ifindex = dev->ifindex;
666 op->rx_ifindex = skb->dev->ifindex;
715 struct bcm_msg_head *mh, int ifindex)
720 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) &&
766 int ifindex)
771 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) &&
782 if (op->ifindex) {
792 op->ifindex);
817 int ifindex)
822 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) &&
837 int ifindex)
839 struct bcm_op *op = bcm_find_op(ops, msg_head, ifindex);
860 int ifindex, struct sock *sk)
869 if (!ifindex)
881 op = bcm_find_op(&bo->tx_ops, msg_head, ifindex);
969 op->ifindex = ifindex;
983 } /* if ((op = bcm_find_op(&bo->tx_ops, msg_head->can_id, ifindex))) */
1039 int ifindex, struct sock *sk)
1067 op = bcm_find_op(&bo->rx_ops, msg_head, ifindex);
1147 op->ifindex = ifindex;
1149 /* ifindex for timeout events w/o previous frame reception */
1150 op->rx_ifindex = ifindex;
1167 } /* if ((op = bcm_find_op(&bo->rx_ops, msg_head->can_id, ifindex))) */
1216 if (ifindex) {
1219 dev = dev_get_by_index(sock_net(sk), ifindex);
1249 static int bcm_tx_send(struct msghdr *msg, int ifindex, struct sock *sk,
1257 if (!ifindex)
1272 dev = dev_get_by_index(sock_net(sk), ifindex);
1278 can_skb_prv(skb)->ifindex = dev->ifindex;
1298 int ifindex = bo->ifindex; /* default ifindex for this bcm_op */
1319 /* check for alternative ifindex for this bcm_op */
1321 if (!ifindex && msg->msg_name) {
1331 /* ifindex from sendto() */
1332 ifindex = addr->can_ifindex;
1334 if (ifindex) {
1337 dev = dev_get_by_index(sock_net(sk), ifindex);
1355 ret = bcm_tx_setup(&msg_head, msg, ifindex, sk);
1359 ret = bcm_rx_setup(&msg_head, msg, ifindex, sk);
1363 if (bcm_delete_tx_op(&bo->tx_ops, &msg_head, ifindex))
1370 if (bcm_delete_rx_op(&bo->rx_ops, &msg_head, ifindex))
1379 ret = bcm_read_op(&bo->tx_ops, &msg_head, ifindex);
1385 ret = bcm_read_op(&bo->rx_ops, &msg_head, ifindex);
1393 ret = bcm_tx_send(msg, ifindex, sk, cfsiz);
1430 if (bo->bound && bo->ifindex == dev->ifindex) {
1432 bo->ifindex = 0;
1446 if (bo->bound && bo->ifindex == dev->ifindex) {
1485 bo->ifindex = 0;
1543 if (op->ifindex) {
1552 dev = dev_get_by_index(net, op->ifindex);
1573 bo->ifindex = 0;
1619 bo->ifindex = dev->ifindex;
1623 /* no interface reference for ifindex = 0 ('any' CAN device) */
1624 bo->ifindex = 0;