Lines Matching refs:key
3159 struct link_key *key; in hci_conn_complete_evt() local
3162 key = hci_find_link_key(hdev, &ev->bdaddr); in hci_conn_complete_evt()
3163 if (key) { in hci_conn_complete_evt()
4577 struct link_key *key; in hci_link_key_request_evt() local
4586 key = hci_find_link_key(hdev, &ev->bdaddr); in hci_link_key_request_evt()
4587 if (!key) { in hci_link_key_request_evt()
4592 bt_dev_dbg(hdev, "found key type %u for %pMR", key->type, &ev->bdaddr); in hci_link_key_request_evt()
4598 if ((key->type == HCI_LK_UNAUTH_COMBINATION_P192 || in hci_link_key_request_evt()
4599 key->type == HCI_LK_UNAUTH_COMBINATION_P256) && in hci_link_key_request_evt()
4605 if (key->type == HCI_LK_COMBINATION && key->pin_len < 16 && in hci_link_key_request_evt()
4612 conn_set_key(conn, key->type, key->pin_len); in hci_link_key_request_evt()
4616 memcpy(cp.link_key, key->val, HCI_LINK_KEY_SIZE); in hci_link_key_request_evt()
4634 struct link_key *key; in hci_link_key_notify_evt() local
4665 key = hci_add_link_key(hdev, conn, &ev->bdaddr, ev->link_key, in hci_link_key_notify_evt()
4667 if (!key) in hci_link_key_notify_evt()
4674 conn_set_key(conn, key->type, key->pin_len); in hci_link_key_notify_evt()
4676 mgmt_new_link_key(hdev, key, persistent); in hci_link_key_notify_evt()
4683 if (key->type == HCI_LK_DEBUG_COMBINATION && in hci_link_key_notify_evt()
4685 list_del_rcu(&key->list); in hci_link_key_notify_evt()
4686 kfree_rcu(key, rcu); in hci_link_key_notify_evt()