Diff between 87d4f95dc31208863b93d22fd035f049297a10ca and 7da93164f483306b5c360cf3edbd2f6e6ae89c24

Changed Files

File Additions Deletions Status
emulator/btdev.c +5 -0 modified
emulator/btdev.h +2 -0 modified
emulator/hciemu.c +14 -0 modified
emulator/hciemu.h +1 -0 modified

Full Patch

diff --git a/emulator/btdev.c b/emulator/btdev.c
index bd8ea0d..976c112 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -7406,6 +7406,11 @@ uint8_t *btdev_get_features(struct btdev *btdev)
 	return btdev->features;
 }
 
+uint8_t *btdev_get_commands(struct btdev *btdev)
+{
+	return btdev->commands;
+}
+
 uint8_t btdev_get_scan_enable(struct btdev *btdev)
 {
 	return btdev->scan_enable;
diff --git a/emulator/btdev.h b/emulator/btdev.h
index cad5f69..a96c1a3 100644
--- a/emulator/btdev.h
+++ b/emulator/btdev.h
@@ -76,6 +76,8 @@ bool btdev_set_bdaddr(struct btdev *btdev, const uint8_t *bdaddr);
 
 uint8_t *btdev_get_features(struct btdev *btdev);
 
+uint8_t *btdev_get_commands(struct btdev *btdev);
+
 uint8_t btdev_get_scan_enable(struct btdev *btdev);
 
 uint8_t btdev_get_le_scan_enable(struct btdev *btdev);
diff --git a/emulator/hciemu.c b/emulator/hciemu.c
index f13b4bd..ccc57aa 100644
--- a/emulator/hciemu.c
+++ b/emulator/hciemu.c
@@ -528,6 +528,20 @@ uint8_t *hciemu_get_features(struct hciemu *hciemu)
 	return btdev_get_features(dev);
 }
 
+uint8_t *hciemu_get_commands(struct hciemu *hciemu)
+{
+	struct btdev *dev;
+
+	if (!hciemu || !hciemu->vhci)
+		return NULL;
+
+	dev = vhci_get_btdev(hciemu->vhci);
+	if (!dev)
+		return NULL;
+
+	return btdev_get_commands(dev);
+}
+
 const uint8_t *hciemu_get_central_bdaddr(struct hciemu *hciemu)
 {
 	struct btdev *dev;
diff --git a/emulator/hciemu.h b/emulator/hciemu.h
index dba920f..9fbe343 100644
--- a/emulator/hciemu.h
+++ b/emulator/hciemu.h
@@ -55,6 +55,7 @@ void hciemu_flush_client_events(struct hciemu *hciemu);
 
 const char *hciemu_get_address(struct hciemu *hciemu);
 uint8_t *hciemu_get_features(struct hciemu *hciemu);
+uint8_t *hciemu_get_commands(struct hciemu *hciemu);
 
 const uint8_t *hciemu_get_central_bdaddr(struct hciemu *hciemu);
 const uint8_t *hciemu_get_client_bdaddr(struct hciemu *hciemu);