Lines Matching refs:lcid

44 static void RFCOMM_ConnectInd(const RawAddress& bd_addr, uint16_t lcid,
46 static void RFCOMM_ConnectCnf(uint16_t lcid, uint16_t err);
47 static void RFCOMM_ConfigInd(uint16_t lcid, tL2CAP_CFG_INFO* p_cfg);
48 static void RFCOMM_ConfigCnf(uint16_t lcid, tL2CAP_CFG_INFO* p_cfg);
49 static void RFCOMM_DisconnectInd(uint16_t lcid, bool is_clear);
51 static void RFCOMM_BufDataInd(uint16_t lcid, BT_HDR* p_buf);
52 static void RFCOMM_CongestionStatusInd(uint16_t lcid, bool is_congested);
90 void RFCOMM_ConnectInd(const RawAddress& bd_addr, uint16_t lcid, in RFCOMM_ConnectInd() argument
97 p_mcb->pending_lcid = lcid; in RFCOMM_ConnectInd()
108 p_mcb->lcid, p_mcb->pending_lcid); in RFCOMM_ConnectInd()
121 rfc_save_lcid_mcb(p_mcb, lcid); in RFCOMM_ConnectInd()
125 L2CA_ConnectRsp(bd_addr, id, lcid, L2CAP_CONN_NO_RESOURCES, 0); in RFCOMM_ConnectInd()
128 p_mcb->lcid = lcid; in RFCOMM_ConnectInd()
142 void RFCOMM_ConnectCnf(uint16_t lcid, uint16_t result) { in RFCOMM_ConnectCnf() argument
143 tRFC_MCB* p_mcb = rfc_find_lcid_mcb(lcid); in RFCOMM_ConnectCnf()
146 RFCOMM_TRACE_ERROR("RFCOMM_ConnectCnf LCID:0x%x", lcid); in RFCOMM_ConnectCnf()
159 rfc_save_lcid_mcb(NULL, p_mcb->lcid); in RFCOMM_ConnectCnf()
161 p_mcb->lcid = p_mcb->pending_lcid; in RFCOMM_ConnectCnf()
166 rfc_save_lcid_mcb(p_mcb, p_mcb->lcid); in RFCOMM_ConnectCnf()
196 p_mcb->lcid = lcid; in RFCOMM_ConnectCnf()
210 void RFCOMM_ConfigInd(uint16_t lcid, tL2CAP_CFG_INFO* p_cfg) { in RFCOMM_ConfigInd() argument
211 tRFC_MCB* p_mcb = rfc_find_lcid_mcb(lcid); in RFCOMM_ConfigInd()
214 RFCOMM_TRACE_ERROR("RFCOMM_ConfigInd LCID:0x%x", lcid); in RFCOMM_ConfigInd()
230 void RFCOMM_ConfigCnf(uint16_t lcid, tL2CAP_CFG_INFO* p_cfg) { in RFCOMM_ConfigCnf() argument
231 tRFC_MCB* p_mcb = rfc_find_lcid_mcb(lcid); in RFCOMM_ConfigCnf()
234 RFCOMM_TRACE_ERROR("RFCOMM_ConfigCnf no MCB LCID:0x%x", lcid); in RFCOMM_ConfigCnf()
260 void RFCOMM_DisconnectInd(uint16_t lcid, bool is_conf_needed) { in RFCOMM_DisconnectInd() argument
261 VLOG(1) << __func__ << ": lcid=" << loghex(lcid) in RFCOMM_DisconnectInd()
263 tRFC_MCB* p_mcb = rfc_find_lcid_mcb(lcid); in RFCOMM_DisconnectInd()
265 L2CA_DisconnectRsp(lcid); in RFCOMM_DisconnectInd()
268 LOG(WARNING) << __func__ << ": no mcb for lcid " << loghex(lcid); in RFCOMM_DisconnectInd()
284 void RFCOMM_BufDataInd(uint16_t lcid, BT_HDR* p_buf) { in RFCOMM_BufDataInd() argument
285 tRFC_MCB* p_mcb = rfc_find_lcid_mcb(lcid); in RFCOMM_BufDataInd()
289 << loghex(lcid); in RFCOMM_BufDataInd()
298 LOG(WARNING) << __func__ << ": Bad RFCOMM frame from lcid=" << loghex(lcid) in RFCOMM_BufDataInd()
325 << ": no for none-SABME event, lcid=" << loghex(lcid) in RFCOMM_BufDataInd()
330 << ": Disconnecting RFCOMM, lcid=" << loghex(lcid) in RFCOMM_BufDataInd()
341 << +rfc_cb.rfc.rx_frame.dlci << ", lcid=" << loghex(lcid) in RFCOMM_BufDataInd()
382 void RFCOMM_CongestionStatusInd(uint16_t lcid, bool is_congested) { in RFCOMM_CongestionStatusInd() argument
383 tRFC_MCB* p_mcb = rfc_find_lcid_mcb(lcid); in RFCOMM_CongestionStatusInd()
386 RFCOMM_TRACE_ERROR("RFCOMM_CongestionStatusInd dropped LCID:0x%x", lcid); in RFCOMM_CongestionStatusInd()
389 RFCOMM_TRACE_EVENT("RFCOMM_CongestionStatusInd LCID:0x%x", lcid); in RFCOMM_CongestionStatusInd()
401 tRFC_MCB* rfc_find_lcid_mcb(uint16_t lcid) { in rfc_find_lcid_mcb() argument
402 if (lcid - L2CAP_BASE_APPL_CID >= MAX_L2CAP_CHANNELS) { in rfc_find_lcid_mcb()
403 RFCOMM_TRACE_ERROR("rfc_find_lcid_mcb LCID:0x%x", lcid); in rfc_find_lcid_mcb()
406 tRFC_MCB* p_mcb = rfc_cb.rfc.p_rfc_lcid_mcb[lcid - L2CAP_BASE_APPL_CID]; in rfc_find_lcid_mcb()
408 if (p_mcb->lcid != lcid) { in rfc_find_lcid_mcb()
409 LOG(WARNING) << __func__ << "LCID reused lcid=:" << loghex(lcid) in rfc_find_lcid_mcb()
410 << ", current_lcid=" << loghex(p_mcb->lcid); in rfc_find_lcid_mcb()
425 void rfc_save_lcid_mcb(tRFC_MCB* p_mcb, uint16_t lcid) { in rfc_save_lcid_mcb() argument
426 if (lcid < L2CAP_BASE_APPL_CID) { in rfc_save_lcid_mcb()
427 LOG(ERROR) << __func__ << ": LCID " << lcid << " is too small"; in rfc_save_lcid_mcb()
430 auto mcb_index = static_cast<size_t>(lcid - L2CAP_BASE_APPL_CID); in rfc_save_lcid_mcb()
432 LOG(ERROR) << __func__ << ": LCID " << lcid << " is too large"; in rfc_save_lcid_mcb()