Lines Matching refs:pf

92 #define PF_TO_X(pf, X)		container_of(pf, X, file)
94 #define PF_TO_PPP(pf) PF_TO_X(pf, struct ppp)
95 #define PF_TO_CHANNEL(pf) PF_TO_X(pf, struct channel)
258 static int ppp_unattached_ioctl(struct net *net, struct ppp_file *pf,
283 static void init_ppp_file(struct ppp_file *pf, int kind);
400 struct ppp_file *pf = file->private_data;
403 if (pf) {
405 if (pf->kind == INTERFACE) {
406 ppp = PF_TO_PPP(pf);
412 if (refcount_dec_and_test(&pf->refcnt)) {
413 switch (pf->kind) {
415 ppp_destroy_interface(PF_TO_PPP(pf));
418 ppp_destroy_channel(PF_TO_CHANNEL(pf));
429 struct ppp_file *pf = file->private_data;
438 if (!pf)
440 add_wait_queue(&pf->rwait, &wait);
443 skb = skb_dequeue(&pf->rq);
447 if (pf->dead)
449 if (pf->kind == INTERFACE) {
455 struct ppp *ppp = PF_TO_PPP(pf);
474 remove_wait_queue(&pf->rwait, &wait);
499 struct ppp_file *pf = file->private_data;
503 if (!pf)
509 skb = alloc_skb(count + pf->hdrlen, GFP_KERNEL);
512 skb_reserve(skb, pf->hdrlen);
519 switch (pf->kind) {
521 ppp_xmit_process(PF_TO_PPP(pf), skb);
524 skb_queue_tail(&pf->xq, skb);
525 ppp_channel_push(PF_TO_CHANNEL(pf));
538 struct ppp_file *pf = file->private_data;
541 if (!pf)
543 poll_wait(file, &pf->rwait, wait);
545 if (skb_peek(&pf->rq))
547 if (pf->dead)
549 else if (pf->kind == INTERFACE) {
551 struct ppp *ppp = PF_TO_PPP(pf);
703 struct ppp_file *pf;
716 pf = file->private_data;
717 if (!pf) {
719 pf, file, cmd, arg);
735 if (pf->kind == CHANNEL) {
740 pch = PF_TO_CHANNEL(pf);
789 if (pf->kind != INTERFACE) {
796 ppp = PF_TO_PPP(pf);
970 struct ppp_file *pf;
976 pf = file->private_data;
977 if (pf && pf->kind == INTERFACE) {
978 struct ppp *ppp = PF_TO_PPP(pf);
1031 static int ppp_unattached_ioctl(struct net *net, struct ppp_file *pf,
3354 init_ppp_file(struct ppp_file *pf, int kind)
3356 pf->kind = kind;
3357 skb_queue_head_init(&pf->xq);
3358 skb_queue_head_init(&pf->rq);
3359 refcount_set(&pf->refcnt, 1);
3360 init_waitqueue_head(&pf->rwait);