Lines Matching refs:ppp

72 struct ppp {  struct
105 static inline struct ppp *get_ppp(struct net_device *dev) in get_ppp()
107 return (struct ppp *)dev_to_hdlc(dev)->state; in get_ppp()
112 struct ppp *ppp = get_ppp(dev); in get_proto() local
116 return &ppp->protos[IDX_LCP]; in get_proto()
118 return &ppp->protos[IDX_IPCP]; in get_proto()
120 return &ppp->protos[IDX_IPV6CP]; in get_proto()
303 struct ppp *ppp = get_ppp(dev); in ppp_cp_event() local
320 jiffies + ppp->req_timeout * HZ); in ppp_cp_event()
325 ppp->term_retries : ppp->cr_retries; in ppp_cp_event()
328 ppp_tx_cp(dev, pid, CP_CONF_REQ, proto->cr_id = ++ppp->seq, in ppp_cp_event()
335 ppp_tx_cp(dev, pid, CP_TERM_REQ, ++ppp->seq, 0, NULL); in ppp_cp_event()
339 ppp_tx_cp(dev, pid, CP_CODE_REJ, ++ppp->seq, len, data); in ppp_cp_event()
347 ppp->last_pong = jiffies; in ppp_cp_event()
349 jiffies + ppp->keepalive_interval * HZ); in ppp_cp_event()
437 struct ppp *ppp = get_ppp(dev); in ppp_rx() local
448 spin_lock_irqsave(&ppp->lock, flags); in ppp_rx()
460 if (ppp->protos[IDX_LCP].state == OPENED) in ppp_rx()
462 ++ppp->seq, skb->len + 2, &hdr->protocol); in ppp_rx()
507 if (cp->id == ppp->echo_id) in ppp_rx()
508 ppp->last_pong = jiffies; in ppp_rx()
556 spin_unlock_irqrestore(&ppp->lock, flags); in ppp_rx()
565 struct ppp *ppp = get_ppp(proto->dev); in ppp_timer() local
568 spin_lock_irqsave(&ppp->lock, flags); in ppp_timer()
573 spin_unlock_irqrestore(&ppp->lock, flags); in ppp_timer()
596 if (time_after(jiffies, ppp->last_pong + in ppp_timer()
597 ppp->keepalive_timeout * HZ)) { in ppp_timer()
602 ppp->echo_id = ++ppp->seq; in ppp_timer()
604 ppp->echo_id, 0, NULL); in ppp_timer()
606 ppp->keepalive_interval * HZ; in ppp_timer()
611 spin_unlock_irqrestore(&ppp->lock, flags); in ppp_timer()
617 struct ppp *ppp = get_ppp(dev); in ppp_start() local
621 struct proto *proto = &ppp->protos[i]; in ppp_start()
627 ppp->protos[IDX_LCP].pid = PID_LCP; in ppp_start()
628 ppp->protos[IDX_IPCP].pid = PID_IPCP; in ppp_start()
629 ppp->protos[IDX_IPV6CP].pid = PID_IPV6CP; in ppp_start()
661 struct ppp *ppp; in ppp_ioctl() local
685 result = attach_hdlc_protocol(dev, &proto, sizeof(struct ppp)); in ppp_ioctl()
689 ppp = get_ppp(dev); in ppp_ioctl()
690 spin_lock_init(&ppp->lock); in ppp_ioctl()
691 ppp->req_timeout = 2; in ppp_ioctl()
692 ppp->cr_retries = 10; in ppp_ioctl()
693 ppp->term_retries = 2; in ppp_ioctl()
694 ppp->keepalive_interval = 10; in ppp_ioctl()
695 ppp->keepalive_timeout = 60; in ppp_ioctl()