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;
661 op->rx_ifindex = skb->dev->ifindex;
710 struct bcm_msg_head *mh, int ifindex)
715 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) &&
761 int ifindex)
766 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) &&
777 if (op->ifindex) {
787 op->ifindex);
812 int ifindex)
817 if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) &&
832 int ifindex)
834 struct bcm_op *op = bcm_find_op(ops, msg_head, ifindex);
855 int ifindex, struct sock *sk)
864 if (!ifindex)
876 op = bcm_find_op(&bo->tx_ops, msg_head, ifindex);
964 op->ifindex = ifindex;
978 } /* if ((op = bcm_find_op(&bo->tx_ops, msg_head->can_id, ifindex))) */
1034 int ifindex, struct sock *sk)
1062 op = bcm_find_op(&bo->rx_ops, msg_head, ifindex);
1142 op->ifindex = ifindex;
1144 /* ifindex for timeout events w/o previous frame reception */
1145 op->rx_ifindex = ifindex;
1162 } /* if ((op = bcm_find_op(&bo->rx_ops, msg_head->can_id, ifindex))) */
1211 if (ifindex) {
1214 dev = dev_get_by_index(sock_net(sk), ifindex);
1244 static int bcm_tx_send(struct msghdr *msg, int ifindex, struct sock *sk,
1252 if (!ifindex)
1267 dev = dev_get_by_index(sock_net(sk), ifindex);
1273 can_skb_prv(skb)->ifindex = dev->ifindex;
1293 int ifindex = bo->ifindex; /* default ifindex for this bcm_op */
1314 /* check for alternative ifindex for this bcm_op */
1316 if (!ifindex && msg->msg_name) {
1326 /* ifindex from sendto() */
1327 ifindex = addr->can_ifindex;
1329 if (ifindex) {
1332 dev = dev_get_by_index(sock_net(sk), ifindex);
1350 ret = bcm_tx_setup(&msg_head, msg, ifindex, sk);
1354 ret = bcm_rx_setup(&msg_head, msg, ifindex, sk);
1358 if (bcm_delete_tx_op(&bo->tx_ops, &msg_head, ifindex))
1365 if (bcm_delete_rx_op(&bo->rx_ops, &msg_head, ifindex))
1374 ret = bcm_read_op(&bo->tx_ops, &msg_head, ifindex);
1380 ret = bcm_read_op(&bo->rx_ops, &msg_head, ifindex);
1388 ret = bcm_tx_send(msg, ifindex, sk, cfsiz);
1425 if (bo->bound && bo->ifindex == dev->ifindex) {
1431 bo->ifindex = 0;
1445 if (bo->bound && bo->ifindex == dev->ifindex) {
1484 bo->ifindex = 0;
1542 if (op->ifindex) {
1551 dev = dev_get_by_index(net, op->ifindex);
1572 bo->ifindex = 0;
1618 bo->ifindex = dev->ifindex;
1622 /* no interface reference for ifindex = 0 ('any' CAN device) */
1623 bo->ifindex = 0;