Lines Matching refs:ble

108   p_dev_rec->ble.ble_addr_type = addr_type;  in BTM_SecAddBleDevice()
110 p_dev_rec->ble.pseudo_addr = bd_addr; in BTM_SecAddBleDevice()
114 p_info->results.ble_addr_type = p_dev_rec->ble.ble_addr_type; in BTM_SecAddBleDevice()
328 *p_addr_type = p_dev_rec->ble.ble_addr_type; in BTM_ReadRemoteConnectionAddr()
492 oob.peer_oob_data.addr_rcvd_from.type = p_dev_rec->ble.ble_addr_type; in BTM_BleSecureConnectionOobDataReply()
605 p_dev_rec->ble.ble_addr_type = p_inq_info->results.ble_addr_type; in BTM_ReadDevInfo()
608 p_dev_rec->ble.pseudo_addr == remote_bda) { in BTM_ReadDevInfo()
610 *p_addr_type = p_dev_rec->ble.ble_addr_type; in BTM_ReadDevInfo()
611 } else if (p_dev_rec->ble.pseudo_addr == remote_bda) { in BTM_ReadDevInfo()
613 *p_addr_type = p_dev_rec->ble.ble_addr_type; in BTM_ReadDevInfo()
662 *remote_bda = p_dev_rec->ble.pseudo_addr; in BTM_ReadConnectedTransportAddress()
663 if (btm_bda_to_acl(p_dev_rec->ble.pseudo_addr, transport) != NULL) in BTM_ReadConnectedTransportAddress()
1202 p_dev_rec->ble.keys.local_counter++; in btm_ble_increment_sign_ctr()
1204 p_dev_rec->ble.keys.counter++; in btm_ble_increment_sign_ctr()
1206 is_local, p_dev_rec->ble.keys.local_counter, in btm_ble_increment_sign_ctr()
1207 p_dev_rec->ble.keys.counter); in btm_ble_increment_sign_ctr()
1228 *p_key_types = p_dev_rec->ble.key_type; in btm_ble_get_enc_key_type()
1250 if (p_dev_rec && p_dev_rec->ble.keys.div) { in btm_get_local_div()
1252 *p_div = p_dev_rec->ble.keys.div; in btm_get_local_div()
1290 p_rec->ble.keys.pltk = p_keys->penc_key.ltk; in btm_sec_save_le_key()
1291 memcpy(p_rec->ble.keys.rand, p_keys->penc_key.rand, BT_OCTET8_LEN); in btm_sec_save_le_key()
1292 p_rec->ble.keys.sec_level = p_keys->penc_key.sec_level; in btm_sec_save_le_key()
1293 p_rec->ble.keys.ediv = p_keys->penc_key.ediv; in btm_sec_save_le_key()
1294 p_rec->ble.keys.key_size = p_keys->penc_key.key_size; in btm_sec_save_le_key()
1295 p_rec->ble.key_type |= BTM_LE_KEY_PENC; in btm_sec_save_le_key()
1303 p_rec->ble.key_type, p_rec->sec_flags, p_rec->ble.keys.sec_level); in btm_sec_save_le_key()
1307 p_rec->ble.keys.irk = p_keys->pid_key.irk; in btm_sec_save_le_key()
1308 p_rec->ble.identity_addr = p_keys->pid_key.identity_addr; in btm_sec_save_le_key()
1309 p_rec->ble.identity_addr_type = p_keys->pid_key.identity_addr_type; in btm_sec_save_le_key()
1310 p_rec->ble.key_type |= BTM_LE_KEY_PID; in btm_sec_save_le_key()
1314 __func__, p_rec->ble.key_type, p_rec->bd_addr.ToString().c_str(), in btm_sec_save_le_key()
1324 p_rec->ble.keys.pcsrk = p_keys->pcsrk_key.csrk; in btm_sec_save_le_key()
1325 p_rec->ble.keys.srk_sec_level = p_keys->pcsrk_key.sec_level; in btm_sec_save_le_key()
1326 p_rec->ble.keys.counter = p_keys->pcsrk_key.counter; in btm_sec_save_le_key()
1327 p_rec->ble.key_type |= BTM_LE_KEY_PCSRK; in btm_sec_save_le_key()
1337 p_rec->ble.key_type, p_rec->sec_flags, in btm_sec_save_le_key()
1338 p_rec->ble.keys.srk_sec_level, p_rec->ble.keys.counter); in btm_sec_save_le_key()
1342 p_rec->ble.keys.lltk = p_keys->lenc_key.ltk; in btm_sec_save_le_key()
1343 p_rec->ble.keys.div = p_keys->lenc_key.div; /* update DIV */ in btm_sec_save_le_key()
1344 p_rec->ble.keys.sec_level = p_keys->lenc_key.sec_level; in btm_sec_save_le_key()
1345 p_rec->ble.keys.key_size = p_keys->lenc_key.key_size; in btm_sec_save_le_key()
1346 p_rec->ble.key_type |= BTM_LE_KEY_LENC; in btm_sec_save_le_key()
1351 p_rec->ble.key_type, p_rec->ble.keys.div, p_rec->ble.keys.key_size, in btm_sec_save_le_key()
1352 p_rec->ble.keys.sec_level); in btm_sec_save_le_key()
1356 p_rec->ble.keys.lcsrk = p_keys->lcsrk_key.csrk; in btm_sec_save_le_key()
1357 p_rec->ble.keys.div = p_keys->lcsrk_key.div; /* update DIV */ in btm_sec_save_le_key()
1358 p_rec->ble.keys.local_csrk_sec_level = p_keys->lcsrk_key.sec_level; in btm_sec_save_le_key()
1359 p_rec->ble.keys.local_counter = p_keys->lcsrk_key.counter; in btm_sec_save_le_key()
1360 p_rec->ble.key_type |= BTM_LE_KEY_LCSRK; in btm_sec_save_le_key()
1364 p_rec->ble.key_type, p_rec->ble.keys.div, in btm_sec_save_le_key()
1365 p_rec->ble.keys.local_csrk_sec_level, in btm_sec_save_le_key()
1366 p_rec->ble.keys.local_counter); in btm_sec_save_le_key()
1370 p_rec->ble.key_type |= BTM_LE_KEY_LID; in btm_sec_save_le_key()
1486 if (p_dev_rec->ble.key_type & BTM_LE_KEY_PENC) in btm_ble_link_sec_check()
1487 cur_sec_level = p_dev_rec->ble.keys.sec_level; in btm_ble_link_sec_check()
1635 } else if (p_rec->ble.key_type & BTM_LE_KEY_PENC) { in btm_ble_start_encrypt()
1636 btsnd_hcic_ble_start_enc(p_rec->ble_hci_handle, p_rec->ble.keys.rand, in btm_ble_start_encrypt()
1637 p_rec->ble.keys.ediv, p_rec->ble.keys.pltk); in btm_ble_start_encrypt()
1679 p_dev_rec->enc_key_size = p_dev_rec->ble.keys.key_size; in btm_ble_link_encrypted()
1691 gatt_notify_enc_cmpl(p_dev_rec->ble.pseudo_addr); in btm_ble_link_encrypted()
1717 p_cb->key_size = p_rec->ble.keys.key_size; in btm_ble_ltk_request_reply()
1719 BTM_TRACE_ERROR("key size = %d", p_rec->ble.keys.key_size); in btm_ble_ltk_request_reply()
1724 if (p_rec->ble.key_type & BTM_LE_KEY_LENC) in btm_ble_ltk_request_reply()
1725 btsnd_hcic_ble_ltk_req_reply(btm_cb.enc_handle, p_rec->ble.keys.lltk); in btm_ble_ltk_request_reply()
1883 p_dev_rec->ble.ble_addr_type = addr_type; in btm_ble_connected()
1885 p_dev_rec->ble.pseudo_addr = bda; in btm_ble_connected()
1891 if (!addr_matched) p_dev_rec->ble.active_addr_type = BTM_BLE_ADDR_PSEUDO; in btm_ble_connected()
1893 if (p_dev_rec->ble.ble_addr_type == BLE_ADDR_RANDOM && !addr_matched) in btm_ble_connected()
1894 p_dev_rec->ble.cur_rand_addr = bda; in btm_ble_connected()
2075 UINT32_TO_STREAM(pp, p_rec->ble.keys.local_counter); in BTM_BleDataSignature()
2076 UINT32_TO_STREAM(p_mac, p_rec->ble.keys.local_counter); in BTM_BleDataSignature()
2078 crypto_toolbox::aes_cmac(p_rec->ble.keys.lcsrk, p_buf, (uint16_t)(len + 4), in BTM_BleDataSignature()
2120 if (p_rec == NULL || (p_rec && !(p_rec->ble.key_type & BTM_LE_KEY_PCSRK))) { in BTM_BleVerifySignature()
2122 } else if (counter < p_rec->ble.keys.counter) { in BTM_BleVerifySignature()
2128 p_rec->ble.keys.counter); in BTM_BleVerifySignature()
2130 crypto_toolbox::aes_cmac(p_rec->ble.keys.pcsrk, p_orig, len, in BTM_BleVerifySignature()