Lines Matching refs:pcb
198 tPAN_CONN* pcb = pan_get_pcb_by_handle(handle); in pan_conn_ind_cb() local
199 if (pcb) { in pan_conn_ind_cb()
212 if (pcb->con_state == PAN_STATE_CONNECTED) { in pan_conn_ind_cb()
216 pcb->prv_src_uuid = pcb->src_uuid; in pan_conn_ind_cb()
217 pcb->prv_dst_uuid = pcb->dst_uuid; in pan_conn_ind_cb()
219 if (pcb->src_uuid == UUID_SERVCLASS_NAP && in pan_conn_ind_cb()
223 (*pan_cb.pan_bridge_req_cb)(pcb->rem_bda, false); in pan_conn_ind_cb()
228 pcb->src_uuid = local_uuid16; in pan_conn_ind_cb()
229 pcb->dst_uuid = remote_uuid16; in pan_conn_ind_cb()
247 pcb = pan_allocate_pcb(p_bda, handle); in pan_conn_ind_cb()
248 if (!pcb) { in pan_conn_ind_cb()
257 pcb->src_uuid = local_uuid16; in pan_conn_ind_cb()
258 pcb->dst_uuid = remote_uuid16; in pan_conn_ind_cb()
259 pcb->con_state = PAN_STATE_CONN_START; in pan_conn_ind_cb()
287 tPAN_CONN* pcb; in pan_connect_state_cb() local
292 pcb = pan_get_pcb_by_handle(handle); in pan_connect_state_cb()
293 if (!pcb) { in pan_connect_state_cb()
302 (*pan_cb.pan_conn_state_cb)(pcb->handle, pcb->rem_bda, in pan_connect_state_cb()
307 if (pcb->con_state != PAN_STATE_CONNECTED && in pan_connect_state_cb()
308 (pcb->con_flags & PAN_FLAGS_CONN_COMPLETED)) { in pan_connect_state_cb()
311 pcb->con_state = PAN_STATE_CONNECTED; in pan_connect_state_cb()
312 pcb->con_flags &= (~PAN_FLAGS_CONN_COMPLETED); in pan_connect_state_cb()
314 pcb->src_uuid = pcb->prv_src_uuid; in pan_connect_state_cb()
315 pcb->dst_uuid = pcb->prv_dst_uuid; in pan_connect_state_cb()
318 if ((pcb->src_uuid == UUID_SERVCLASS_NAP) && pan_cb.pan_bridge_req_cb) in pan_connect_state_cb()
319 (*pan_cb.pan_bridge_req_cb)(pcb->rem_bda, true); in pan_connect_state_cb()
324 if (pcb->con_state == PAN_STATE_CONNECTED) { in pan_connect_state_cb()
326 if ((pcb->src_uuid == UUID_SERVCLASS_NAP) && pan_cb.pan_bridge_req_cb) in pan_connect_state_cb()
327 (*pan_cb.pan_bridge_req_cb)(pcb->rem_bda, false); in pan_connect_state_cb()
331 pan_release_pcb(pcb); in pan_connect_state_cb()
336 if (pcb->src_uuid == UUID_SERVCLASS_PANU) in pan_connect_state_cb()
341 if (pcb->dst_uuid == UUID_SERVCLASS_PANU) in pan_connect_state_cb()
346 pcb->con_state = PAN_STATE_CONNECTED; in pan_connect_state_cb()
350 (*pan_cb.pan_conn_state_cb)(pcb->handle, pcb->rem_bda, PAN_SUCCESS, in pan_connect_state_cb()
354 if (pan_cb.pan_bridge_req_cb && pcb->src_uuid == UUID_SERVCLASS_NAP) { in pan_connect_state_cb()
356 (*pan_cb.pan_bridge_req_cb)(pcb->rem_bda, true); in pan_connect_state_cb()
383 tPAN_CONN *pcb, *dst_pcb; in pan_data_buf_ind_cb() local
390 pcb = pan_get_pcb_by_handle(handle); in pan_data_buf_ind_cb()
391 if (!pcb) { in pan_data_buf_ind_cb()
397 if (pcb->con_state != PAN_STATE_CONNECTED) { in pan_data_buf_ind_cb()
399 pcb->con_state, handle); in pan_data_buf_ind_cb()
400 pcb->read.drops++; in pan_data_buf_ind_cb()
408 pcb->read.octets += len; in pan_data_buf_ind_cb()
409 pcb->read.packets++; in pan_data_buf_ind_cb()
415 if (pcb->src_uuid == UUID_SERVCLASS_NAP) in pan_data_buf_ind_cb()
421 if (pcb->src_uuid != UUID_SERVCLASS_PANU) { in pan_data_buf_ind_cb()
425 pcb->src_uuid); in pan_data_buf_ind_cb()
427 if (pan_cb.pcb[i].con_state == PAN_STATE_CONNECTED && in pan_data_buf_ind_cb()
428 pan_cb.pcb[i].handle != handle && in pan_data_buf_ind_cb()
429 pcb->src_uuid == pan_cb.pcb[i].src_uuid) { in pan_data_buf_ind_cb()
430 BNEP_Write(pan_cb.pcb[i].handle, dst, p_data, len, protocol, src, in pan_data_buf_ind_cb()
436 (*pan_cb.pan_data_buf_ind_cb)(pcb->handle, src, dst, protocol, p_buf, in pan_data_buf_ind_cb()
439 (*pan_cb.pan_data_ind_cb)(pcb->handle, src, dst, protocol, p_data, len, in pan_data_buf_ind_cb()
458 pcb->read.errors++; in pan_data_buf_ind_cb()
466 (*pan_cb.pan_data_buf_ind_cb)(pcb->handle, src, dst, protocol, p_buf, ext, in pan_data_buf_ind_cb()
469 (*pan_cb.pan_data_ind_cb)(pcb->handle, src, dst, protocol, p_data, len, ext, in pan_data_buf_ind_cb()