• Home
  • Raw
  • Download

Lines Matching refs:p_pcb

131   tBTA_JV_PCB* p_pcb;  in bta_jv_alloc_rfc_cb()  local
146 p_pcb = &bta_jv_cb.port_cb[port_handle - 1]; in bta_jv_alloc_rfc_cb()
147 p_pcb->handle = p_cb->handle; in bta_jv_alloc_rfc_cb()
148 p_pcb->port_handle = port_handle; in bta_jv_alloc_rfc_cb()
149 p_pcb->p_pm_cb = NULL; in bta_jv_alloc_rfc_cb()
150 *pp_pcb = p_pcb; in bta_jv_alloc_rfc_cb()
171 tBTA_JV_PCB* p_pcb = NULL; in bta_jv_rfc_port_to_pcb() local
175 p_pcb = &bta_jv_cb.port_cb[port_handle - 1]; in bta_jv_rfc_port_to_pcb()
178 return p_pcb; in bta_jv_rfc_port_to_pcb()
209 tBTA_JV_PCB* p_pcb) { in bta_jv_free_rfc_cb() argument
214 if (!p_cb || !p_pcb) { in bta_jv_free_rfc_cb()
219 << ", curr_sess=" << p_cb->curr_sess << ", p_pcb=" << p_pcb in bta_jv_free_rfc_cb()
220 << ", user=" << p_pcb->rfcomm_slot_id << ", state=" << p_pcb->state in bta_jv_free_rfc_cb()
221 << ", jv handle=" << loghex(p_pcb->handle); in bta_jv_free_rfc_cb()
225 switch (p_pcb->state) { in bta_jv_free_rfc_cb()
229 << ": return on closing, port state=" << p_pcb->state in bta_jv_free_rfc_cb()
230 << ", scn=" << p_cb->scn << ", p_pcb=" << p_pcb in bta_jv_free_rfc_cb()
231 << ", user_data=" << p_pcb->rfcomm_slot_id; in bta_jv_free_rfc_cb()
236 VLOG(2) << __func__ << ": state=" << p_pcb->state << ", scn=" << p_cb->scn in bta_jv_free_rfc_cb()
237 << ", user_data=" << p_pcb->rfcomm_slot_id; in bta_jv_free_rfc_cb()
238 p_pcb->state = BTA_JV_ST_CL_CLOSING; in bta_jv_free_rfc_cb()
241 p_pcb->state = BTA_JV_ST_SR_CLOSING; in bta_jv_free_rfc_cb()
244 << ", user_data=" << p_pcb->rfcomm_slot_id; in bta_jv_free_rfc_cb()
247 p_pcb->state = BTA_JV_ST_SR_CLOSING; in bta_jv_free_rfc_cb()
249 << " user_data=" << p_pcb->rfcomm_slot_id; in bta_jv_free_rfc_cb()
252 LOG(WARNING) << __func__ << ":failed, ignore port state= " << p_pcb->state in bta_jv_free_rfc_cb()
253 << ", scn=" << p_cb->scn << ", p_pcb= " << p_pcb in bta_jv_free_rfc_cb()
254 << ", jv handle=" << loghex(p_pcb->handle) in bta_jv_free_rfc_cb()
255 << ", port_handle=" << p_pcb->port_handle in bta_jv_free_rfc_cb()
256 << ", user_data=" << p_pcb->rfcomm_slot_id; in bta_jv_free_rfc_cb()
264 port_status = RFCOMM_RemoveConnection(p_pcb->port_handle); in bta_jv_free_rfc_cb()
266 port_status = RFCOMM_RemoveServer(p_pcb->port_handle); in bta_jv_free_rfc_cb()
269 LOG(WARNING) << __func__ << ": Remove jv handle=" << loghex(p_pcb->handle) in bta_jv_free_rfc_cb()
270 << ", state=" << p_pcb->state in bta_jv_free_rfc_cb()
272 << ", port_handle=" << p_pcb->port_handle in bta_jv_free_rfc_cb()
277 p_pcb->port_handle = 0; in bta_jv_free_rfc_cb()
278 p_pcb->state = BTA_JV_ST_NONE; in bta_jv_free_rfc_cb()
279 bta_jv_free_set_pm_profile_cb(p_pcb->handle); in bta_jv_free_rfc_cb()
282 p_pcb->cong = false; in bta_jv_free_rfc_cb()
283 p_pcb->rfcomm_slot_id = 0; in bta_jv_free_rfc_cb()
284 int si = BTA_JV_RFC_HDL_TO_SIDX(p_pcb->handle); in bta_jv_free_rfc_cb()
286 p_pcb->handle = 0; in bta_jv_free_rfc_cb()
401 tBTA_JV_PCB* p_pcb = in bta_jv_free_set_pm_profile_cb() local
403 if (p_pcb) { in bta_jv_free_set_pm_profile_cb()
404 if (NULL == p_pcb->p_pm_cb) in bta_jv_free_set_pm_profile_cb()
406 << ", port_handle=" << p_pcb->port_handle in bta_jv_free_set_pm_profile_cb()
408 p_cb = &p_pcb->p_pm_cb; in bta_jv_free_set_pm_profile_cb()
1172 tBTA_JV_PCB* p_pcb = bta_jv_rfc_port_to_pcb(port_handle); in bta_jv_port_data_co_cback() local
1173 VLOG(2) << __func__ << ": p_cb=" << p_cb << ", p_pcb=" << p_pcb in bta_jv_port_data_co_cback()
1175 if (p_pcb != NULL) { in bta_jv_port_data_co_cback()
1178 return bta_co_rfc_data_incoming(p_pcb->rfcomm_slot_id, (BT_HDR*)buf); in bta_jv_port_data_co_cback()
1180 return bta_co_rfc_data_outgoing_size(p_pcb->rfcomm_slot_id, (int*)buf); in bta_jv_port_data_co_cback()
1182 return bta_co_rfc_data_outgoing(p_pcb->rfcomm_slot_id, buf, len); in bta_jv_port_data_co_cback()
1203 tBTA_JV_PCB* p_pcb = bta_jv_rfc_port_to_pcb(port_handle); in bta_jv_port_mgmt_cl_cback() local
1221 p_pcb->state = BTA_JV_ST_CL_OPEN; in bta_jv_port_mgmt_cl_cback()
1222 p_cb->p_cback(BTA_JV_RFCOMM_OPEN_EVT, &evt_data, p_pcb->rfcomm_slot_id); in bta_jv_port_mgmt_cl_cback()
1228 if (p_pcb->state == BTA_JV_ST_CL_CLOSING) { in bta_jv_port_mgmt_cl_cback()
1234 p_cback(BTA_JV_RFCOMM_CLOSE_EVT, &evt_data, p_pcb->rfcomm_slot_id); in bta_jv_port_mgmt_cl_cback()
1250 tBTA_JV_PCB* p_pcb = bta_jv_rfc_port_to_pcb(port_handle); in bta_jv_port_event_cl_cback() local
1260 p_cb->p_cback(BTA_JV_RFCOMM_DATA_IND_EVT, &evt_data, p_pcb->rfcomm_slot_id); in bta_jv_port_event_cl_cback()
1264 p_pcb->cong = (code & PORT_EV_FCS) ? false : true; in bta_jv_port_event_cl_cback()
1265 evt_data.rfc_cong.cong = p_pcb->cong; in bta_jv_port_event_cl_cback()
1268 p_cb->p_cback(BTA_JV_RFCOMM_CONG_EVT, &evt_data, p_pcb->rfcomm_slot_id); in bta_jv_port_event_cl_cback()
1272 bta_jv_pm_conn_idle(p_pcb->p_pm_cb); in bta_jv_port_event_cl_cback()
1297 tBTA_JV_PCB* p_pcb; in bta_jv_rfcomm_connect() local
1298 tBTA_JV_RFC_CB* p_cb = bta_jv_alloc_rfc_cb(handle, &p_pcb); in bta_jv_rfcomm_connect()
1302 p_pcb->state = BTA_JV_ST_CL_OPENING; in bta_jv_rfcomm_connect()
1303 p_pcb->rfcomm_slot_id = rfcomm_slot_id; in bta_jv_rfcomm_connect()
1364 tBTA_JV_PCB* p_pcb = NULL; in bta_jv_rfcomm_close() local
1366 if (!find_rfc_pcb(rfcomm_slot_id, &p_cb, &p_pcb)) return; in bta_jv_rfcomm_close()
1367 bta_jv_free_rfc_cb(p_cb, p_pcb); in bta_jv_rfcomm_close()
1381 tBTA_JV_PCB* p_pcb = bta_jv_rfc_port_to_pcb(port_handle); in bta_jv_port_mgmt_sr_cback() local
1392 uint32_t rfcomm_slot_id = p_pcb->rfcomm_slot_id; in bta_jv_port_mgmt_sr_cback()
1395 << ", handle=" << loghex(p_cb->handle) << ", p_pcb" << p_pcb in bta_jv_port_mgmt_sr_cback()
1396 << ", user=" << p_pcb->rfcomm_slot_id; in bta_jv_port_mgmt_sr_cback()
1405 evt_data.rfc_srv_open.handle = p_pcb->handle; in bta_jv_port_mgmt_sr_cback()
1408 tBTA_JV_PCB* p_pcb_new_listen = bta_jv_add_rfc_port(p_cb, p_pcb); in bta_jv_port_mgmt_sr_cback()
1424 p_pcb->cong = false; in bta_jv_port_mgmt_sr_cback()
1430 if (BTA_JV_ST_SR_CLOSING == p_pcb->state) { in bta_jv_port_mgmt_sr_cback()
1454 tBTA_JV_PCB* p_pcb = bta_jv_rfc_port_to_pcb(port_handle); in bta_jv_port_event_sr_cback() local
1467 uint32_t user_data = p_pcb->rfcomm_slot_id; in bta_jv_port_event_sr_cback()
1474 p_pcb->cong = (code & PORT_EV_FCS) ? false : true; in bta_jv_port_event_sr_cback()
1475 evt_data.rfc_cong.cong = p_pcb->cong; in bta_jv_port_event_sr_cback()
1482 bta_jv_pm_conn_idle(p_pcb->p_pm_cb); in bta_jv_port_event_sr_cback()
1501 tBTA_JV_PCB* p_pcb = NULL; in bta_jv_add_rfc_port() local
1505 p_pcb = &bta_jv_cb.port_cb[p_cb->rfc_hdl[i] - 1]; in bta_jv_add_rfc_port()
1506 if (p_pcb->state == BTA_JV_ST_SR_LISTEN) { in bta_jv_add_rfc_port()
1508 if (p_pcb_open == p_pcb) { in bta_jv_add_rfc_port()
1509 VLOG(2) << __func__ << ": port_handle=" << p_pcb->port_handle in bta_jv_add_rfc_port()
1511 p_pcb->state = BTA_JV_ST_SR_OPEN; in bta_jv_add_rfc_port()
1516 << ", listen pcb handle=" << p_pcb->port_handle in bta_jv_add_rfc_port()
1537 p_pcb = &bta_jv_cb.port_cb[p_cb->rfc_hdl[si] - 1]; in bta_jv_add_rfc_port()
1538 p_pcb->state = BTA_JV_ST_SR_LISTEN; in bta_jv_add_rfc_port()
1539 p_pcb->port_handle = p_cb->rfc_hdl[si]; in bta_jv_add_rfc_port()
1540 p_pcb->rfcomm_slot_id = p_pcb_open->rfcomm_slot_id; in bta_jv_add_rfc_port()
1542 PORT_ClearKeepHandleFlag(p_pcb->port_handle); in bta_jv_add_rfc_port()
1543 PORT_SetEventCallback(p_pcb->port_handle, bta_jv_port_event_sr_cback); in bta_jv_add_rfc_port()
1544 PORT_SetDataCOCallback(p_pcb->port_handle, bta_jv_port_data_co_cback); in bta_jv_add_rfc_port()
1545 PORT_SetEventMask(p_pcb->port_handle, event_mask); in bta_jv_add_rfc_port()
1546 PORT_GetState(p_pcb->port_handle, &port_state); in bta_jv_add_rfc_port()
1550 PORT_SetState(p_pcb->port_handle, &port_state); in bta_jv_add_rfc_port()
1551 p_pcb->handle = BTA_JV_RFC_H_S_TO_HDL(p_cb->handle, si); in bta_jv_add_rfc_port()
1552 VLOG(2) << __func__ << ": p_pcb->handle=" << loghex(p_pcb->handle) in bta_jv_add_rfc_port()
1565 return p_pcb; in bta_jv_add_rfc_port()
1577 tBTA_JV_PCB* p_pcb; in bta_jv_rfcomm_start_server() local
1591 p_cb = bta_jv_alloc_rfc_cb(handle, &p_pcb); in bta_jv_rfcomm_start_server()
1600 p_pcb->state = BTA_JV_ST_SR_LISTEN; in bta_jv_rfcomm_start_server()
1601 p_pcb->rfcomm_slot_id = rfcomm_slot_id; in bta_jv_rfcomm_start_server()
1636 tBTA_JV_PCB* p_pcb = NULL; in bta_jv_rfcomm_stop_server() local
1638 if (!find_rfc_pcb(rfcomm_slot_id, &p_cb, &p_pcb)) return; in bta_jv_rfcomm_stop_server()
1639 VLOG(2) << __func__ << ": p_pcb=" << p_pcb in bta_jv_rfcomm_stop_server()
1640 << ", p_pcb->port_handle=" << p_pcb->port_handle; in bta_jv_rfcomm_stop_server()
1641 bta_jv_free_rfc_cb(p_cb, p_pcb); in bta_jv_rfcomm_stop_server()
1646 tBTA_JV_PCB* p_pcb) { in bta_jv_rfcomm_write() argument
1647 if (p_pcb->state == BTA_JV_ST_NONE) { in bta_jv_rfcomm_write()
1656 evt_data.cong = p_pcb->cong; in bta_jv_rfcomm_write()
1659 bta_jv_pm_conn_busy(p_pcb->p_pm_cb); in bta_jv_rfcomm_write()
1662 PORT_WriteDataCO(p_pcb->port_handle, &evt_data.len) == PORT_SUCCESS) { in bta_jv_rfcomm_write()
1667 evt_data.cong = p_pcb->cong; in bta_jv_rfcomm_write()
1676 p_cb->p_cback(BTA_JV_RFCOMM_WRITE_EVT, &bta_jv, p_pcb->rfcomm_slot_id); in bta_jv_rfcomm_write()