[PATCH BlueZ 3/4] shared/mgmt: Add mgmt_get_mtu

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

 



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

This adds mgmt_get_mtu function which can be used to query the
transport MTU.
---
 src/shared/mgmt.c | 8 ++++++++
 src/shared/mgmt.h | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/src/shared/mgmt.c b/src/shared/mgmt.c
index cec8993e7..41457b430 100644
--- a/src/shared/mgmt.c
+++ b/src/shared/mgmt.c
@@ -963,3 +963,11 @@ bool mgmt_unregister_all(struct mgmt *mgmt)
 
 	return true;
 }
+
+uint16_t mgmt_get_mtu(struct mgmt *mgmt)
+{
+	if (!mgmt)
+		return 0;
+
+	return mgmt->mtu;
+}
diff --git a/src/shared/mgmt.h b/src/shared/mgmt.h
index 808bf4c7f..56add613d 100644
--- a/src/shared/mgmt.h
+++ b/src/shared/mgmt.h
@@ -76,3 +76,5 @@ unsigned int mgmt_register(struct mgmt *mgmt, uint16_t event, uint16_t index,
 bool mgmt_unregister(struct mgmt *mgmt, unsigned int id);
 bool mgmt_unregister_index(struct mgmt *mgmt, uint16_t index);
 bool mgmt_unregister_all(struct mgmt *mgmt);
+
+uint16_t mgmt_get_mtu(struct mgmt *mgmt);
-- 
2.31.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