linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/8] emulator: add support for checking le scan state
@ 2015-08-04 13:20 Jakub Pawlowski
  2015-08-04 13:20 ` [PATCH v3 2/8] tools/l2cap-tester: add close socket test Jakub Pawlowski
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Jakub Pawlowski @ 2015-08-04 13:20 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Pawlowski

---
 emulator/btdev.c  | 5 +++++
 emulator/btdev.h  | 2 ++
 emulator/hciemu.c | 8 ++++++++
 emulator/hciemu.h | 2 ++
 4 files changed, 17 insertions(+)

diff --git a/emulator/btdev.c b/emulator/btdev.c
index cd211ef..526f97a 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -660,6 +660,11 @@ uint8_t *btdev_get_features(struct btdev *btdev)
 	return btdev->features;
 }
 
+bool btdev_is_le_scan_enabled(struct btdev *btdev)
+{
+	return btdev->le_scan_enable;
+}
+
 static bool use_ssp(struct btdev *btdev1, struct btdev *btdev2)
 {
 	if (btdev1->auth_enable || btdev2->auth_enable)
diff --git a/emulator/btdev.h b/emulator/btdev.h
index 4b724a7..8b116e4 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);
 
+bool btdev_is_le_scan_enabled(struct btdev *btdev);
+
 void btdev_set_command_handler(struct btdev *btdev, btdev_command_func handler,
 							void *user_data);
 
diff --git a/emulator/hciemu.c b/emulator/hciemu.c
index 4881a24..c04aa6d 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);
 }
 
+const bool hciemu_is_master_le_scan_enabled(struct hciemu *hciemu)
+{
+	if (!hciemu || !hciemu->master_dev)
+		return NULL;
+
+	return btdev_is_le_scan_enabled(hciemu->master_dev);
+}
+
 bool hciemu_add_master_post_command_hook(struct hciemu *hciemu,
 			hciemu_command_func_t function, void *user_data)
 {
diff --git a/emulator/hciemu.h b/emulator/hciemu.h
index 41ca3fc..a526d8c 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);
 
+const bool hciemu_is_master_le_scan_enabled(struct hciemu *hciemu);
+
 typedef void (*hciemu_command_func_t)(uint16_t opcode, const void *data,
 						uint8_t len, void *user_data);
 
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [PATCH v3 1/8] emulator: add support for checking le scan state
@ 2015-09-02 17:51 Jakub Pawlowski
  2015-09-02 17:51 ` [PATCH v3 3/8] emulator: add BT_HCI_CMD_LE_CREATE_CONN_CANCEL handling Jakub Pawlowski
  0 siblings, 1 reply; 11+ messages in thread
From: Jakub Pawlowski @ 2015-09-02 17:51 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Pawlowski

---
 emulator/btdev.c  | 5 +++++
 emulator/btdev.h  | 2 ++
 emulator/hciemu.c | 8 ++++++++
 emulator/hciemu.h | 2 ++
 4 files changed, 17 insertions(+)

diff --git a/emulator/btdev.c b/emulator/btdev.c
index ceefd56..60e8e8c 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -669,6 +669,11 @@ uint8_t *btdev_get_features(struct btdev *btdev)
 	return btdev->features;
 }
 
+bool btdev_is_le_scan_enabled(struct btdev *btdev)
+{
+	return btdev->le_scan_enable;
+}
+
 static bool use_ssp(struct btdev *btdev1, struct btdev *btdev2)
 {
 	if (btdev1->auth_enable || btdev2->auth_enable)
diff --git a/emulator/btdev.h b/emulator/btdev.h
index 4b724a7..8b116e4 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);
 
+bool btdev_is_le_scan_enabled(struct btdev *btdev);
+
 void btdev_set_command_handler(struct btdev *btdev, btdev_command_func handler,
 							void *user_data);
 
diff --git a/emulator/hciemu.c b/emulator/hciemu.c
index 4881a24..c04aa6d 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);
 }
 
+const bool hciemu_is_master_le_scan_enabled(struct hciemu *hciemu)
+{
+	if (!hciemu || !hciemu->master_dev)
+		return NULL;
+
+	return btdev_is_le_scan_enabled(hciemu->master_dev);
+}
+
 bool hciemu_add_master_post_command_hook(struct hciemu *hciemu,
 			hciemu_command_func_t function, void *user_data)
 {
diff --git a/emulator/hciemu.h b/emulator/hciemu.h
index 41ca3fc..a526d8c 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);
 
+const bool hciemu_is_master_le_scan_enabled(struct hciemu *hciemu);
+
 typedef void (*hciemu_command_func_t)(uint16_t opcode, const void *data,
 						uint8_t len, void *user_data);
 
-- 
2.1.4


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

end of thread, other threads:[~2015-10-05 18:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-04 13:20 [PATCH v3 1/8] emulator: add support for checking le scan state Jakub Pawlowski
2015-08-04 13:20 ` [PATCH v3 2/8] tools/l2cap-tester: add close socket test Jakub Pawlowski
2015-08-04 13:20 ` [PATCH v3 3/8] emulator: add BT_HCI_CMD_LE_CREATE_CONN_CANCEL handling Jakub Pawlowski
2015-08-04 13:20 ` [PATCH v3 4/8] tools/l2cap-tester: Disconnect during connect attempt test Jakub Pawlowski
2015-08-04 13:20 ` [PATCH v3 5/8] tools/l2cap-tester: Two socket connect test Jakub Pawlowski
2015-08-04 13:20 ` [PATCH v3 6/8] tools/l2cap-tester connect two sockets disconnect one test Jakub Pawlowski
2015-08-04 13:20 ` [PATCH v3 7/8] emulator/hciemu: add second client Jakub Pawlowski
2015-08-04 13:20 ` [PATCH v3 8/8] tools/l2cap-tester: Connect to two devices test Jakub Pawlowski
  -- strict thread matches above, loose matches on Subject: below --
2015-09-02 17:51 [PATCH v3 1/8] emulator: add support for checking le scan state Jakub Pawlowski
2015-09-02 17:51 ` [PATCH v3 3/8] emulator: add BT_HCI_CMD_LE_CREATE_CONN_CANCEL handling Jakub Pawlowski
2015-10-05  8:21   ` Johan Hedberg
2015-10-05 18:28     ` Jakub Pawlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).