[PATCH BlueZ 1/6] emulator: Store LE advertising data length in btdev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



LE advertising data length will be used for emulating reports in other
virtual devices.
---
 emulator/btdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/emulator/btdev.c b/emulator/btdev.c
index a602c05..73174a5 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -90,6 +90,7 @@ struct btdev {
 	uint8_t  le_simultaneous;
 	uint8_t  le_event_mask[8];
 	uint8_t  le_adv_data[31];
+	uint8_t  le_adv_data_len;
 
 	uint16_t sync_train_interval;
 	uint32_t sync_train_timeout;
@@ -1487,6 +1488,7 @@ static void default_cmd(struct btdev *btdev, uint16_t opcode,
 		if (btdev->type == BTDEV_TYPE_BREDR)
 			goto unsupported;
 		lsad = data;
+		btdev->le_adv_data_len = lsad->len;
 		memcpy(btdev->le_adv_data, lsad->data, 31);
 		status = BT_HCI_ERR_SUCCESS;
 		cmd_complete(btdev, opcode, &status, sizeof(status));
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux