Lines Matching defs:p_dev
165 tHID_HOST_DEV_CTB *p_dev= (tHID_HOST_DEV_CTB *) p_ref_data;
167 if( res == BTM_SUCCESS && p_dev->conn.conn_state == HID_CONN_STATE_SECURITY )
169 p_dev->conn.disc_reason = HID_SUCCESS; /* Authentication passed. Reset disc_reason (from HID_ERR_AUTH_FAILED) */
171 p_dev->conn.conn_state = HID_CONN_STATE_CONNECTING_INTR;
174 L2CA_ConnectRsp (p_dev->addr, p_dev->conn.ctrl_id, p_dev->conn.ctrl_cid, L2CAP_CONN_OK, L2CAP_CONN_OK);
177 L2CA_ConfigReq (p_dev->conn.ctrl_cid, &hh_cb.l2cap_cfg);
183 p_dev->conn.disc_reason = HID_ERR_AUTH_FAILED; /* Save reason for disconnecting */
184 p_dev->conn.conn_state = HID_CONN_STATE_UNUSED;
185 L2CA_ConnectRsp (p_dev->addr, p_dev->conn.ctrl_id, p_dev->conn.ctrl_cid, L2CAP_CONN_SECURITY_BLOCK, L2CAP_CONN_OK);
205 tHID_HOST_DEV_CTB *p_dev;
222 p_dev = &hh_cb.devices[i];
266 if(btm_sec_mx_access_request (p_dev->addr, HID_PSM_CONTROL,
268 (p_dev->attr_mask & HID_SEC_REQUIRED) ? HID_SEC_CHN : HID_NOSEC_CHN,
269 &hidh_sec_check_complete_term, p_dev) == BTM_CMD_STARTED)
318 tHID_HOST_DEV_CTB *p_dev = (tHID_HOST_DEV_CTB *) p_ref_data;
325 dhandle = ((UINT32)p_dev - (UINT32)&(hh_cb.devices[0]))/ sizeof(tHID_HOST_DEV_CTB);
326 if( res == BTM_SUCCESS && p_dev->conn.conn_state == HID_CONN_STATE_SECURITY )
329 p_dev->conn.disc_reason = HID_SUCCESS; /* Authentication passed. Reset disc_reason (from HID_ERR_AUTH_FAILED) */
332 if ((p_dev->conn.intr_cid = L2CA_ConnectReq (HID_PSM_INTERRUPT, hh_cb.devices[dhandle].addr)) == 0)
343 p_dev->conn.conn_state = HID_CONN_STATE_CONNECTING_INTR;
347 if( res != BTM_SUCCESS && p_dev->conn.conn_state == HID_CONN_STATE_SECURITY )
352 if( p_dev->conn_tries <= HID_HOST_MAX_CONN_RETRY )
361 p_dev->conn.disc_reason = HID_ERR_AUTH_FAILED; /* Save reason for disconnecting */
383 tHID_HOST_DEV_CTB *p_dev = NULL;
388 p_dev = &hh_cb.devices[dhandle];
432 btm_sec_mx_access_request (p_dev->addr, HID_PSM_CONTROL,
434 (p_dev->attr_mask & HID_SEC_REQUIRED) ? HID_SEC_CHN : HID_NOSEC_CHN,
435 &hidh_sec_check_complete_orig, p_dev);
463 tHID_HOST_DEV_CTB *p_dev;
468 p_dev = &hh_cb.devices[dhandle];
955 tHID_HOST_DEV_CTB *p_dev = &hh_cb.devices[dhandle];
957 if( p_dev->conn.conn_state != HID_CONN_STATE_UNUSED )
960 p_dev->conn.ctrl_cid = 0;
961 p_dev->conn.intr_cid = 0;
962 p_dev->conn.disc_reason = HID_L2CAP_CONN_FAIL; /* Reset initial reason for CLOSE_EVT: Connection Attempt was made but failed */
965 p_dev->conn.conn_flags = HID_CONN_FLAGS_IS_ORIG;
967 if(p_dev->attr_mask & HID_SEC_REQUIRED)
972 BTM_SetOutService (p_dev->addr, service_id, mx_chan_id);
975 if ((p_dev->conn.ctrl_cid = L2CA_ConnectReq (HID_PSM_CONTROL, p_dev->addr)) == 0)
983 p_dev->conn.conn_state = HID_CONN_STATE_CONNECTING_CTRL;
1030 tHID_HOST_DEV_CTB *p_dev = &hh_cb.devices[dhandle];
1032 p_dev->conn.conn_state = HID_CONN_STATE_UNUSED;
1033 p_dev->conn.timer_entry.param = (UINT32) dhandle;
1035 btu_start_timer (&(p_dev->conn.timer_entry), BTU_TTYPE_HID_HOST_REPAGE_TO, HID_HOST_REPAGE_WIN);
1037 hidh_proc_repage_timeout( &(p_dev->conn.timer_entry) );