• Home
  • Raw
  • Download

Lines Matching refs:p_ccb

124     tL2C_CCB    *p_ccb;  in L2CA_Deregister()  local
137 if (((p_ccb = p_lcb->ccb_queue.p_first_ccb) == NULL) in L2CA_Deregister()
141 if ((p_ccb->in_use) && in L2CA_Deregister()
142 ((p_ccb->chnl_state == CST_W4_L2CAP_DISCONNECT_RSP) || in L2CA_Deregister()
143 (p_ccb->chnl_state == CST_W4_L2CA_DISCONNECT_RSP))) in L2CA_Deregister()
146 if (p_ccb->p_rcb == p_rcb) in L2CA_Deregister()
147 l2c_csm_execute (p_ccb, L2CEVT_L2CA_DISCONNECT_REQ, NULL); in L2CA_Deregister()
232 tL2C_CCB *p_ccb; in L2CA_ErtmConnectReq() local
266 if ((p_ccb = l2cu_allocate_ccb (p_lcb, 0)) == NULL) in L2CA_ErtmConnectReq()
273 p_ccb->p_rcb = p_rcb; in L2CA_ErtmConnectReq()
277 p_ccb->ertm_info = *p_ertm_info; in L2CA_ErtmConnectReq()
280 if (p_ccb->ertm_info.fcr_rx_pool_id == L2CAP_DEFAULT_ERM_POOL_ID) in L2CA_ErtmConnectReq()
281 p_ccb->ertm_info.fcr_rx_pool_id = L2CAP_FCR_RX_POOL_ID; in L2CA_ErtmConnectReq()
283 if (p_ccb->ertm_info.fcr_tx_pool_id == L2CAP_DEFAULT_ERM_POOL_ID) in L2CA_ErtmConnectReq()
284 p_ccb->ertm_info.fcr_tx_pool_id = L2CAP_FCR_TX_POOL_ID; in L2CA_ErtmConnectReq()
286 if (p_ccb->ertm_info.user_rx_pool_id == L2CAP_DEFAULT_ERM_POOL_ID) in L2CA_ErtmConnectReq()
287 p_ccb->ertm_info.user_rx_pool_id = HCI_ACL_POOL_ID; in L2CA_ErtmConnectReq()
289 if (p_ccb->ertm_info.user_tx_pool_id == L2CAP_DEFAULT_ERM_POOL_ID) in L2CA_ErtmConnectReq()
290 p_ccb->ertm_info.user_tx_pool_id = HCI_ACL_POOL_ID; in L2CA_ErtmConnectReq()
292p_ccb->max_rx_mtu = GKI_get_pool_bufsize (p_ertm_info->user_rx_pool_id) - (L2CAP_MIN_OFFSET + L2CA… in L2CA_ErtmConnectReq()
298 l2c_csm_execute (p_ccb, L2CEVT_L2CA_CONNECT_REQ, NULL); in L2CA_ErtmConnectReq()
312 p_lcb->p_pending_ccb = p_ccb; in L2CA_ErtmConnectReq()
315 …L2CAP_TRACE_API2 ("L2CAP - L2CA_conn_req(psm: 0x%04x) returned CID: 0x%04x", psm, p_ccb->local_cid… in L2CA_ErtmConnectReq()
318 return (p_ccb->local_cid); in L2CA_ErtmConnectReq()
354 tL2C_CCB *p_ccb; in L2CA_ErtmConnectRsp() local
370 if ((p_ccb = l2cu_find_ccb_by_cid (p_lcb, lcid)) == NULL) in L2CA_ErtmConnectRsp()
377 if (p_ccb->remote_id != id) in L2CA_ErtmConnectRsp()
379 … L2CAP_TRACE_WARNING2 ("L2CAP - bad id in L2CA_conn_rsp. Exp: %d Got: %d", p_ccb->remote_id, id); in L2CA_ErtmConnectRsp()
385 p_ccb->ertm_info = *p_ertm_info; in L2CA_ErtmConnectRsp()
388 if (p_ccb->ertm_info.fcr_rx_pool_id == L2CAP_DEFAULT_ERM_POOL_ID) in L2CA_ErtmConnectRsp()
389 p_ccb->ertm_info.fcr_rx_pool_id = L2CAP_FCR_RX_POOL_ID; in L2CA_ErtmConnectRsp()
391 if (p_ccb->ertm_info.fcr_tx_pool_id == L2CAP_DEFAULT_ERM_POOL_ID) in L2CA_ErtmConnectRsp()
392 p_ccb->ertm_info.fcr_tx_pool_id = L2CAP_FCR_TX_POOL_ID; in L2CA_ErtmConnectRsp()
394 if (p_ccb->ertm_info.user_rx_pool_id == L2CAP_DEFAULT_ERM_POOL_ID) in L2CA_ErtmConnectRsp()
395 p_ccb->ertm_info.user_rx_pool_id = HCI_ACL_POOL_ID; in L2CA_ErtmConnectRsp()
397 if (p_ccb->ertm_info.user_tx_pool_id == L2CAP_DEFAULT_ERM_POOL_ID) in L2CA_ErtmConnectRsp()
398 p_ccb->ertm_info.user_tx_pool_id = HCI_ACL_POOL_ID; in L2CA_ErtmConnectRsp()
400p_ccb->max_rx_mtu = GKI_get_pool_bufsize (p_ertm_info->user_rx_pool_id) - (L2CAP_MIN_OFFSET + L2CA… in L2CA_ErtmConnectRsp()
405 l2c_csm_execute (p_ccb, L2CEVT_L2CA_CONNECT_RSP, NULL); in L2CA_ErtmConnectRsp()
415 l2c_csm_execute (p_ccb, L2CEVT_L2CA_CONNECT_RSP, &conn_info); in L2CA_ErtmConnectRsp()
417 l2c_csm_execute (p_ccb, L2CEVT_L2CA_CONNECT_RSP_NEG, &conn_info); in L2CA_ErtmConnectRsp()
437 tL2C_CCB *p_ccb; in L2CA_ConfigReq() local
443 if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL) in L2CA_ConfigReq()
450 if (!l2c_fcr_adj_our_req_options(p_ccb, p_cfg)) in L2CA_ConfigReq()
468 p_ccb->our_cfg = *p_cfg; in L2CA_ConfigReq()
470 l2c_csm_execute (p_ccb, L2CEVT_L2CA_CONFIG_REQ, p_cfg); in L2CA_ConfigReq()
488 tL2C_CCB *p_ccb; in L2CA_ConfigRsp() local
494 if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL) in L2CA_ConfigRsp()
501 l2c_csm_execute (p_ccb, L2CEVT_L2CA_CONFIG_RSP, p_cfg); in L2CA_ConfigRsp()
508 p_ccb->peer_cfg.mtu_present = FALSE; in L2CA_ConfigRsp()
510 p_ccb->peer_cfg.flush_to_present = FALSE; in L2CA_ConfigRsp()
512 p_ccb->peer_cfg.qos_present = FALSE; in L2CA_ConfigRsp()
514 l2c_csm_execute (p_ccb, L2CEVT_L2CA_CONFIG_RSP_NEG, p_cfg); in L2CA_ConfigRsp()
532 tL2C_CCB *p_ccb; in L2CA_DisconnectReq() local
537 if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL) in L2CA_DisconnectReq()
543 l2c_csm_execute (p_ccb, L2CEVT_L2CA_DISCONNECT_REQ, NULL); in L2CA_DisconnectReq()
560 tL2C_CCB *p_ccb; in L2CA_DisconnectRsp() local
565 if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL) in L2CA_DisconnectRsp()
571 l2c_csm_execute (p_ccb, L2CEVT_L2CA_DISCONNECT_RSP, NULL); in L2CA_DisconnectRsp()
718 tL2C_CCB *p_ccb; in L2CA_SetIdleTimeout() local
728 if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL) in L2CA_SetIdleTimeout()
734 p_lcb = p_ccb->p_lcb; in L2CA_SetIdleTimeout()
864 tL2C_CCB *p_ccb; in L2CA_LocalLoopbackReq() local
893 if ((p_ccb = l2cu_allocate_ccb (p_lcb, 0)) == NULL) in L2CA_LocalLoopbackReq()
900 p_ccb->p_rcb = p_rcb; in L2CA_LocalLoopbackReq()
901 p_ccb->chnl_state = CST_OPEN; in L2CA_LocalLoopbackReq()
902 p_ccb->remote_cid = p_ccb->local_cid; in L2CA_LocalLoopbackReq()
903 p_ccb->config_done = CFG_DONE_MASK; in L2CA_LocalLoopbackReq()
906 return (p_ccb->local_cid); in L2CA_LocalLoopbackReq()
942 tL2C_CCB *p_ccb; in L2CA_FlowControl() local
948 if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL) in L2CA_FlowControl()
954 if (p_ccb->peer_cfg.fcr.mode != L2CAP_FCR_ERTM_MODE) in L2CA_FlowControl()
956 L2CAP_TRACE_EVENT1 ("L2CA_FlowControl() invalid mode:%d", p_ccb->peer_cfg.fcr.mode); in L2CA_FlowControl()
959 if (p_ccb->fcrb.local_busy != on_off) in L2CA_FlowControl()
961 p_ccb->fcrb.local_busy = on_off; in L2CA_FlowControl()
963 if ( (p_ccb->chnl_state == CST_OPEN) && (!p_ccb->fcrb.wait_ack) ) in L2CA_FlowControl()
966 l2c_fcr_send_S_frame (p_ccb, L2CAP_FCR_SUP_RNR, 0); in L2CA_FlowControl()
968 l2c_fcr_send_S_frame (p_ccb, L2CAP_FCR_SUP_RR, L2CAP_FCR_P_BIT); in L2CA_FlowControl()
986 tL2C_CCB *p_ccb; in L2CA_SendTestSFrame() local
991 if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL) in L2CA_SendTestSFrame()
997 if ( (p_ccb->chnl_state != CST_OPEN) || (p_ccb->peer_cfg.fcr.mode != L2CAP_FCR_ERTM_MODE) ) in L2CA_SendTestSFrame()
1000 p_ccb->fcrb.next_seq_expected -= back_track; in L2CA_SendTestSFrame()
1002 …l2c_fcr_send_S_frame (p_ccb, (UINT16)(sup_type & 3), (UINT16)(sup_type & (L2CAP_FCR_P_BIT | L2CAP_… in L2CA_SendTestSFrame()
1019 tL2C_CCB *p_ccb; in L2CA_SetTxPriority() local
1024 if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL) in L2CA_SetTxPriority()
1031 l2cu_change_pri_ccb (p_ccb, priority); in L2CA_SetTxPriority()
1047 tL2C_CCB *p_ccb; in L2CA_SetChnlDataRate() local
1052 if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL) in L2CA_SetChnlDataRate()
1058 p_ccb->tx_data_rate = tx; in L2CA_SetChnlDataRate()
1059 p_ccb->rx_data_rate = rx; in L2CA_SetChnlDataRate()
1257 tL2C_CCB *p_ccb = l2cu_find_ccb_by_cid (NULL, lcid); in L2CA_GetChnlFcrMode() local
1259 if (p_ccb) in L2CA_GetChnlFcrMode()
1261 L2CAP_TRACE_API1 ("L2CA_GetChnlFcrMode() returns mode %d", p_ccb->peer_cfg.fcr.mode); in L2CA_GetChnlFcrMode()
1262 return (p_ccb->peer_cfg.fcr.mode); in L2CA_GetChnlFcrMode()
1465 tL2C_CCB *p_ccb; in L2CA_RemoveFixedChnl() local
1488 p_ccb = p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]; in L2CA_RemoveFixedChnl()
1498 l2cu_release_ccb (p_ccb); in L2CA_RemoveFixedChnl()
1563 tL2C_CCB *p_ccb; in L2CA_GetCurrentConfig() local
1567 p_ccb = l2cu_find_ccb_by_cid(NULL, lcid); in L2CA_GetCurrentConfig()
1569 if (p_ccb) in L2CA_GetCurrentConfig()
1571 *pp_our_cfg = &(p_ccb->our_cfg); in L2CA_GetCurrentConfig()
1575 if (p_ccb->our_cfg.mtu_present) in L2CA_GetCurrentConfig()
1577 if (p_ccb->our_cfg.qos_present) in L2CA_GetCurrentConfig()
1579 if (p_ccb->our_cfg.flush_to_present) in L2CA_GetCurrentConfig()
1581 if (p_ccb->our_cfg.fcr_present) in L2CA_GetCurrentConfig()
1583 if (p_ccb->our_cfg.fcs_present) in L2CA_GetCurrentConfig()
1585 if (p_ccb->our_cfg.ext_flow_spec_present) in L2CA_GetCurrentConfig()
1588 *pp_peer_cfg = &(p_ccb->peer_cfg); in L2CA_GetCurrentConfig()
1589 *p_peer_cfg_bits = p_ccb->peer_cfg_bits; in L2CA_GetCurrentConfig()
1659 tL2C_CCB *p_ccb; in L2CA_SetChnlFlushability() local
1662 if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL) in L2CA_SetChnlFlushability()
1668 p_ccb->is_flushable = is_flushable; in L2CA_SetChnlFlushability()
1715 tL2C_CCB *p_ccb; in L2CA_FlushChannel() local
1722 p_ccb = l2cu_find_ccb_by_cid(NULL, lcid); in L2CA_FlushChannel()
1724 if ( !p_ccb || ((p_lcb = p_ccb->p_lcb) == NULL) ) in L2CA_FlushChannel()
1733 … lcid, num_to_flush, p_ccb->xmit_hold_q.count, p_ccb->xmit_hold_q.p_first); in L2CA_FlushChannel()
1741 if (p_ccb->peer_cfg.fcr.mode != L2CAP_FCR_ERTM_MODE) in L2CA_FlushChannel()
1783 while ( (num_to_flush != 0) && (p_ccb->xmit_hold_q.count != 0) ) in L2CA_FlushChannel()
1785 p_buf = (BT_HDR *)GKI_dequeue (&p_ccb->xmit_hold_q); in L2CA_FlushChannel()
1793 if ( (p_ccb->p_rcb) && (p_ccb->p_rcb->api.pL2CA_TxComplete_Cb) && (num_flushed2) ) in L2CA_FlushChannel()
1794 (*p_ccb->p_rcb->api.pL2CA_TxComplete_Cb)(p_ccb->local_cid, num_flushed2); in L2CA_FlushChannel()
1808 num_left += p_ccb->xmit_hold_q.count; in L2CA_FlushChannel()
1814 l2cu_check_channel_congestion (p_ccb); in L2CA_FlushChannel()