• Home
  • Raw
  • Download

Lines Matching refs:proto

62 struct proto {  struct
73 struct proto protos[IDX_COUNT]; argument
109 static inline struct proto* get_proto(struct net_device *dev, u16 pid) in get_proto()
307 struct proto *proto = get_proto(dev, pid); in ppp_cp_event() local
309 old_state = proto->state; in ppp_cp_event()
315 proto_name(pid), event_names[event], state_names[proto->state]); in ppp_cp_event()
320 proto->state = action & STATE_MASK; in ppp_cp_event()
322 mod_timer(&proto->timer, proto->timeout = in ppp_cp_event()
325 proto->restart_counter = 0; in ppp_cp_event()
327 proto->restart_counter = (proto->state == STOPPING) ? in ppp_cp_event()
331 ppp_tx_cp(dev, pid, CP_CONF_REQ, proto->cr_id = ++ppp->seq, in ppp_cp_event()
344 if (old_state != OPENED && proto->state == OPENED) { in ppp_cp_event()
351 mod_timer(&proto->timer, proto->timeout = in ppp_cp_event()
355 if (old_state == OPENED && proto->state != OPENED) { in ppp_cp_event()
363 if (old_state != CLOSED && proto->state == CLOSED) in ppp_cp_event()
364 del_timer(&proto->timer); in ppp_cp_event()
368 proto_name(pid), event_names[event], state_names[proto->state]); in ppp_cp_event()
441 struct proto *proto; in ppp_rx() local
461 proto = get_proto(dev, pid); in ppp_rx()
462 if (!proto) { in ppp_rx()
504 if (len >= 4 && proto->state == OPENED) in ppp_rx()
525 if (cp->id == proto->cr_id) in ppp_rx()
531 if (cp->id == proto->cr_id) in ppp_rx()
567 struct proto *proto = from_timer(proto, t, timer); in ppp_timer() local
568 struct ppp *ppp = get_ppp(proto->dev); in ppp_timer()
575 if (timer_pending(&proto->timer)) { in ppp_timer()
579 switch (proto->state) { in ppp_timer()
584 if (proto->restart_counter) { in ppp_timer()
585 ppp_cp_event(proto->dev, proto->pid, TO_GOOD, 0, 0, in ppp_timer()
587 proto->restart_counter--; in ppp_timer()
588 } else if (netif_carrier_ok(proto->dev)) in ppp_timer()
589 ppp_cp_event(proto->dev, proto->pid, TO_GOOD, 0, 0, in ppp_timer()
592 ppp_cp_event(proto->dev, proto->pid, TO_BAD, 0, 0, in ppp_timer()
597 if (proto->pid != PID_LCP) in ppp_timer()
601 netdev_info(proto->dev, "Link down\n"); in ppp_timer()
602 ppp_cp_event(proto->dev, PID_LCP, STOP, 0, 0, 0, NULL); in ppp_timer()
603 ppp_cp_event(proto->dev, PID_LCP, START, 0, 0, 0, NULL); in ppp_timer()
606 ppp_tx_cp(proto->dev, PID_LCP, LCP_ECHO_REQ, in ppp_timer()
608 proto->timer.expires = jiffies + in ppp_timer()
610 add_timer(&proto->timer); in ppp_timer()
625 struct proto *proto = &ppp->protos[i]; in ppp_start() local
626 proto->dev = dev; in ppp_start()
627 timer_setup(&proto->timer, ppp_timer, 0); in ppp_start()
628 proto->state = CLOSED; in ppp_start()
647 static struct hdlc_proto proto = { variable
669 if (dev_to_hdlc(dev)->proto != &proto) in ppp_ioctl()
687 result = attach_hdlc_protocol(dev, &proto, sizeof(struct ppp)); in ppp_ioctl()
714 register_hdlc_protocol(&proto); in mod_init()
720 unregister_hdlc_protocol(&proto); in mod_exit()