summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Winkler <danielwinkler@google.com>2020-10-29 16:06:19 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2020-10-29 17:45:21 -0700
commitf63c569f971ba9c6f028a9c8bf68be300efbba94 (patch)
treed5481d835847b8d65534d235e7f4fa10705e3c48 /lib
parentcf7795a6ad50ab379bb6a0dceff2b0dc99ed5456 (diff)
downloadbluez-f63c569f971ba9c6f028a9c8bf68be300efbba94.tar.gz
advertising: Query LE TX range at manager initialization
This patch calls the new MGMT command to get controller capabilities, and parses the min and max LE tx power range when the manager is initialized. This will be used to populate a client-facing dbus entry so that the client will know the advertising capabilities of the controller before registering an advertisement. This patch is tested by manually verifying the data is parsed correctly from the MGMT response.
Diffstat (limited to 'lib')
-rw-r--r--lib/mgmt.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/mgmt.h b/lib/mgmt.h
index 7ab4fb797..f37f7e654 100644
--- a/lib/mgmt.h
+++ b/lib/mgmt.h
@@ -599,10 +599,16 @@ struct mgmt_cp_set_blocked_keys {
struct mgmt_blocked_key_info keys[0];
} __packed;
-#define MGMT_OP_READ_SECURITY_INFO 0x0048
-struct mgmt_rp_read_security_info {
- uint16_t sec_len;
- uint8_t sec[0];
+#define MGMT_CAP_SEC_FLAGS 0x01
+#define MGMT_CAP_MAX_ENC_KEY_SIZE 0x02
+#define MGMT_CAP_SMP_MAX_ENC_KEY_SIZE 0x03
+#define MGMT_CAP_LE_TX_PWR 0x04
+
+#define MGMT_OP_READ_CONTROLLER_CAP 0x0048
+#define MGMT_READ_CONTROLLER_CAP_SIZE 0
+struct mgmt_rp_read_controller_cap {
+ uint16_t cap_len;
+ uint8_t cap[0];
} __packed;
#define MGMT_OP_READ_EXP_FEATURES_INFO 0x0049