From: Iulia Tanasescu <iulia.tanasescu@nxp.com>
To: linux-bluetooth@vger.kernel.org
Cc: Iulia Tanasescu <iulia.tanasescu@nxp.com>
Subject: [PATCH BlueZ 1/8] btio: Use unicast structure for ISO QoS options
Date: Mon, 20 Mar 2023 16:37:06 +0200 [thread overview]
Message-ID: <20230320143713.25449-2-iulia.tanasescu@nxp.com> (raw)
In-Reply-To: <20230320143713.25449-1-iulia.tanasescu@nxp.com>
Convert the generic bt_iso_qos structure into the dedicated unicast
structure for ISO QoS options.
---
btio/btio.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/btio/btio.c b/btio/btio.c
index 1ad42728d..017b53a54 100644
--- a/btio/btio.c
+++ b/btio/btio.c
@@ -5,6 +5,7 @@
*
* Copyright (C) 2009-2010 Marcel Holtmann <marcel@holtmann.org>
* Copyright (C) 2009-2010 Nokia Corporation
+ * Copyright 2023 NXP
*
*
*/
@@ -68,7 +69,7 @@ struct set_opts {
int flushable;
uint32_t priority;
uint16_t voice;
- struct bt_iso_qos qos;
+ struct bt_iso_unicast_qos qos;
};
struct connect {
@@ -857,11 +858,11 @@ voice:
return TRUE;
}
-static gboolean iso_set(int sock, struct bt_iso_qos *qos, GError **err)
+static gboolean iso_set(int sock, struct bt_iso_unicast_qos *qos, GError **err)
{
- if (setsockopt(sock, SOL_BLUETOOTH, BT_ISO_QOS, qos,
+ if (setsockopt(sock, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, qos,
sizeof(*qos)) < 0) {
- ERROR_FAILED(err, "setsockopt(BT_ISO_QOS)", errno);
+ ERROR_FAILED(err, "setsockopt(BT_ISO_UNICAST_QOS)", errno);
return FALSE;
}
@@ -963,7 +964,7 @@ static gboolean parse_set_opts(struct set_opts *opts, GError **err,
opts->voice = va_arg(args, int);
break;
case BT_IO_OPT_QOS:
- opts->qos = *va_arg(args, struct bt_iso_qos *);
+ opts->qos = *va_arg(args, struct bt_iso_unicast_qos *);
break;
case BT_IO_OPT_INVALID:
case BT_IO_OPT_KEY_SIZE:
@@ -1570,14 +1571,15 @@ static gboolean iso_get(int sock, GError **err, BtIOOption opt1, va_list args)
{
BtIOOption opt = opt1;
struct sockaddr_iso src, dst;
- struct bt_iso_qos qos;
+ struct bt_iso_unicast_qos qos;
socklen_t len;
uint32_t phy;
len = sizeof(qos);
memset(&qos, 0, len);
- if (getsockopt(sock, SOL_BLUETOOTH, BT_ISO_QOS, &qos, &len) < 0) {
- ERROR_FAILED(err, "getsockopt(BT_ISO_QOS)", errno);
+ if (getsockopt(sock, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, &qos,
+ &len) < 0) {
+ ERROR_FAILED(err, "getsockopt(BT_ISO_UNICAST_QOS)", errno);
return FALSE;
}
@@ -1624,7 +1626,7 @@ static gboolean iso_get(int sock, GError **err, BtIOOption opt1, va_list args)
*(va_arg(args, uint32_t *)) = phy;
break;
case BT_IO_OPT_QOS:
- *(va_arg(args, struct bt_iso_qos *)) = qos;
+ *(va_arg(args, struct bt_iso_unicast_qos *)) = qos;
break;
case BT_IO_OPT_HANDLE:
case BT_IO_OPT_CLASS:
--
2.34.1
next prev parent reply other threads:[~2023-03-20 14:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-20 14:37 [PATCH BlueZ 0/8] Split bt_iso_qos into dedicated structures Iulia Tanasescu
2023-03-20 14:37 ` Iulia Tanasescu [this message]
2023-03-20 15:11 ` bluez.test.bot
2023-03-20 14:37 ` [PATCH BlueZ 2/8] client/player: Use unicast structure for ISO QoS options Iulia Tanasescu
2023-03-20 14:37 ` [PATCH BlueZ 3/8] emulator/bthost: pass unicast QoS structure to bthost_set_cig_params Iulia Tanasescu
2023-03-20 14:37 ` [PATCH BlueZ 4/8] lib: split bt_iso_qos into dedicated structures Iulia Tanasescu
2023-03-20 14:37 ` [PATCH BlueZ 5/8] profiles/audio/bap: Use unicast structure for ISO QoS options Iulia Tanasescu
2023-03-20 14:37 ` [PATCH BlueZ 6/8] tools/btiotest: Use unicast QoS structure for ISO io Iulia Tanasescu
2023-03-20 14:37 ` [PATCH BlueZ 7/8] tools/isotest: Use dedicated ISO QoS options for unicast and broadcast Iulia Tanasescu
2023-03-20 14:37 ` [PATCH BlueZ 8/8] tools/iso-tester: " Iulia Tanasescu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230320143713.25449-2-iulia.tanasescu@nxp.com \
--to=iulia.tanasescu@nxp.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox