[PATCH] mgmt:syncing configuration commands to the documentation.

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

 



This patch simply fixes the definition names (and corresponding
implemenation) to the adopted documentation.

---

 lib/mgmt.h    | 26 +++++++++++++++++++-------
 src/adapter.c | 16 ++++++++--------
 2 files changed, 27 insertions(+), 15 deletions(-)

diff --git a/lib/mgmt.h b/lib/mgmt.h
index 2f78d75bf..eb5dd862d 100644
--- a/lib/mgmt.h
+++ b/lib/mgmt.h
@@ -628,22 +628,34 @@ struct mgmt_rp_set_exp_feature {
 	uint32_t flags;
 } __packed;
 
-#define MGMT_OP_READ_DEFAULT_SYSTEM_PARAMETERS	0x004b
+#define MGMT_OP_READ_DEF_SYSTEM_CONFIG	0x004b
 
-struct mgmt_system_parameter_tlv {
+struct mgmt_tlv {
 	uint16_t type;
 	uint8_t  length;
 	uint8_t  value[];
 } __packed;
 
-struct mgmt_rp_read_default_system_parameters {
-	uint8_t  parameters[0]; /* mgmt_system_parameter_tlv */
+struct mgmt_rp_read_default_system_config {
+	uint8_t parameters[0]; /* mgmt_tlv */
 } __packed;
 
-#define MGMT_OP_SET_DEFAULT_SYSTEM_PARAMETERS	0x004c
+#define MGMT_OP_SET_DEF_SYSTEM_CONFIG	0x004c
 
-struct mgmt_cp_set_default_system_parameters {
-	uint8_t  parameters[0]; /* mgmt_system_parameter_tlv */
+struct mgmt_cp_set_default_system_config {
+	uint8_t parameters[0]; /* mgmt_tlv */
+} __packed;
+
+#define MGMT_OP_READ_DEF_RUNTIME_CONFIG	0x004d
+
+struct mgmt_rp_read_default_runtime_config {
+	uint8_t parameters[0]; /* mgmt_tlv */
+} __packed;
+
+#define MGMT_OP_SET_DEF_RUNTIME_CONFIG	0x004e
+
+struct mgmt_cp_set_default_runtime_config {
+	uint8_t parameters[0]; /* mgmt_tlv */
 } __packed;
 
 #define MGMT_EV_CMD_COMPLETE		0x0001
diff --git a/src/adapter.c b/src/adapter.c
index 64815ecd2..31b80b19d 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -120,7 +120,7 @@ static bool kernel_conn_control = false;
 
 static bool kernel_blocked_keys_supported = false;
 
-static bool kernel_set_system_params = false;
+static bool kernel_set_system_config = false;
 
 static GList *adapter_list = NULL;
 static unsigned int adapter_remaining = 0;
@@ -4171,7 +4171,7 @@ static void probe_devices(void *user_data)
 static void load_default_system_params(struct btd_adapter *adapter)
 {
 	struct {
-		struct mgmt_system_parameter_tlv entry;
+		struct mgmt_tlv entry;
 		union {
 			uint16_t u16;
 		};
@@ -4180,7 +4180,7 @@ static void load_default_system_params(struct btd_adapter *adapter)
 	size_t len = 0;
 	unsigned int err;
 
-	if (!main_opts.default_params.num_entries || !kernel_set_system_params)
+	if (!main_opts.default_params.num_entries || !kernel_set_system_config)
 		return;
 
 	params = malloc0(sizeof(*params) *
@@ -4414,11 +4414,11 @@ static void load_default_system_params(struct btd_adapter *adapter)
 		len += sizeof(params[i].u16);
 	}
 
-	err = mgmt_send(adapter->mgmt, MGMT_OP_SET_DEFAULT_SYSTEM_PARAMETERS,
+	err = mgmt_send(adapter->mgmt, MGMT_OP_SET_DEF_SYSTEM_CONFIG,
 			adapter->dev_id, len, params, NULL, NULL, NULL);
 	if (!err)
 		btd_error(adapter->dev_id,
-				"Failed to set default system params for hci%u",
+				"Failed to set default system config for hci%u",
 				adapter->dev_id);
 
 	free(params);
@@ -9426,9 +9426,9 @@ static void read_commands_complete(uint8_t status, uint16_t length,
 			DBG("kernel supports the set_blocked_keys op");
 			kernel_blocked_keys_supported = true;
 			break;
-		case MGMT_OP_SET_DEFAULT_SYSTEM_PARAMETERS:
-			DBG("kernel supports set system params");
-			kernel_set_system_params = true;
+		case MGMT_OP_SET_DEF_SYSTEM_CONFIG:
+			DBG("kernel supports set system confic");
+			kernel_set_system_config = true;
 			break;
 		default:
 			break;
-- 
2.27.0.290.gba653c62da-goog




[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