All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] btdev: Add implementation for BT_HCI_CMD_LE_TERM_BIG
@ 2022-01-27  1:03 Luiz Augusto von Dentz
  2022-01-27  2:22 ` [BlueZ] " bluez.test.bot
  0 siblings, 1 reply; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2022-01-27  1:03 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This adds handler for BT_HCI_CMD_LE_TERM_BIG and generate
BT_HCI_EVT_LE_BIG_TERMINATE to indicate to the host stack that the
BIG has been terminated.
---
 emulator/btdev.c | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/emulator/btdev.c b/emulator/btdev.c
index 002ebf3e7..0ef840a95 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -5733,8 +5733,24 @@ static int cmd_create_big_test(struct btdev *dev, const void *data, uint8_t len)
 
 static int cmd_term_big(struct btdev *dev, const void *data, uint8_t len)
 {
-	/* TODO */
-	return -ENOTSUP;
+	cmd_status(dev, BT_HCI_ERR_SUCCESS, BT_HCI_CMD_DISCONNECT);
+
+	return 0;
+}
+
+static int cmd_term_big_complete(struct btdev *dev, const void *data,
+							uint8_t len)
+{
+	const struct bt_hci_cmd_le_term_big *cmd = data;
+	struct bt_hci_evt_le_big_terminate rsp;
+
+	memset(&rsp, 0, sizeof(rsp));
+	rsp.reason = cmd->reason;
+	rsp.handle = cmd->handle;
+
+	le_meta_event(dev, BT_HCI_EVT_LE_BIG_TERMINATE, &rsp, sizeof(rsp));
+
+	return 0;
 }
 
 static int cmd_big_create_sync(struct btdev *dev, const void *data, uint8_t len)
@@ -5953,7 +5969,7 @@ static int cmd_config_data_path(struct btdev *dev, const void *data,
 	CMD(BT_HCI_CMD_LE_CREATE_BIG, cmd_create_big, \
 			cmd_create_big_complete), \
 	CMD(BT_HCI_CMD_LE_CREATE_BIG_TEST, cmd_create_big_test, NULL), \
-	CMD(BT_HCI_CMD_LE_TERM_BIG, cmd_term_big, NULL), \
+	CMD(BT_HCI_CMD_LE_TERM_BIG, cmd_term_big, cmd_term_big_complete), \
 	CMD(BT_HCI_CMD_LE_BIG_CREATE_SYNC, cmd_big_create_sync, NULL), \
 	CMD(BT_HCI_CMD_LE_BIG_TERM_SYNC, cmd_big_term_sync, NULL), \
 	CMD(BT_HCI_CMD_LE_REQ_PEER_SCA, cmd_req_peer_sca, NULL), \
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [BlueZ] btdev: Add implementation for BT_HCI_CMD_LE_TERM_BIG
  2022-01-27  1:03 [PATCH BlueZ] btdev: Add implementation for BT_HCI_CMD_LE_TERM_BIG Luiz Augusto von Dentz
@ 2022-01-27  2:22 ` bluez.test.bot
  2022-01-28  2:01   ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 3+ messages in thread
From: bluez.test.bot @ 2022-01-27  2:22 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

[-- Attachment #1: Type: text/plain, Size: 997 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=608881

---Test result---

Test Summary:
CheckPatch                    PASS      1.42 seconds
GitLint                       PASS      0.99 seconds
Prep - Setup ELL              PASS      51.48 seconds
Build - Prep                  PASS      0.78 seconds
Build - Configure             PASS      10.14 seconds
Build - Make                  PASS      1502.48 seconds
Make Check                    PASS      12.33 seconds
Make Check w/Valgrind         PASS      535.54 seconds
Make Distcheck                PASS      279.31 seconds
Build w/ext ELL - Configure   PASS      10.27 seconds
Build w/ext ELL - Make        PASS      1437.51 seconds
Incremental Build with patchesPASS      0.00 seconds



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BlueZ] btdev: Add implementation for BT_HCI_CMD_LE_TERM_BIG
  2022-01-27  2:22 ` [BlueZ] " bluez.test.bot
@ 2022-01-28  2:01   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2022-01-28  2:01 UTC (permalink / raw)
  To: linux-bluetooth

Hi,

On Wed, Jan 26, 2022 at 6:22 PM <bluez.test.bot@gmail.com> wrote:
>
> This is automated email and please do not reply to this email!
>
> Dear submitter,
>
> Thank you for submitting the patches to the linux bluetooth mailing list.
> This is a CI test results with your patch series:
> PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=608881
>
> ---Test result---
>
> Test Summary:
> CheckPatch                    PASS      1.42 seconds
> GitLint                       PASS      0.99 seconds
> Prep - Setup ELL              PASS      51.48 seconds
> Build - Prep                  PASS      0.78 seconds
> Build - Configure             PASS      10.14 seconds
> Build - Make                  PASS      1502.48 seconds
> Make Check                    PASS      12.33 seconds
> Make Check w/Valgrind         PASS      535.54 seconds
> Make Distcheck                PASS      279.31 seconds
> Build w/ext ELL - Configure   PASS      10.27 seconds
> Build w/ext ELL - Make        PASS      1437.51 seconds
> Incremental Build with patchesPASS      0.00 seconds
>
>
>
> ---
> Regards,
> Linux Bluetooth

Pushed.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-28  2:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27  1:03 [PATCH BlueZ] btdev: Add implementation for BT_HCI_CMD_LE_TERM_BIG Luiz Augusto von Dentz
2022-01-27  2:22 ` [BlueZ] " bluez.test.bot
2022-01-28  2:01   ` Luiz Augusto von Dentz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.