Lines Matching full:p_dev
173 tHID_HOST_DEV_CTB *p_dev= (tHID_HOST_DEV_CTB *) p_ref_data;
177 if( res == BTM_SUCCESS && p_dev->conn.conn_state == HID_CONN_STATE_SECURITY )
179 p_dev->conn.disc_reason = HID_SUCCESS; /* Authentication passed. Reset disc_reason (from HID_ERR_AUTH_FAILED) */
181 p_dev->conn.conn_state = HID_CONN_STATE_CONNECTING_INTR;
184 L2CA_ConnectRsp (p_dev->addr, p_dev->conn.ctrl_id, p_dev->conn.ctrl_cid, L2CAP_CONN_OK, L2CAP_CONN_OK);
187 L2CA_ConfigReq (p_dev->conn.ctrl_cid, &hh_cb.l2cap_cfg);
193 p_dev->conn.disc_reason = HID_ERR_AUTH_FAILED; /* Save reason for disconnecting */
194 p_dev->conn.conn_state = HID_CONN_STATE_UNUSED;
195 L2CA_ConnectRsp (p_dev->addr, p_dev->conn.ctrl_id, p_dev->conn.ctrl_cid, L2CAP_CONN_SECURITY_BLOCK, L2CAP_CONN_OK);
215 tHID_HOST_DEV_CTB *p_dev;
227 p_dev = &hh_cb.devices[i];
273 if(btm_sec_mx_access_request (p_dev->addr, HID_PSM_CONTROL,
275 (p_dev->attr_mask & HID_SEC_REQUIRED) ? HID_SEC_CHN : HID_NOSEC_CHN,
276 &hidh_sec_check_complete_term, p_dev) == BTM_CMD_STARTED)
338 tHID_HOST_DEV_CTB *p_dev = (tHID_HOST_DEV_CTB *) p_ref_data;
344 // too dirty and unnecessary. Why can't |p_dev| store it's handle?
345 dhandle = (PTR_TO_UINT(p_dev) - PTR_TO_UINT(&(hh_cb.devices[0])))/ sizeof(tHID_HOST_DEV_CTB);
346 if( res == BTM_SUCCESS && p_dev->conn.conn_state == HID_CONN_STATE_SECURITY )
349 p_dev->conn.disc_reason = HID_SUCCESS; /* Authentication passed. Reset disc_reason (from HID_ERR_AUTH_FAILED) */
352 p_dev->conn.conn_state = HID_CONN_STATE_CONFIG;
353 L2CA_ConfigReq (p_dev->conn.ctrl_cid, &hh_cb.l2cap_cfg);
354 HIDH_TRACE_EVENT ("HID-Host Got Control conn cnf, sent cfg req, CID: 0x%x", p_dev->conn.ctrl_cid);
358 if( res != BTM_SUCCESS && p_dev->conn.conn_state == HID_CONN_STATE_SECURITY )
363 if( p_dev->conn_tries <= HID_HOST_MAX_CONN_RETRY )
370 p_dev->conn.disc_reason = HID_ERR_AUTH_FAILED; /* Save reason for disconnecting */
392 tHID_HOST_DEV_CTB *p_dev = NULL;
397 p_dev = &hh_cb.devices[dhandle];
442 btm_sec_mx_access_request (p_dev->addr, HID_PSM_CONTROL,
444 (p_dev->attr_mask & HID_SEC_REQUIRED) ? HID_SEC_CHN : HID_NOSEC_CHN,
445 &hidh_sec_check_complete_orig, p_dev);
1024 tHID_HOST_DEV_CTB *p_dev = &hh_cb.devices[dhandle];
1026 if( p_dev->conn.conn_state != HID_CONN_STATE_UNUSED )
1029 p_dev->conn.ctrl_cid = 0;
1030 p_dev->conn.intr_cid = 0;
1031 p_dev->conn.disc_reason = HID_L2CAP_CONN_FAIL; /* Reset initial reason for CLOSE_EVT: Connection Attempt was made but failed */
1034 p_dev->conn.conn_flags = HID_CONN_FLAGS_IS_ORIG;
1036 if(p_dev->attr_mask & HID_SEC_REQUIRED)
1041 BTM_SetOutService (p_dev->addr, service_id, mx_chan_id);
1044 if ((p_dev->conn.ctrl_cid = L2CA_ConnectReq (HID_PSM_CONTROL, p_dev->addr)) == 0)
1053 p_dev->conn.conn_state = HID_CONN_STATE_CONNECTING_CTRL;
1100 tHID_HOST_DEV_CTB *p_dev = &hh_cb.devices[dhandle];
1102 p_dev->conn.conn_state = HID_CONN_STATE_UNUSED;
1105 alarm_set_on_queue(p_dev->conn.process_repage_timer,