greybus: loopback: Fix calculations error for ping transfers

For the async ping transfer, statistics are counted twice,
once after the after the gb_loopback_async_operation() and
once in the callback.
Only keep the one in the callback.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
Reported-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Alexandre Bailon 2016-02-25 18:19:13 +01:00 committed by Greg Kroah-Hartman
parent bf9deb29e2
commit d97bbf3ed6

View File

@ -969,7 +969,6 @@ static int gb_loopback_fn(void *data)
if (gb->async) {
if (type == GB_LOOPBACK_TYPE_PING) {
error = gb_loopback_async_ping(gb);
gb_loopback_calculate_stats(gb);
} else if (type == GB_LOOPBACK_TYPE_TRANSFER) {
error = gb_loopback_async_transfer(gb, size);
} else if (type == GB_LOOPBACK_TYPE_SINK) {