Lines Matching refs:p_pcb

190     tBTA_JV_PCB *p_pcb;  in bta_jv_alloc_rfc_cb()  local
208 p_pcb = &bta_jv_cb.port_cb[port_handle - 1]; in bta_jv_alloc_rfc_cb()
209 p_pcb->handle = p_cb->handle; in bta_jv_alloc_rfc_cb()
210 p_pcb->port_handle = port_handle; in bta_jv_alloc_rfc_cb()
211 p_pcb->p_pm_cb = NULL; in bta_jv_alloc_rfc_cb()
212 *pp_pcb = p_pcb; in bta_jv_alloc_rfc_cb()
235 tBTA_JV_PCB *p_pcb = NULL; in bta_jv_rfc_port_to_pcb() local
240 p_pcb = &bta_jv_cb.port_cb[port_handle - 1]; in bta_jv_rfc_port_to_pcb()
243 return p_pcb; in bta_jv_rfc_port_to_pcb()
277 static tBTA_JV_STATUS bta_jv_free_rfc_cb(tBTA_JV_RFC_CB *p_cb, tBTA_JV_PCB *p_pcb) in bta_jv_free_rfc_cb() argument
283 if (!p_cb || !p_pcb) in bta_jv_free_rfc_cb()
289 "%p, state:%d, jv handle: 0x%x" ,p_cb->max_sess, p_cb->curr_sess, p_pcb, in bta_jv_free_rfc_cb()
290 p_pcb->user_data, p_pcb->state, p_pcb->handle); in bta_jv_free_rfc_cb()
295 switch (p_pcb->state) in bta_jv_free_rfc_cb()
300 "scn:%d, p_pcb:%p, user_data:%p", p_pcb->state, p_cb->scn, p_pcb, in bta_jv_free_rfc_cb()
301 p_pcb->user_data); in bta_jv_free_rfc_cb()
307 " user_data:%p", p_pcb->state, p_cb->scn, p_pcb->user_data); in bta_jv_free_rfc_cb()
308 p_pcb->state = BTA_JV_ST_CL_CLOSING; in bta_jv_free_rfc_cb()
311 p_pcb->state = BTA_JV_ST_SR_CLOSING; in bta_jv_free_rfc_cb()
314 " user_data:%p", p_cb->scn, p_pcb->user_data); in bta_jv_free_rfc_cb()
317 p_pcb->state = BTA_JV_ST_SR_CLOSING; in bta_jv_free_rfc_cb()
319 " user_data:%p", p_cb->scn, p_pcb->user_data); in bta_jv_free_rfc_cb()
324 p_pcb->state, p_cb->scn, p_pcb, p_pcb->handle, p_pcb->port_handle, in bta_jv_free_rfc_cb()
325 p_pcb->user_data); in bta_jv_free_rfc_cb()
334 port_status = RFCOMM_RemoveConnection(p_pcb->port_handle); in bta_jv_free_rfc_cb()
336 port_status = RFCOMM_RemoveServer(p_pcb->port_handle); in bta_jv_free_rfc_cb()
342 p_pcb->handle, p_pcb->state, port_status, p_pcb->port_handle, in bta_jv_free_rfc_cb()
348 p_pcb->port_handle = 0; in bta_jv_free_rfc_cb()
349 p_pcb->state = BTA_JV_ST_NONE; in bta_jv_free_rfc_cb()
350 bta_jv_free_set_pm_profile_cb(p_pcb->handle); in bta_jv_free_rfc_cb()
353 p_pcb->cong = FALSE; in bta_jv_free_rfc_cb()
354 p_pcb->user_data = 0; in bta_jv_free_rfc_cb()
355 int si = BTA_JV_RFC_HDL_TO_SIDX(p_pcb->handle); in bta_jv_free_rfc_cb()
358 p_pcb->handle = 0; in bta_jv_free_rfc_cb()
480 tBTA_JV_PCB *p_pcb = bta_jv_rfc_port_to_pcb(bta_jv_cb.rfc_cb[hi].rfc_hdl[si]); in bta_jv_free_set_pm_profile_cb() local
481 if (p_pcb) in bta_jv_free_set_pm_profile_cb()
483 if (NULL == p_pcb->p_pm_cb) in bta_jv_free_set_pm_profile_cb()
486 "pm_cb?", __func__, jv_handle, p_pcb->port_handle, i); in bta_jv_free_set_pm_profile_cb()
487 p_cb = &p_pcb->p_pm_cb; in bta_jv_free_set_pm_profile_cb()
1440 tBTA_JV_PCB *p_pcb = bta_jv_rfc_port_to_pcb(port_handle); in bta_jv_port_data_co_cback() local
1441 APPL_TRACE_DEBUG("%s, p_cb:%p, p_pcb:%p, len:%d, type:%d", __func__, p_cb, p_pcb, len, type); in bta_jv_port_data_co_cback()
1442 if (p_pcb != NULL) in bta_jv_port_data_co_cback()
1447 return bta_co_rfc_data_incoming(p_pcb->user_data, (BT_HDR*)buf); in bta_jv_port_data_co_cback()
1449 return bta_co_rfc_data_outgoing_size(p_pcb->user_data, (int*)buf); in bta_jv_port_data_co_cback()
1451 return bta_co_rfc_data_outgoing(p_pcb->user_data, buf, len); in bta_jv_port_data_co_cback()
1473 tBTA_JV_PCB *p_pcb = bta_jv_rfc_port_to_pcb(port_handle); in bta_jv_port_mgmt_cl_cback() local
1493 p_pcb->state = BTA_JV_ST_CL_OPEN; in bta_jv_port_mgmt_cl_cback()
1494 p_cb->p_cback(BTA_JV_RFCOMM_OPEN_EVT, &evt_data, p_pcb->user_data); in bta_jv_port_mgmt_cl_cback()
1502 if (p_pcb->state == BTA_JV_ST_CL_CLOSING) in bta_jv_port_mgmt_cl_cback()
1509 p_cback(BTA_JV_RFCOMM_CLOSE_EVT, &evt_data, p_pcb->user_data); in bta_jv_port_mgmt_cl_cback()
1527 tBTA_JV_PCB *p_pcb = bta_jv_rfc_port_to_pcb(port_handle); in bta_jv_port_event_cl_cback() local
1539 p_cb->p_cback(BTA_JV_RFCOMM_DATA_IND_EVT, &evt_data, p_pcb->user_data); in bta_jv_port_event_cl_cback()
1544 p_pcb->cong = (code & PORT_EV_FCS) ? FALSE : TRUE; in bta_jv_port_event_cl_cback()
1545 evt_data.rfc_cong.cong = p_pcb->cong; in bta_jv_port_event_cl_cback()
1548 p_cb->p_cback(BTA_JV_RFCOMM_CONG_EVT, &evt_data, p_pcb->user_data); in bta_jv_port_event_cl_cback()
1553 bta_jv_pm_conn_idle(p_pcb->p_pm_cb); in bta_jv_port_event_cl_cback()
1573 tBTA_JV_PCB *p_pcb; in bta_jv_rfcomm_connect() local
1602 p_cb = bta_jv_alloc_rfc_cb(handle, &p_pcb); in bta_jv_rfcomm_connect()
1608 p_pcb->state = BTA_JV_ST_CL_OPENING; in bta_jv_rfcomm_connect()
1609 p_pcb->user_data = cc->user_data; in bta_jv_rfcomm_connect()
1678 tBTA_JV_PCB *p_pcb = NULL; in bta_jv_rfcomm_close() local
1687 if (!find_rfc_pcb(user_data, &p_cb, &p_pcb)) in bta_jv_rfcomm_close()
1689 bta_jv_free_rfc_cb(p_cb, p_pcb); in bta_jv_rfcomm_close()
1706 tBTA_JV_PCB *p_pcb = bta_jv_rfc_port_to_pcb(port_handle); in bta_jv_port_mgmt_sr_cback() local
1718 void *user_data = p_pcb->user_data; in bta_jv_port_mgmt_sr_cback()
1720 code, port_handle, p_cb->handle, p_pcb, p_pcb->user_data); in bta_jv_port_mgmt_sr_cback()
1726 evt_data.rfc_srv_open.handle = p_pcb->handle; in bta_jv_port_mgmt_sr_cback()
1729 tBTA_JV_PCB *p_pcb_new_listen = bta_jv_add_rfc_port(p_cb, p_pcb); in bta_jv_port_mgmt_sr_cback()
1746 p_pcb->cong = FALSE; in bta_jv_port_mgmt_sr_cback()
1751 if (BTA_JV_ST_SR_CLOSING == p_pcb->state) in bta_jv_port_mgmt_sr_cback()
1776 tBTA_JV_PCB *p_pcb = bta_jv_rfc_port_to_pcb(port_handle); in bta_jv_port_event_sr_cback() local
1786 void *user_data = p_pcb->user_data; in bta_jv_port_event_sr_cback()
1795 p_pcb->cong = (code & PORT_EV_FCS) ? FALSE : TRUE; in bta_jv_port_event_sr_cback()
1796 evt_data.rfc_cong.cong = p_pcb->cong; in bta_jv_port_event_sr_cback()
1804 bta_jv_pm_conn_idle(p_pcb->p_pm_cb); in bta_jv_port_event_sr_cback()
1823 tBTA_JV_PCB *p_pcb = NULL; in bta_jv_add_rfc_port() local
1830 p_pcb = &bta_jv_cb.port_cb[p_cb->rfc_hdl[i] - 1]; in bta_jv_add_rfc_port()
1831 if (p_pcb->state == BTA_JV_ST_SR_LISTEN) in bta_jv_add_rfc_port()
1834 if (p_pcb_open == p_pcb) in bta_jv_add_rfc_port()
1837 p_pcb->port_handle); in bta_jv_add_rfc_port()
1838 p_pcb->state = BTA_JV_ST_SR_OPEN; in bta_jv_add_rfc_port()
1845 listen, p_pcb->port_handle, p_pcb_open->handle); in bta_jv_add_rfc_port()
1866 p_pcb = &bta_jv_cb.port_cb[p_cb->rfc_hdl[si] - 1]; in bta_jv_add_rfc_port()
1867 p_pcb->state = BTA_JV_ST_SR_LISTEN; in bta_jv_add_rfc_port()
1868 p_pcb->port_handle = p_cb->rfc_hdl[si]; in bta_jv_add_rfc_port()
1869 p_pcb->user_data = p_pcb_open->user_data; in bta_jv_add_rfc_port()
1871 PORT_ClearKeepHandleFlag(p_pcb->port_handle); in bta_jv_add_rfc_port()
1872 PORT_SetEventCallback(p_pcb->port_handle, bta_jv_port_event_sr_cback); in bta_jv_add_rfc_port()
1873 PORT_SetDataCOCallback (p_pcb->port_handle, bta_jv_port_data_co_cback); in bta_jv_add_rfc_port()
1874 PORT_SetEventMask(p_pcb->port_handle, event_mask); in bta_jv_add_rfc_port()
1875 PORT_GetState(p_pcb->port_handle, &port_state); in bta_jv_add_rfc_port()
1879 PORT_SetState(p_pcb->port_handle, &port_state); in bta_jv_add_rfc_port()
1880 p_pcb->handle = BTA_JV_RFC_H_S_TO_HDL(p_cb->handle, si); in bta_jv_add_rfc_port()
1882 p_pcb->handle, p_cb->curr_sess); in bta_jv_add_rfc_port()
1890 return p_pcb; in bta_jv_add_rfc_port()
1910 tBTA_JV_PCB *p_pcb; in bta_jv_rfcomm_start_server() local
1942 p_cb = bta_jv_alloc_rfc_cb(handle, &p_pcb); in bta_jv_rfcomm_start_server()
1953 p_pcb->state = BTA_JV_ST_SR_LISTEN; in bta_jv_rfcomm_start_server()
1954 p_pcb->user_data = rs->user_data; in bta_jv_rfcomm_start_server()
1998 tBTA_JV_PCB *p_pcb = NULL; in bta_jv_rfcomm_stop_server() local
2006 if (!find_rfc_pcb(user_data, &p_cb, &p_pcb)) in bta_jv_rfcomm_stop_server()
2009 p_pcb, p_pcb->port_handle); in bta_jv_rfcomm_stop_server()
2010 bta_jv_free_rfc_cb(p_cb, p_pcb); in bta_jv_rfcomm_stop_server()
2028 tBTA_JV_PCB *p_pcb = wc->p_pcb; in bta_jv_rfcomm_write() local
2034 evt_data.cong = p_pcb->cong; in bta_jv_rfcomm_write()
2036 bta_jv_pm_conn_busy(p_pcb->p_pm_cb); in bta_jv_rfcomm_write()
2038 PORT_WriteDataCO(p_pcb->port_handle, &evt_data.len) == in bta_jv_rfcomm_write()
2044 evt_data.cong = p_pcb->cong; in bta_jv_rfcomm_write()
2047 p_cb->p_cback(BTA_JV_RFCOMM_WRITE_EVT, (tBTA_JV *)&evt_data, p_pcb->user_data); in bta_jv_rfcomm_write()