Lines Matching defs:p_dev
671 tBTA_DM_API_REMOVE_DEVICE *p_dev = &p_data->remove_dev;
675 if (BTM_IsAclConnectionUp(p_dev->bd_addr))
678 btm_remove_acl( p_dev->bd_addr) ;
682 if(!bdcmp( bta_dm_cb.device_list.peer_device[i].peer_bdaddr, p_dev->bd_addr))
693 BTM_SecDeleteDevice(p_dev->bd_addr);
696 bdcpy(sec_event.link_down.bd_addr, p_dev->bd_addr);
715 tBTA_DM_API_ADD_DEVICE *p_dev = &p_data->add_dev;
725 if (p_dev->dc_known)
726 p_dc = (UINT8 *)p_dev->dc;
728 if (p_dev->link_key_known)
729 p_lc = (UINT8 *)p_dev->link_key;
731 if (p_dev->is_trusted)
734 while (p_dev->tm && (index < BTA_MAX_SERVICE_ID))
736 if (p_dev->tm & (UINT32)(1<<index))
742 p_dev->tm &= (UINT32)(~(1<<index));
749 if (!BTM_SecAddDevice (p_dev->bd_addr, p_dc, p_dev->bd_name, p_dev->features,
750 trusted_services_mask, p_lc, p_dev->key_type, p_dev->io_cap))
753 (p_dev->bd_addr[0]<<24)+(p_dev->bd_addr[1]<<16)+(p_dev->bd_addr[2]<<8)+p_dev->bd_addr[3],
754 (p_dev->bd_addr[4]<<8)+p_dev->bd_addr[5]);
936 tBTA_DM_PEER_DEVICE *p_dev;
938 p_dev = bta_dm_find_peer_device(p_data->link_policy.bd_addr);
939 if(!p_dev)
947 p_dev->link_policy |= p_data->link_policy.policy_mask;
948 BTM_SetLinkPolicy(p_dev->peer_bdaddr, &(p_dev->link_policy));
953 p_dev->link_policy &= (~p_data->link_policy.policy_mask);
954 BTM_SetLinkPolicy(p_dev->peer_bdaddr, &(p_dev->link_policy));
959 bta_dm_pm_active(p_dev->peer_bdaddr);
975 tBTA_DM_PEER_DEVICE *p_dev = NULL;
980 p_dev = bta_dm_find_peer_device(peer_addr);
987 if(!p_dev)
990 p_dev->link_policy |= policy;
991 BTM_SetLinkPolicy(p_dev->peer_bdaddr, &(p_dev->link_policy));
995 if(!p_dev)
998 p_dev->link_policy &= (~policy);
999 BTM_SetLinkPolicy(p_dev->peer_bdaddr, &(p_dev->link_policy));
1004 bta_dm_pm_active(p_dev->peer_bdaddr);
3297 tBTA_DM_PEER_DEVICE *p_dev;
3304 p_dev = &bta_dm_cb.device_list.peer_device[i];
3305 APPL_TRACE_WARNING3("[%d]: state:%d, info:x%x", i, p_dev->conn_state, p_dev->info);
3306 if((p_dev->conn_state == BTA_DM_CONNECTED) && (p_dev->info & BTA_DM_DI_AV_ACTIVE))
3309 if(BTM_CMD_STARTED == BTM_SwitchRole (p_dev->peer_bdaddr, HCI_ROLE_MASTER, (tBTM_CMPL_CB *)bta_dm_rs_cback))
3316 bta_dm_policy_cback(BTA_SYS_PLCY_CLR, 0, HCI_ENABLE_MASTER_SLAVE_SWITCH, p_dev->peer_bdaddr);
3346 tBTA_DM_PEER_DEVICE *p_dev;
3360 p_dev = bta_dm_find_peer_device(p_bda);
3361 if(p_dev)
3364 p_dev->info, p_data->acl_change.new_role, bta_dm_cb.device_list.count);
3365 if(p_dev->info & BTA_DM_DI_AV_ACTIVE)
3384 bta_dm_policy_cback(BTA_SYS_PLCY_CLR, 0, HCI_ENABLE_MASTER_SLAVE_SWITCH, p_dev->peer_bdaddr);
3613 tBTA_DM_PEER_DEVICE *p_dev;
3615 p_dev = bta_dm_find_peer_device(peer_addr);
3618 if(p_dev)
3624 if (p_dev->conn_state != BTA_DM_UNPAIRING)
3625 p_dev->conn_state = BTA_DM_CONNECTED;
3634 if(role > p_dev->pref_role )
3635 p_dev->pref_role = role;
3648 if(p_dev)
3649 p_dev->info |= BTA_DM_DI_AV_ACTIVE;
3656 if(p_dev)
3657 p_dev->info &= ~BTA_DM_DI_AV_ACTIVE;