Lines Matching refs:bo
198 struct bcm_sock *bo = bcm_sk(sk); in bcm_proc_show() local
203 seq_printf(m, " / bo %pK", bo); in bcm_proc_show()
204 seq_printf(m, " / dropped %lu", bo->dropped_usr_msgs); in bcm_proc_show()
205 seq_printf(m, " / bound %s", bcm_proc_getifname(net, ifname, bo->ifindex)); in bcm_proc_show()
208 list_for_each_entry(op, &bo->rx_ops, list) { in bcm_proc_show()
243 list_for_each_entry(op, &bo->tx_ops, list) { in bcm_proc_show()
371 struct bcm_sock *bo = bcm_sk(sk); in bcm_send_to_user() local
375 bo->dropped_usr_msgs++; in bcm_send_to_user()
857 struct bcm_sock *bo = bcm_sk(sk); in bcm_tx_setup() local
876 op = bcm_find_op(&bo->tx_ops, msg_head, ifindex); in bcm_tx_setup()
976 list_add(&op->list, &bo->tx_ops); in bcm_tx_setup()
1036 struct bcm_sock *bo = bcm_sk(sk); in bcm_rx_setup() local
1062 op = bcm_find_op(&bo->rx_ops, msg_head, ifindex); in bcm_rx_setup()
1157 list_add(&op->list, &bo->rx_ops); in bcm_rx_setup()
1292 struct bcm_sock *bo = bcm_sk(sk); in bcm_sendmsg() local
1293 int ifindex = bo->ifindex; /* default ifindex for this bcm_op */ in bcm_sendmsg()
1298 if (!bo->bound) in bcm_sendmsg()
1358 if (bcm_delete_tx_op(&bo->tx_ops, &msg_head, ifindex)) in bcm_sendmsg()
1365 if (bcm_delete_rx_op(&bo->rx_ops, &msg_head, ifindex)) in bcm_sendmsg()
1374 ret = bcm_read_op(&bo->tx_ops, &msg_head, ifindex); in bcm_sendmsg()
1380 ret = bcm_read_op(&bo->rx_ops, &msg_head, ifindex); in bcm_sendmsg()
1404 static void bcm_notify(struct bcm_sock *bo, unsigned long msg, in bcm_notify() argument
1407 struct sock *sk = &bo->sk; in bcm_notify()
1420 list_for_each_entry(op, &bo->rx_ops, list) in bcm_notify()
1425 if (bo->bound && bo->ifindex == dev->ifindex) { in bcm_notify()
1426 bo->bound = 0; in bcm_notify()
1427 bo->ifindex = 0; in bcm_notify()
1441 if (bo->bound && bo->ifindex == dev->ifindex) { in bcm_notify()
1477 struct bcm_sock *bo = bcm_sk(sk); in bcm_init() local
1479 bo->bound = 0; in bcm_init()
1480 bo->ifindex = 0; in bcm_init()
1481 bo->dropped_usr_msgs = 0; in bcm_init()
1482 bo->bcm_proc_read = NULL; in bcm_init()
1484 INIT_LIST_HEAD(&bo->tx_ops); in bcm_init()
1485 INIT_LIST_HEAD(&bo->rx_ops); in bcm_init()
1489 list_add_tail(&bo->notifier, &bcm_notifier_list); in bcm_init()
1502 struct bcm_sock *bo; in bcm_release() local
1509 bo = bcm_sk(sk); in bcm_release()
1514 while (bcm_busy_notifier == bo) { in bcm_release()
1519 list_del(&bo->notifier); in bcm_release()
1526 if (net->can.bcmproc_dir && bo->bcm_proc_read) in bcm_release()
1527 remove_proc_entry(bo->procname, net->can.bcmproc_dir); in bcm_release()
1530 list_for_each_entry_safe(op, next, &bo->tx_ops, list) in bcm_release()
1533 list_for_each_entry_safe(op, next, &bo->rx_ops, list) { in bcm_release()
1562 list_for_each_entry_safe(op, next, &bo->rx_ops, list) in bcm_release()
1566 if (bo->bound) { in bcm_release()
1567 bo->bound = 0; in bcm_release()
1568 bo->ifindex = 0; in bcm_release()
1585 struct bcm_sock *bo = bcm_sk(sk); in bcm_connect() local
1594 if (bo->bound) { in bcm_connect()
1614 bo->ifindex = dev->ifindex; in bcm_connect()
1619 bo->ifindex = 0; in bcm_connect()
1625 sprintf(bo->procname, "%lu", sock_i_ino(sk)); in bcm_connect()
1626 bo->bcm_proc_read = proc_create_net_single(bo->procname, 0644, in bcm_connect()
1629 if (!bo->bcm_proc_read) { in bcm_connect()
1636 bo->bound = 1; in bcm_connect()