[PATCH 3/6] src: Add support for the number of BISes in the main.conf

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

 



Add support for the number of BISes in the main.conf

---
 src/btd.h     |  6 ++++++
 src/main.c    | 10 ++++++++++
 src/main.conf |  8 ++++++++
 3 files changed, 24 insertions(+)

diff --git a/src/btd.h b/src/btd.h
index b7e7ebd61..2ad494008 100644
--- a/src/btd.h
+++ b/src/btd.h
@@ -108,6 +108,10 @@ struct btd_advmon_opts {
 	uint8_t		rssi_sampling_period;
 };
 
+struct btd_bcast_opts {
+	uint8_t		nb_bises;
+};
+
 struct btd_opts {
 	char		*name;
 	uint32_t	class;
@@ -151,6 +155,8 @@ struct btd_opts {
 	struct btd_advmon_opts	advmon;
 
 	struct btd_csis csis;
+
+	struct btd_bcast_opts bcast;
 };
 
 extern struct btd_opts btd_opts;
diff --git a/src/main.c b/src/main.c
index b1339c230..364f899c8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1137,6 +1137,13 @@ static void parse_advmon(GKeyFile *config)
 				0, UINT8_MAX);
 }
 
+static void parse_bcast(GKeyFile *config)
+{
+	parse_config_u8(config, "Bcast", "NumberOfBISes",
+				&btd_opts.bcast.nb_bises,
+				0, UINT8_MAX);
+}
+
 static void parse_config(GKeyFile *config)
 {
 	if (!config)
@@ -1154,6 +1161,7 @@ static void parse_config(GKeyFile *config)
 	parse_csis(config);
 	parse_avdtp(config);
 	parse_advmon(config);
+	parse_bcast(config);
 }
 
 static void init_defaults(void)
@@ -1195,6 +1203,8 @@ static void init_defaults(void)
 	btd_opts.avdtp.stream_mode = BT_IO_MODE_BASIC;
 
 	btd_opts.advmon.rssi_sampling_period = 0xFF;
+
+	btd_opts.bcast.nb_bises = 0x01;
 	btd_opts.csis.encrypt = true;
 }
 
diff --git a/src/main.conf b/src/main.conf
index 085c81a46..119d27a7b 100644
--- a/src/main.conf
+++ b/src/main.conf
@@ -337,3 +337,11 @@
 # 0xFF       Report only one advertisement per device during monitoring period
 # Default: 0xFF
 #RSSISamplingPeriod=0xFF
+
+[Bcast]
+# The number of BISes. This is used, when an application registers a
+# broadcast source endpoint, as the number of BISes in a BIG.
+# Possible values:
+# N = 0xXX   Number of BISes (range: 0x01 to nb of maximum Controller supported BISes)
+# Default: 0x01
+#NumberOfBISes=0x01
-- 
2.39.2




[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