Commit d97bbf3e authored by Alexandre Bailon's avatar Alexandre Bailon Committed by Greg Kroah-Hartman

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: default avatarAlexandre Bailon <abailon@baylibre.com>
Reported-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Reviewed-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent bf9deb29
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment