From 5b07569eb9b689d7611a3424499005276332e0fa Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sun, 13 Sep 2015 17:59:14 +0200 Subject: [PATCH] PPP, remove now unused ioctl callback from link_callbacks structure --- src/include/netif/ppp/ppp_impl.h | 2 -- src/netif/ppp/ppp.c | 4 +--- src/netif/ppp/pppoe.c | 1 - src/netif/ppp/pppol2tp.c | 1 - src/netif/ppp/pppos.c | 14 +------------- 5 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/include/netif/ppp/ppp_impl.h b/src/include/netif/ppp/ppp_impl.h index 3579e289..ffbd2459 100644 --- a/src/include/netif/ppp/ppp_impl.h +++ b/src/include/netif/ppp/ppp_impl.h @@ -151,8 +151,6 @@ struct link_callbacks { void (*send_config)(ppp_pcb *pcb, void *ctx, u32_t accm, int pcomp, int accomp); /* confire the receive-side characteristics of the PPP interface */ void (*recv_config)(ppp_pcb *pcb, void *ctx, u32_t accm, int pcomp, int accomp); - /* Get and set parameters for the given connection. */ - err_t (*ioctl)(ppp_pcb *pcb, void *ctx, int cmd, void *arg); }; /* diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index 2f2deeec..56dc49ab 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -388,9 +388,7 @@ ppp_ioctl(ppp_pcb *pcb, u8_t cmd, void *arg) return ERR_OK; default: - if (pcb->link_cb->ioctl) { - return pcb->link_cb->ioctl(pcb, pcb->link_ctx_cb, cmd, arg); - } + goto fail; } fail: diff --git a/src/netif/ppp/pppoe.c b/src/netif/ppp/pppoe.c index 7bf89ece..2cf09b24 100644 --- a/src/netif/ppp/pppoe.c +++ b/src/netif/ppp/pppoe.c @@ -156,7 +156,6 @@ static const struct link_callbacks pppoe_callbacks = { pppoe_write, pppoe_netif_output, NULL, - NULL, NULL }; diff --git a/src/netif/ppp/pppol2tp.c b/src/netif/ppp/pppol2tp.c index 5b8f15fd..4482d59f 100644 --- a/src/netif/ppp/pppol2tp.c +++ b/src/netif/ppp/pppol2tp.c @@ -107,7 +107,6 @@ static const struct link_callbacks pppol2tp_callbacks = { pppol2tp_write, pppol2tp_netif_output, NULL, - NULL, NULL }; diff --git a/src/netif/ppp/pppos.c b/src/netif/ppp/pppos.c index 4e78e5f9..2b19d444 100644 --- a/src/netif/ppp/pppos.c +++ b/src/netif/ppp/pppos.c @@ -61,7 +61,6 @@ static void pppos_disconnect(ppp_pcb *ppp, void *ctx); static err_t pppos_destroy(ppp_pcb *ppp, void *ctx); static void pppos_send_config(ppp_pcb *ppp, void *ctx, u32_t accm, int pcomp, int accomp); static void pppos_recv_config(ppp_pcb *ppp, void *ctx, u32_t accm, int pcomp, int accomp); -static err_t pppos_ioctl(ppp_pcb *pcb, void *ctx, int cmd, void *arg); /* Prototypes for procedures local to this file. */ #if PPP_INPROC_IRQ_SAFE @@ -83,8 +82,7 @@ static const struct link_callbacks pppos_callbacks = { pppos_write, pppos_netif_output, pppos_send_config, - pppos_recv_config, - pppos_ioctl + pppos_recv_config }; /* PPP's Asynchronous-Control-Character-Map. The mask array is used @@ -782,16 +780,6 @@ pppos_recv_config(ppp_pcb *ppp, void *ctx, u32_t accm, int pcomp, int accomp) pppos->in_accm[0], pppos->in_accm[1], pppos->in_accm[2], pppos->in_accm[3])); } -static err_t -pppos_ioctl(ppp_pcb *pcb, void *ctx, int cmd, void *arg) -{ - LWIP_UNUSED_ARG(pcb); - LWIP_UNUSED_ARG(ctx); - LWIP_UNUSED_ARG(cmd); - LWIP_UNUSED_ARG(arg); - return ERR_VAL; -} - /* * Drop the input packet. */