Lines Matching full:key

1 /* keys_br.c - Bluetooth BR/EDR key handling */
38 struct bt_keys_link_key *key; in bt_keys_find_link_key() local
44 key = &key_pool[i]; in bt_keys_find_link_key()
46 if (bt_addr_eq(&key->addr, addr)) { in bt_keys_find_link_key()
47 return key; in bt_keys_find_link_key()
56 struct bt_keys_link_key *key; in bt_keys_get_link_key() local
58 key = bt_keys_find_link_key(addr); in bt_keys_get_link_key()
59 if (key) { in bt_keys_get_link_key()
60 return key; in bt_keys_get_link_key()
63 key = bt_keys_find_link_key(BT_ADDR_ANY); in bt_keys_get_link_key()
65 if (!key) { in bt_keys_get_link_key()
68 key = &key_pool[0]; in bt_keys_get_link_key()
72 if (current->aging_counter < key->aging_counter) { in bt_keys_get_link_key()
73 key = current; in bt_keys_get_link_key()
77 if (key) { in bt_keys_get_link_key()
78 bt_keys_link_key_clear(key); in bt_keys_get_link_key()
83 if (key) { in bt_keys_get_link_key()
84 bt_addr_copy(&key->addr, addr); in bt_keys_get_link_key()
86 key->aging_counter = ++aging_counter_val; in bt_keys_get_link_key()
87 last_keys_updated = key; in bt_keys_get_link_key()
89 LOG_DBG("created %p for %s", key, bt_addr_str(addr)); in bt_keys_get_link_key()
90 return key; in bt_keys_get_link_key()
116 struct bt_keys_link_key *key; in bt_keys_link_key_clear_addr() local
120 key = &key_pool[i]; in bt_keys_link_key_clear_addr()
121 bt_keys_link_key_clear(key); in bt_keys_link_key_clear_addr()
126 key = bt_keys_find_link_key(addr); in bt_keys_link_key_clear_addr()
127 if (key) { in bt_keys_link_key_clear_addr()
128 bt_keys_link_key_clear(key); in bt_keys_link_key_clear_addr()
144 LOG_ERR("Failed to save link key (err %d)", err); in bt_keys_link_key_store()
192 LOG_DBG("Successfully restored link key for %s", bt_addr_le_str(&le_addr)); in link_key_set()