Diff between 04f68f5418beb960ee97588437576012ce916e8c and fa6c85299a3cf11e83aeb689a83b4731e9c99565

Changed Files

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

Full Patch

diff --git a/emulator/btdev.c b/emulator/btdev.c
index 7f00b47..38769d8 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -675,6 +675,11 @@ uint8_t *btdev_get_features(struct btdev *btdev)
 	return btdev->features;
 }
 
+uint8_t btdev_get_scan_enable(struct btdev *btdev)
+{
+	return btdev->scan_enable;
+}
+
 uint8_t btdev_get_le_scan_enable(struct btdev *btdev)
 {
 	return btdev->le_scan_enable;
diff --git a/emulator/btdev.h b/emulator/btdev.h
index 324e63b..40c7219 100644
--- a/emulator/btdev.h
+++ b/emulator/btdev.h
@@ -80,6 +80,8 @@ void btdev_destroy(struct btdev *btdev);
 const uint8_t *btdev_get_bdaddr(struct btdev *btdev);
 uint8_t *btdev_get_features(struct btdev *btdev);
 
+uint8_t btdev_get_scan_enable(struct btdev *btdev);
+
 uint8_t btdev_get_le_scan_enable(struct btdev *btdev);
 
 void btdev_set_command_handler(struct btdev *btdev, btdev_command_func handler,
diff --git a/emulator/hciemu.c b/emulator/hciemu.c
index dd6cf12..c8d9db5 100644
--- a/emulator/hciemu.c
+++ b/emulator/hciemu.c
@@ -427,6 +427,14 @@ const uint8_t *hciemu_get_client_bdaddr(struct hciemu *hciemu)
 	return btdev_get_bdaddr(hciemu->client_dev);
 }
 
+uint8_t hciemu_get_master_scan_enable(struct hciemu *hciemu)
+{
+	if (!hciemu || !hciemu->master_dev)
+		return NULL;
+
+	return btdev_get_scan_enable(hciemu->master_dev);
+}
+
 uint8_t hciemu_get_master_le_scan_enable(struct hciemu *hciemu)
 {
 	if (!hciemu || !hciemu->master_dev)
diff --git a/emulator/hciemu.h b/emulator/hciemu.h
index bfc184d..c5578d1 100644
--- a/emulator/hciemu.h
+++ b/emulator/hciemu.h
@@ -53,6 +53,8 @@ uint8_t *hciemu_get_features(struct hciemu *hciemu);
 const uint8_t *hciemu_get_master_bdaddr(struct hciemu *hciemu);
 const uint8_t *hciemu_get_client_bdaddr(struct hciemu *hciemu);
 
+uint8_t hciemu_get_master_scan_enable(struct hciemu *hciemu);
+
 uint8_t hciemu_get_master_le_scan_enable(struct hciemu *hciemu);
 
 typedef void (*hciemu_command_func_t)(uint16_t opcode, const void *data,