@@ -2276,7 +2276,7 @@ static void new_long_term_key_event(uint16_t index, uint16_t length,
ediv = le16_to_cpu(key->ediv);
rand = le64_to_cpu(key->rand);
- store_ltk(&key->addr.bdaddr, key->addr.type, key->master,
+ store_ltk(&key->addr.bdaddr, key->addr.type, key->central,
key->val, key->type, key->enc_size, ediv, rand);
}
@@ -3097,7 +3097,7 @@ static struct mgmt_ltk_info *get_ltk_info(GKeyFile *key_file, const char *peer,
info->ediv = g_key_file_get_integer(key_file, peer, ediv_s, NULL);
info->ediv = cpu_to_le16(info->ediv);
- info->master = master;
+ info->central = master;
failed:
g_free(key);
@@ -179,7 +179,7 @@ struct mgmt_cp_load_link_keys {
struct mgmt_ltk_info {
struct mgmt_addr_info addr;
uint8_t type;
- uint8_t master;
+ uint8_t central;
uint8_t enc_size;
uint16_t ediv;
uint64_t rand;
@@ -308,13 +308,13 @@ static void mgmt_new_long_term_key(uint16_t len, const void *buf)
/* LE SC keys are both for master and slave */
switch (ev->key.type) {
case 0x00:
- if (ev->key.master)
+ if (ev->key.central)
type = "Master (Unauthenticated)";
else
type = "Slave (Unauthenticated)";
break;
case 0x01:
- if (ev->key.master)
+ if (ev->key.central)
type = "Master (Authenticated)";
else
type = "Slave (Authenticated)";
@@ -4028,7 +4028,7 @@ static void load_ltks(struct btd_adapter *adapter, GSList *keys)
key->rand = cpu_to_le64(info->rand);
key->ediv = cpu_to_le16(info->ediv);
key->type = info->authenticated;
- key->master = info->master;
+ key->central = info->master;
key->enc_size = info->enc_size;
}
@@ -8145,7 +8145,7 @@ static void new_long_term_key_callback(uint16_t index, uint16_t length,
rand = le64_to_cpu(key->rand);
store_longtermkey(adapter, &key->addr.bdaddr,
- key->addr.type, key->val, key->master,
+ key->addr.type, key->val, key->central,
key->type, key->enc_size, ediv, rand);
device_set_bonded(device, addr->type);
@@ -133,13 +133,13 @@ static void new_long_term_key_event(uint16_t index, uint16_t len,
switch (ev->key.type) {
case 0x00:
- if (ev->key.master)
+ if (ev->key.central)
type = "Unauthenticated, Master";
else
type = "Unauthenticated, Slave";
break;
case 0x01:
- if (ev->key.master)
+ if (ev->key.central)
type = "Authenticated, Master";
else
type = "Authenticated, Slave";
From: Archie Pusaka <apusaka@chromium.org> "central" is preferred, as reflected in the BT core spec 5.3. --- android/bluetooth.c | 4 ++-- lib/mgmt.h | 2 +- monitor/control.c | 4 ++-- src/adapter.c | 4 ++-- tools/oobtest.c | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-)