Lines Matching refs:evt

422 	struct bt_hci_evt_pin_code_req *evt = (void *)buf->data;  in bt_hci_pin_code_req()  local
427 conn = bt_conn_lookup_addr_br(&evt->bdaddr); in bt_hci_pin_code_req()
429 LOG_ERR("Can't find conn for %s", bt_addr_str(&evt->bdaddr)); in bt_hci_pin_code_req()
439 struct bt_hci_evt_link_key_notify *evt = (void *)buf->data; in bt_hci_link_key_notify() local
442 conn = bt_conn_lookup_addr_br(&evt->bdaddr); in bt_hci_link_key_notify()
444 LOG_ERR("Can't find conn for %s", bt_addr_str(&evt->bdaddr)); in bt_hci_link_key_notify()
448 LOG_DBG("%s, link type 0x%02x", bt_addr_str(&evt->bdaddr), evt->key_type); in bt_hci_link_key_notify()
450 if (IS_ENABLED(CONFIG_BT_SMP_SC_ONLY) && (evt->key_type != BT_LK_AUTH_COMBINATION_P256)) { in bt_hci_link_key_notify()
468 conn->br.link_key = bt_keys_get_link_key(&evt->bdaddr); in bt_hci_link_key_notify()
471 LOG_ERR("Can't update keys for %s", bt_addr_str(&evt->bdaddr)); in bt_hci_link_key_notify()
479 switch (evt->key_type) { in bt_hci_link_key_notify()
489 memcpy(conn->br.link_key->val, evt->link_key, 16); in bt_hci_link_key_notify()
495 memcpy(conn->br.link_key->val, evt->link_key, 16); in bt_hci_link_key_notify()
503 memcpy(conn->br.link_key->val, evt->link_key, 16); in bt_hci_link_key_notify()
506 LOG_WRN("Unsupported Link Key type %u", evt->key_type); in bt_hci_link_key_notify()
559 struct bt_hci_evt_link_key_req *evt = (void *)buf->data; in bt_hci_link_key_req() local
562 LOG_DBG("%s", bt_addr_str(&evt->bdaddr)); in bt_hci_link_key_req()
564 conn = bt_conn_lookup_addr_br(&evt->bdaddr); in bt_hci_link_key_req()
566 LOG_ERR("Can't find conn for %s", bt_addr_str(&evt->bdaddr)); in bt_hci_link_key_req()
567 link_key_neg_reply(&evt->bdaddr); in bt_hci_link_key_req()
572 conn->br.link_key = bt_keys_find_link_key(&evt->bdaddr); in bt_hci_link_key_req()
576 link_key_neg_reply(&evt->bdaddr); in bt_hci_link_key_req()
587 link_key_neg_reply(&evt->bdaddr); in bt_hci_link_key_req()
592 link_key_reply(&evt->bdaddr, conn->br.link_key->val); in bt_hci_link_key_req()
616 struct bt_hci_evt_io_capa_resp *evt = (void *)buf->data; in bt_hci_io_capa_resp() local
619 LOG_DBG("remote %s, IOcapa 0x%02x, auth 0x%02x", bt_addr_str(&evt->bdaddr), evt->capability, in bt_hci_io_capa_resp()
620 evt->authentication); in bt_hci_io_capa_resp()
622 if (evt->authentication > BT_HCI_GENERAL_BONDING_MITM) { in bt_hci_io_capa_resp()
624 io_capa_neg_reply(&evt->bdaddr, in bt_hci_io_capa_resp()
629 if (evt->capability > BT_IO_NO_INPUT_OUTPUT) { in bt_hci_io_capa_resp()
631 io_capa_neg_reply(&evt->bdaddr, in bt_hci_io_capa_resp()
636 conn = bt_conn_lookup_addr_br(&evt->bdaddr); in bt_hci_io_capa_resp()
638 LOG_ERR("Unable to find conn for %s", bt_addr_str(&evt->bdaddr)); in bt_hci_io_capa_resp()
642 conn->br.remote_io_capa = evt->capability; in bt_hci_io_capa_resp()
643 conn->br.remote_auth = evt->authentication; in bt_hci_io_capa_resp()
656 struct bt_hci_evt_io_capa_req *evt = (void *)buf->data; in bt_hci_io_capa_req() local
664 conn = bt_conn_lookup_addr_br(&evt->bdaddr); in bt_hci_io_capa_req()
666 LOG_ERR("Can't find conn for %s", bt_addr_str(&evt->bdaddr)); in bt_hci_io_capa_req()
676 io_capa_neg_reply(&evt->bdaddr, in bt_hci_io_capa_req()
726 bt_addr_copy(&cp->bdaddr, &evt->bdaddr); in bt_hci_io_capa_req()
736 struct bt_hci_evt_ssp_complete *evt = (void *)buf->data; in bt_hci_ssp_complete() local
739 LOG_DBG("status 0x%02x", evt->status); in bt_hci_ssp_complete()
741 conn = bt_conn_lookup_addr_br(&evt->bdaddr); in bt_hci_ssp_complete()
743 LOG_ERR("Can't find conn for %s", bt_addr_str(&evt->bdaddr)); in bt_hci_ssp_complete()
752 ssp_pairing_complete(conn, bt_security_err_get(evt->status)); in bt_hci_ssp_complete()
753 if (evt->status) { in bt_hci_ssp_complete()
762 struct bt_hci_evt_user_confirm_req *evt = (void *)buf->data; in bt_hci_user_confirm_req() local
765 conn = bt_conn_lookup_addr_br(&evt->bdaddr); in bt_hci_user_confirm_req()
767 LOG_ERR("Can't find conn for %s", bt_addr_str(&evt->bdaddr)); in bt_hci_user_confirm_req()
771 ssp_auth(conn, sys_le32_to_cpu(evt->passkey)); in bt_hci_user_confirm_req()
777 struct bt_hci_evt_user_passkey_notify *evt = (void *)buf->data; in bt_hci_user_passkey_notify() local
782 conn = bt_conn_lookup_addr_br(&evt->bdaddr); in bt_hci_user_passkey_notify()
784 LOG_ERR("Can't find conn for %s", bt_addr_str(&evt->bdaddr)); in bt_hci_user_passkey_notify()
788 ssp_auth(conn, sys_le32_to_cpu(evt->passkey)); in bt_hci_user_passkey_notify()
794 struct bt_hci_evt_user_passkey_req *evt = (void *)buf->data; in bt_hci_user_passkey_req() local
797 conn = bt_conn_lookup_addr_br(&evt->bdaddr); in bt_hci_user_passkey_req()
799 LOG_ERR("Can't find conn for %s", bt_addr_str(&evt->bdaddr)); in bt_hci_user_passkey_req()
829 struct bt_hci_evt_auth_complete *evt = (void *)buf->data; in bt_hci_auth_complete() local
831 uint16_t handle = sys_le16_to_cpu(evt->handle); in bt_hci_auth_complete()
833 LOG_DBG("status 0x%02x, handle %u", evt->status, handle); in bt_hci_auth_complete()
841 if (evt->status) { in bt_hci_auth_complete()
846 bt_conn_security_changed(conn, evt->status, in bt_hci_auth_complete()
847 bt_security_err_get(evt->status)); in bt_hci_auth_complete()