From 44a33126e0fa7df0ca568aa749e9db959d64e41c Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Mon, 5 May 2014 13:54:47 -0500 Subject: [PATCH] wctc4xxp: Only capture commands once they are on the descriptor ring. Eliminates some cases where there are duplicated packets in the capture if the hardware descriptor ring was already full. Signed-off-by: Shaun Ruffell Signed-off-by: Russ Meyerriecks --- drivers/dahdi/wctc4xxp/base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dahdi/wctc4xxp/base.c b/drivers/dahdi/wctc4xxp/base.c index b3d6714..3d67c90 100644 --- a/drivers/dahdi/wctc4xxp/base.c +++ b/drivers/dahdi/wctc4xxp/base.c @@ -1624,8 +1624,6 @@ wctc4xxp_transmit_cmd(struct wcdte *wc, struct tcb *cmd) wctc4xxp_add_to_response_list(wc, cmd); mod_timer(&wc->watchdog, jiffies + HZ/2); } - if (!(cmd->flags & DO_NOT_CAPTURE)) - wctc4xxp_net_capture_cmd(wc, cmd); res = wctc4xxp_submit(wc->txd, cmd); if (-EBUSY == res) { /* Looks like we're out of room in the descriptor @@ -1636,6 +1634,8 @@ wctc4xxp_transmit_cmd(struct wcdte *wc, struct tcb *cmd) wctc4xxp_remove_from_response_list(wc, cmd); wctc4xxp_add_to_command_list(wc, cmd); } else if (0 == res) { + if (!(cmd->flags & DO_NOT_CAPTURE)) + wctc4xxp_net_capture_cmd(wc, cmd); wctc4xxp_transmit_demand_poll(wc); } else { /* Unknown return value... */