Lines Matching full:ctx
19 void ppp_network_up(struct ppp_context *ctx, int proto) in ppp_network_up() argument
21 if (ctx->network_protos_up == 0) { in ppp_network_up()
22 ppp_change_phase(ctx, PPP_RUNNING); in ppp_network_up()
25 ctx->network_protos_up++; in ppp_network_up()
27 NET_DBG("[%p] Proto %s (0x%04x) %s (%d)", ctx, ppp_proto2str(proto), in ppp_network_up()
28 proto, "up", ctx->network_protos_up); in ppp_network_up()
31 void ppp_network_down(struct ppp_context *ctx, int proto) in ppp_network_down() argument
33 ctx->network_protos_up--; in ppp_network_down()
35 if (ctx->network_protos_up <= 0) { in ppp_network_down()
36 ctx->network_protos_up = 0; in ppp_network_down()
37 ppp_change_phase(ctx, PPP_TERMINATE); in ppp_network_down()
40 NET_DBG("[%p] Proto %s (0x%04x) %s (%d)", ctx, ppp_proto2str(proto), in ppp_network_down()
41 proto, "down", ctx->network_protos_up); in ppp_network_down()
44 void ppp_network_done(struct ppp_context *ctx, int proto) in ppp_network_done() argument
46 ctx->network_protos_up--; in ppp_network_done()
47 if (ctx->network_protos_up <= 0) { in ppp_network_done()
51 ppp_proto->close(ctx, "All networks down"); in ppp_network_done()
56 void ppp_network_all_down(struct ppp_context *ctx) in ppp_network_all_down() argument
60 proto->lower_down(ctx); in ppp_network_all_down()
64 ctx->network_protos_open--; in ppp_network_all_down()
65 proto->close(ctx, "LCP down"); in ppp_network_all_down()
69 if (ctx->network_protos_open > 0) { in ppp_network_all_down()
71 ctx->network_protos_open); in ppp_network_all_down()
74 ctx->network_protos_open = 0; in ppp_network_all_down()