Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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) {