From cbe4825d1a2e8d1accc0a4a8133a5135e4171aea Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Thu, 8 May 2014 16:45:36 -0500 Subject: [PATCH] wctc4xxp: Trivial removal of the receiveprep function. This was more a holdover when the AN983 interface was brought over from the voicebus driver. Signed-off-by: Shaun Ruffell Signed-off-by: Russ Meyerriecks --- drivers/dahdi/wctc4xxp/base.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/drivers/dahdi/wctc4xxp/base.c b/drivers/dahdi/wctc4xxp/base.c index 75e67df..4a8cf2d 100644 --- a/drivers/dahdi/wctc4xxp/base.c +++ b/drivers/dahdi/wctc4xxp/base.c @@ -2505,23 +2505,6 @@ queue_rtp_packet(struct wcdte *wc, struct tcb *cmd) return; } -static inline void -wctc4xxp_receiveprep(struct wcdte *wc, struct tcb *cmd) -{ - const struct ethhdr *ethhdr = (const struct ethhdr *)(cmd->data); - - if (cpu_to_be16(ETH_P_IP) == ethhdr->h_proto) { - queue_rtp_packet(wc, cmd); - } else if (cpu_to_be16(ETH_P_CSM_ENCAPS) == ethhdr->h_proto) { - receive_csm_encaps_packet(wc, cmd); - } else { - DTE_DEBUG(DTE_DEBUG_GENERAL, - "Unknown packet protocol received: %04x.\n", - be16_to_cpu(ethhdr->h_proto)); - free_cmd(cmd); - } -} - static void service_tx_ring(struct wcdte *wc) { struct tcb *cmd; @@ -2571,11 +2554,23 @@ static void service_rx_ring(struct wcdte *wc) * Process the received packets */ while (!list_empty(&local_list)) { + const struct ethhdr *ethhdr; + cmd = container_of(local_list.next, struct tcb, node); + ethhdr = (const struct ethhdr *)(cmd->data); list_del_init(&cmd->node); wctc4xxp_net_capture_cmd(wc, cmd); - wctc4xxp_receiveprep(wc, cmd); + if (cpu_to_be16(ETH_P_IP) == ethhdr->h_proto) { + queue_rtp_packet(wc, cmd); + } else if (cpu_to_be16(ETH_P_CSM_ENCAPS) == ethhdr->h_proto) { + receive_csm_encaps_packet(wc, cmd); + } else { + DTE_DEBUG(DTE_DEBUG_GENERAL, + "Unknown packet protocol received: %04x.\n", + be16_to_cpu(ethhdr->h_proto)); + free_cmd(cmd); + } } wctc4xxp_receive_demand_poll(wc); }