Lines Matching refs:po

156 static int __set_item(struct pppox_opt *po)  in __set_item()  argument
158 int hash = hash_item(po->pppoe_pa.sid, po->pppoe_pa.remote); in __set_item()
163 if (cmp_2_addr(&ret->pppoe_pa, &po->pppoe_pa)) in __set_item()
170 po->next = item_hash_table[hash]; in __set_item()
171 item_hash_table[hash] = po; in __set_item()
206 struct pppox_opt *po; in get_item() local
209 po = __get_item(sid, addr); in get_item()
210 if (po) in get_item()
211 sock_hold(po->sk); in get_item()
214 return po; in get_item()
222 static inline int set_item(struct pppox_opt *po) in set_item() argument
226 if (!po) in set_item()
230 i = __set_item(po); in set_item()
265 struct pppox_opt *po = item_hash_table[hash]; in pppoe_flush_dev() local
267 while (po != NULL) { in pppoe_flush_dev()
268 if (po->pppoe_dev == dev) { in pppoe_flush_dev()
269 struct sock *sk = po->sk; in pppoe_flush_dev()
272 po->pppoe_dev = NULL; in pppoe_flush_dev()
300 po = item_hash_table[hash]; in pppoe_flush_dev()
303 po = po->next; in pppoe_flush_dev()
349 struct pppox_opt *po = sk->protinfo.pppox; in pppoe_rcv_core() local
353 ppp_input(&po->chan, skb); in pppoe_rcv_core()
355 relay_po = get_item_by_addr(&po->pppoe_relay); in pppoe_rcv_core()
392 struct pppox_opt *po; in pppoe_rcv() local
400 po = get_item((unsigned long) ph->sid, skb->mac.ethernet->h_source); in pppoe_rcv()
401 if (!po) in pppoe_rcv()
407 sk = po->sk; in pppoe_rcv()
439 struct pppox_opt *po; in pppoe_disc_rcv() local
444 po = get_item((unsigned long) ph->sid, skb->mac.ethernet->h_source); in pppoe_disc_rcv()
445 if (po) { in pppoe_disc_rcv()
446 struct sock *sk = po->sk; in pppoe_disc_rcv()
548 struct pppox_opt *po; in pppoe_release() local
562 po = sk->protinfo.pppox; in pppoe_release()
563 if (po->pppoe_pa.sid) { in pppoe_release()
564 delete_item(po->pppoe_pa.sid, po->pppoe_pa.remote); in pppoe_release()
567 if (po->pppoe_dev) in pppoe_release()
568 dev_put(po->pppoe_dev); in pppoe_release()
570 po->pppoe_dev = NULL; in pppoe_release()
588 struct pppox_opt *po = sk->protinfo.pppox; in pppoe_connect() local
609 if (po->pppoe_pa.sid) { in pppoe_connect()
613 delete_item(po->pppoe_pa.sid,po->pppoe_pa.remote); in pppoe_connect()
615 if(po->pppoe_dev) in pppoe_connect()
616 dev_put(po->pppoe_dev); in pppoe_connect()
618 memset(po, 0, sizeof(struct pppox_opt)); in pppoe_connect()
619 po->sk = sk; in pppoe_connect()
632 po->pppoe_dev = dev; in pppoe_connect()
637 memcpy(&po->pppoe_pa, in pppoe_connect()
641 error = set_item(po); in pppoe_connect()
645 po->chan.hdrlen = (sizeof(struct pppoe_hdr) + in pppoe_connect()
648 po->chan.mtu = dev->mtu - sizeof(struct pppoe_hdr); in pppoe_connect()
649 po->chan.private = sk; in pppoe_connect()
650 po->chan.ops = &pppoe_chan_ops; in pppoe_connect()
652 error = ppp_register_channel(&po->chan); in pppoe_connect()
665 if (po->pppoe_dev) { in pppoe_connect()
666 dev_put(po->pppoe_dev); in pppoe_connect()
667 po->pppoe_dev = NULL; in pppoe_connect()
696 struct pppox_opt *po; in pppoe_ioctl() local
700 po = sk->protinfo.pppox; in pppoe_ioctl()
709 if (put_user(po->pppoe_dev->mtu - in pppoe_ioctl()
726 if (val < (po->pppoe_dev->mtu in pppoe_ioctl()
756 if (copy_from_user(&po->pppoe_relay, in pppoe_ioctl()
762 if (po->pppoe_relay.sa_family != AF_PPPOX || in pppoe_ioctl()
763 po->pppoe_relay.sa_protocol!= PX_PROTO_OE) in pppoe_ioctl()
768 relay_po = get_item_by_addr(&po->pppoe_relay); in pppoe_ioctl()
994 struct pppox_opt *po; in pppoe_proc_info() local
1008 po = item_hash_table[i]; in pppoe_proc_info()
1009 while (po) { in pppoe_proc_info()
1010 char *dev = po->pppoe_pa.dev; in pppoe_proc_info()
1014 po->pppoe_pa.sid, in pppoe_proc_info()
1015 po->pppoe_pa.remote[0], in pppoe_proc_info()
1016 po->pppoe_pa.remote[1], in pppoe_proc_info()
1017 po->pppoe_pa.remote[2], in pppoe_proc_info()
1018 po->pppoe_pa.remote[3], in pppoe_proc_info()
1019 po->pppoe_pa.remote[4], in pppoe_proc_info()
1020 po->pppoe_pa.remote[5], in pppoe_proc_info()
1032 po = po->next; in pppoe_proc_info()
1035 if (po) in pppoe_proc_info()