From 912610fbacd8fa20a69d4830ef6d1794e12873a8 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 23 Jun 2023 14:17:46 -0700 Subject: [PATCH] iso-tester: Fix checks of latency and interval Due to rounding of latency, BAP uses msec while HCI uses slots of 1.25 ms, values may not return an exact match which is fine since the BAP QoS suggests they are the maximum latency/interval so values bellow that shall be considered a match. --- tools/iso-tester.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/iso-tester.c b/tools/iso-tester.c index d6c79db..bbd5a47 100644 --- a/tools/iso-tester.c +++ b/tools/iso-tester.c @@ -1480,14 +1480,14 @@ static int connect_iso_sock(struct test_data *data, uint8_t num, int sk) static bool check_io_qos(const struct bt_iso_io_qos *io1, const struct bt_iso_io_qos *io2) { - if (io1->interval && io2->interval && io1->interval != io2->interval) { - tester_warn("Unexpected IO interval: %u != %u", + if (io1->interval && io2->interval && io1->interval > io2->interval) { + tester_warn("Unexpected IO interval: %u > %u", io1->interval, io2->interval); return false; } - if (io1->latency && io2->latency && io1->latency != io2->latency) { - tester_warn("Unexpected IO latency: %u != %u", + if (io1->latency && io2->latency && io1->latency > io2->latency) { + tester_warn("Unexpected IO latency: %u > %u", io1->latency, io2->latency); return false; } -- 2.7.4