Skip to contentSkip to conversation

Bluetooth: Add support for Get Advertising Size Information command

PATCH In review Marcel Holtmann 2 participants 2 messages Nov 19, 2015 – Nov 22, 2015

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 3/3 Bluetooth: Add support for Get Advertising Size Information command

The Get Advertising Size Information command allows to retrieve size information for advertising data and scan response data fields depending on the selected flags. This is useful if applications want to know the available size ahead of time.

---
 include/net/bluetooth/mgmt.h | 13 ++++++++++
 net/bluetooth/mgmt.c         | 58 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 71 insertions(+)
include/net/bluetooth/mgmt.h +13 -0
index b831242d48a4..af17774c9416 100644
@@ -571,6 +571,19 @@ struct mgmt_rp_remove_advertising {
 	__u8	instance;
 } __packed;
 
+#define MGMT_OP_GET_ADV_SIZE_INFO	0x0040
+struct mgmt_cp_get_adv_size_info {
+	__u8	instance;
+	__le32	flags;
+} __packed;
+#define MGMT_GET_ADV_SIZE_INFO_SIZE	5
+struct mgmt_rp_get_adv_size_info {
+	__u8	instance;
+	__le32	flags;
+	__u8	max_adv_data_len;
+	__u8	max_scan_rsp_len;
+} __packed;
+
 #define MGMT_EV_CMD_COMPLETE		0x0001
 struct mgmt_ev_cmd_complete {
 	__le16	opcode;
net/bluetooth/mgmt.c +58 -0

76 lines not on this page · raw message

Signature · 1 line
2.5.0
#1 lore raw

Hi Marcel,

Quoted 10 lines · Marcel Holtmann

The Get Advertising Size Information command allows to retrieve size information for advertising data and scan response data fields depending on the selected flags. This is useful if applications want to know the available size ahead of time.

---
 include/net/bluetooth/mgmt.h | 13 ++++++++++
 net/bluetooth/mgmt.c         | 58 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 71 insertions(+)

This patch has now also been applied. Thanks.

Johan