diff mbox series

[BlueZ,2/2] iso-tester: Fix checks of latency and interval

Message ID 20230623212430.1702254-2-luiz.dentz@gmail.com
State New
Headers show
Series [BlueZ,1/2] btdev: Fix CIS Established Event parameters | expand

Commit Message

Luiz Augusto von Dentz June 23, 2023, 9:24 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

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 mbox series

Patch

diff --git a/tools/iso-tester.c b/tools/iso-tester.c
index d6c79db9072b..bbd5a47f6197 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;
 	}