Lines Matching refs:p_dev_rec

44 static void btm_process_remote_ext_features_page (tACL_CONN *p_acl_cb, tBTM_SEC_DEV_REC *p_dev_rec,
148 tBTM_SEC_DEV_REC *p_dev_rec = NULL;
213 p_dev_rec = btm_find_dev_by_handle (hci_handle);
216 if (p_dev_rec )
218 BTM_TRACE_DEBUG1 ("device_type=0x%x", p_dev_rec->device_type);
222 if (p_dev_rec && !is_le_link)
225 if ((p_dev_rec->num_read_pages) &&
226 (p_dev_rec->num_read_pages <= (HCI_EXT_FEATURES_PAGE_MAX + 1)) /* sanity check */)
228 memcpy (p->peer_lmp_features, p_dev_rec->features,
229 (HCI_FEATURE_BYTES_PER_PAGE * p_dev_rec->num_read_pages));
230 p->num_read_pages = p_dev_rec->num_read_pages;
233 && HCI_SSP_HOST_SUPPORTED(p_dev_rec->features[HCI_EXT_FEATURES_PAGE_1])
234 && HCI_SIMPLE_PAIRING_SUPPORTED(p_dev_rec->features[HCI_EXT_FEATURES_PAGE_0]))
236 p_dev_rec->sm4 = BTM_SM4_TRUE;
240 p_dev_rec->sm4 |= BTM_SM4_KNOWN;
250 if (p_dev_rec && is_le_link)
315 tBTM_SEC_DEV_REC *p_dev_rec=NULL;
357 p_dev_rec = btm_find_dev(bda);
358 if ( p_dev_rec)
360 BTM_TRACE_DEBUG1("before update p_dev_rec->sec_flags=0x%x", p_dev_rec->sec_flags);
364 p_dev_rec->sec_flags &= ~(BTM_SEC_ENCRYPTED | BTM_SEC_ROLE_SWITCHED);
365 if ( (p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_KNOWN) == 0)
368 p_dev_rec->sec_flags &= ~(BTM_SEC_AUTHENTICATED | BTM_SEC_LINK_KEY_AUTHED);
378 p_dev_rec->sec_flags &= ~(BTM_SEC_AUTHORIZED | BTM_SEC_AUTHENTICATED
381 BTM_TRACE_DEBUG1("after update p_dev_rec->sec_flags=0x%x", p_dev_rec->sec_flags);
546 tBTM_SEC_DEV_REC *p_dev_rec = NULL;
636 p_dev_rec = btm_find_dev (remote_bd_addr);
637 if ((p_dev_rec != NULL)
638 && ((p_dev_rec->sec_flags & BTM_SEC_ENCRYPTED) != 0)
660 if (p_dev_rec)
661 p_dev_rec->rs_disc_pending = BTM_SEC_RS_PENDING;
695 tBTM_SEC_DEV_REC *p_dev_rec = NULL;
743 else if (((p_dev_rec = btm_find_dev (remote_bd_addr)) != NULL)
744 && ((p_dev_rec->sec_flags & BTM_SEC_ENCRYPTED) != 0) && !BTM_EPR_AVAILABLE(p))
852 tBTM_SEC_DEV_REC *p_dev_rec;
890 if ((p_dev_rec = btm_find_dev (p->remote_addr)) != NULL)
891 p_dev_rec->rs_disc_pending = BTM_SEC_RS_PENDING;
920 if ((p_dev_rec = btm_find_dev (p->remote_addr)) != NULL)
922 if (p_dev_rec->rs_disc_pending == BTM_SEC_DISC_PENDING)
925 btsnd_hcic_disconnect(p_dev_rec->hci_handle, HCI_ERR_PEER_USER);
928 (UINT32)p_dev_rec, p_dev_rec->rs_disc_pending);
929 p_dev_rec->rs_disc_pending = BTM_SEC_RS_NOT_PENDING; /* reset flag */
1214 tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev_by_handle (handle);
1220 if (p_dev_rec == NULL)
1223 p_dev_rec = btm_find_or_alloc_dev (p_acl_cb->remote_addr);
1227 p_dev_rec->num_read_pages = num_read_pages;
1232 btm_process_remote_ext_features_page (p_acl_cb, p_dev_rec, page_idx);
1247 void btm_process_remote_ext_features_page (tACL_CONN *p_acl_cb, tBTM_SEC_DEV_REC *p_dev_rec,
1255 memcpy (p_dev_rec->features[page_idx], p_acl_cb->peer_lmp_features[page_idx],
1264 !HCI_SIMPLE_PAIRING_SUPPORTED(p_dev_rec->features[HCI_EXT_FEATURES_PAGE_0]))
1266 req_pend = (p_dev_rec->sm4 & BTM_SM4_REQ_PEND);
1267 p_dev_rec->sm4 = BTM_SM4_KNOWN;
1270 l2cu_resubmit_pending_sec_req (p_dev_rec->bd_addr);
1278 req_pend = (p_dev_rec->sm4 & BTM_SM4_REQ_PEND);
1281 && HCI_SSP_HOST_SUPPORTED(p_dev_rec->features[HCI_EXT_FEATURES_PAGE_1])
1282 && HCI_SIMPLE_PAIRING_SUPPORTED(p_dev_rec->features[HCI_EXT_FEATURES_PAGE_0]))
1284 p_dev_rec->sm4 = BTM_SM4_TRUE;
1288 p_dev_rec->sm4 = BTM_SM4_KNOWN;
1292 HCI_EXT_FEATURES_PAGE_1, *(p_dev_rec->features[HCI_EXT_FEATURES_PAGE_1]),
1293 p_dev_rec->sm4, req_pend);
1296 l2cu_resubmit_pending_sec_req (p_dev_rec->bd_addr);
2173 tBTM_SEC_DEV_REC *p_dev_rec;
2262 if ((p_dev_rec = btm_find_dev (p_bda)) != NULL)
2264 if (p_dev_rec->rs_disc_pending == BTM_SEC_DISC_PENDING)
2267 btsnd_hcic_disconnect(p_dev_rec->hci_handle, HCI_ERR_PEER_USER);
2270 (UINT32)p_dev_rec, p_dev_rec->rs_disc_pending);
2271 p_dev_rec->rs_disc_pending = BTM_SEC_RS_NOT_PENDING; /* reset flag */
3085 tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bd_addr);
3088 if (p_dev_rec && (p_dev_rec->rs_disc_pending == BTM_SEC_RS_PENDING))
3090 p_dev_rec->rs_disc_pending = BTM_SEC_DISC_PENDING;
3138 void btm_cont_rswitch_or_chglinkkey (tACL_CONN *p, tBTM_SEC_DEV_REC *p_dev_rec,
3151 if (p_dev_rec != NULL && ((p_dev_rec->sec_flags & BTM_SEC_ENCRYPTED) != 0)
3180 if (p_dev_rec)
3181 p_dev_rec->rs_disc_pending = BTM_SEC_RS_PENDING;
3221 tBTM_SEC_DEV_REC *p_dev_rec;
3235 p_dev_rec = btm_find_or_alloc_dev (bda);
3237 memcpy (btm_cb.connecting_bda, p_dev_rec->bd_addr, BD_ADDR_LEN);
3238 memcpy (btm_cb.connecting_dc, p_dev_rec->dev_class, DEV_CLASS_LEN);
3286 tBTM_SEC_DEV_REC *p_dev_rec;
3312 p_dev_rec = btm_find_or_alloc_dev (bda);
3313 memcpy (btm_cb.connecting_bda, p_dev_rec->bd_addr, BD_ADDR_LEN);
3314 memcpy (btm_cb.connecting_dc, p_dev_rec->dev_class, DEV_CLASS_LEN);