[PATCH v2 3/4] advertising: Use bt_ad_set_max_len

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

 



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

This uses bt_ad_set_max_len to properly set the maximum data length of
the bt_ad instances based on what the kernel returns.
---
 src/advertising.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/advertising.c b/src/advertising.c
index 0dceb14c3be4..6332ec8f9222 100644
--- a/src/advertising.c
+++ b/src/advertising.c
@@ -1556,10 +1556,14 @@ static struct btd_adv_client *client_create(struct btd_adv_manager *manager,
 	if (!client->data)
 		goto fail;
 
+	bt_ad_set_max_len(client->data, manager->max_adv_len);
+
 	client->scan = bt_ad_new();
 	if (!client->scan)
 		goto fail;
 
+	bt_ad_set_max_len(client->scan, manager->max_scan_rsp_len);
+
 	client->manager = manager;
 	client->appearance = UINT16_MAX;
 	client->tx_power = ADV_TX_POWER_NO_PREFERENCE;
-- 
2.40.1




[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