summaryrefslogtreecommitdiff
path: root/lib/mgmt.h
diff options
context:
space:
mode:
authorJaganath Kanakkassery <jaganath.k.os@gmail.com>2018-06-14 17:51:17 +0530
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2018-06-18 17:21:03 +0300
commitdca915f54c1f969d977e9433d336bf3f6264632b (patch)
treea27d5104903623c20238833f59b786c664303584 /lib/mgmt.h
parente862f704eeff14818fcc00a57271bd6907285ad7 (diff)
downloadbluez-dca915f54c1f969d977e9433d336bf3f6264632b.tar.gz
btmgmt: Add PHY configuration get/set commands
Diffstat (limited to 'lib/mgmt.h')
-rw-r--r--lib/mgmt.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/mgmt.h b/lib/mgmt.h
index 798a05e48..7a25e170d 100644
--- a/lib/mgmt.h
+++ b/lib/mgmt.h
@@ -101,6 +101,7 @@ struct mgmt_rp_read_index_list {
#define MGMT_SETTING_PRIVACY 0x00002000
#define MGMT_SETTING_CONFIGURATION 0x00004000
#define MGMT_SETTING_STATIC_ADDRESS 0x00008000
+#define MGMT_SETTING_PHY_CONFIGURATION 0x00010000
#define MGMT_OP_READ_INFO 0x0004
struct mgmt_rp_read_info {
@@ -546,6 +547,30 @@ struct mgmt_cp_set_appearance {
uint16_t appearance;
} __packed;
+#define MGMT_OP_GET_PHY_CONFIGURATION 0x0044
+struct mgmt_rp_get_phy_confguration {
+ uint16_t supported_phys;
+ uint16_t selected_phys;
+} __packed;
+
+#define MGMT_PHY_LE_1M_TX 0x0001
+#define MGMT_PHY_LE_1M_RX 0x0002
+#define MGMT_PHY_LE_2M_TX 0x0004
+#define MGMT_PHY_LE_2M_RX 0x0008
+#define MGMT_PHY_LE_CODED_TX 0x0010
+#define MGMT_PHY_LE_CODED_RX 0x0020
+
+#define MGMT_PHY_LE_TX_MASK (MGMT_PHY_LE_1M_TX | MGMT_PHY_LE_2M_TX | \
+ MGMT_PHY_LE_CODED_TX)
+#define MGMT_PHY_LE_RX_MASK (MGMT_PHY_LE_1M_RX | MGMT_PHY_LE_2M_RX | \
+ MGMT_PHY_LE_CODED_RX)
+
+#define MGMT_OP_SET_PHY_CONFIGURATION 0x0045
+struct mgmt_cp_set_phy_confguration {
+ uint16_t default_phys;
+} __packed;
+
+
#define MGMT_EV_CMD_COMPLETE 0x0001
struct mgmt_ev_cmd_complete {
uint16_t opcode;
@@ -764,6 +789,11 @@ struct mgmt_ev_ext_info_changed {
uint8_t eir[0];
} __packed;
+#define MGMT_EV_PHY_CONFIGURATION_CHANGED 0x0026
+struct mgmt_ev_phy_configuration_changed {
+ uint16_t selected_phys;
+} __packed;
+
static const char *mgmt_op[] = {
"<0x0000>",
"Read Version",
@@ -833,6 +863,8 @@ static const char *mgmt_op[] = {
"Start Limited Discovery",
"Read Extended Controller Information",
"Set Appearance",
+ "Get PHY Configuration",
+ "Set PHY Configuration",
};
static const char *mgmt_ev[] = {
@@ -874,6 +906,7 @@ static const char *mgmt_ev[] = {
"Advertising Added",
"Advertising Removed",
"Extended Controller Information Changed",
+ "PHY Configuration Changed",
};
static const char *mgmt_status[] = {