Lines Matching refs:fixed_cid
45 tBT_TRANSPORT l2c_get_transport_from_fixed_cid(uint16_t fixed_cid) { in l2c_get_transport_from_fixed_cid() argument
46 if (fixed_cid >= L2CAP_ATT_CID && fixed_cid <= L2CAP_SMP_CID) in l2c_get_transport_from_fixed_cid()
1096 static std::string fixed_channel_text(const uint16_t& fixed_cid) { in fixed_channel_text() argument
1097 switch (fixed_cid) { in fixed_channel_text()
1117 bool L2CA_RegisterFixedChannel(uint16_t fixed_cid, in L2CA_RegisterFixedChannel() argument
1120 return bluetooth::shim::L2CA_RegisterFixedChannel(fixed_cid, p_freg); in L2CA_RegisterFixedChannel()
1123 if ((fixed_cid < L2CAP_FIRST_FIXED_CHNL) || in L2CA_RegisterFixedChannel()
1124 (fixed_cid > L2CAP_LAST_FIXED_CHNL)) { in L2CA_RegisterFixedChannel()
1125 LOG_ERROR("Invalid fixed CID: 0x%04x", fixed_cid); in L2CA_RegisterFixedChannel()
1129 l2cb.fixed_reg[fixed_cid - L2CAP_FIRST_FIXED_CHNL] = *p_freg; in L2CA_RegisterFixedChannel()
1131 fixed_channel_text(fixed_cid).c_str()); in L2CA_RegisterFixedChannel()
1147 bool L2CA_ConnectFixedChnl(uint16_t fixed_cid, const RawAddress& rem_bda) { in L2CA_ConnectFixedChnl() argument
1149 return bluetooth::shim::L2CA_ConnectFixedChnl(fixed_cid, rem_bda); in L2CA_ConnectFixedChnl()
1155 LOG_DEBUG(" fixed_cid:0x%04x", fixed_cid); in L2CA_ConnectFixedChnl()
1158 if ((fixed_cid < L2CAP_FIRST_FIXED_CHNL) || in L2CA_ConnectFixedChnl()
1159 (fixed_cid > L2CAP_LAST_FIXED_CHNL) || in L2CA_ConnectFixedChnl()
1160 (l2cb.fixed_reg[fixed_cid - L2CAP_FIRST_FIXED_CHNL].pL2CA_FixedData_Cb == in L2CA_ConnectFixedChnl()
1162 LOG_ERROR("Invalid fixed_cid:0x%04x", fixed_cid); in L2CA_ConnectFixedChnl()
1168 LOG_WARN("Bt controller is not ready fixed_cid:0x%04x", fixed_cid); in L2CA_ConnectFixedChnl()
1172 if (fixed_cid >= L2CAP_ATT_CID && fixed_cid <= L2CAP_SMP_CID) in L2CA_ConnectFixedChnl()
1189 if (!(peer_channel_mask & (1 << fixed_cid))) { in L2CA_ConnectFixedChnl()
1190 LOG_INFO("Peer device does not support fixed_cid:0x%04x", fixed_cid); in L2CA_ConnectFixedChnl()
1195 if (!l2cu_initialize_fixed_ccb(p_lcb, fixed_cid)) { in L2CA_ConnectFixedChnl()
1197 fixed_cid); in L2CA_ConnectFixedChnl()
1205 fixed_cid); in L2CA_ConnectFixedChnl()
1208 p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]; in L2CA_ConnectFixedChnl()
1212 (*l2cb.fixed_reg[fixed_cid - L2CAP_FIRST_FIXED_CHNL].pL2CA_FixedConn_Cb)( in L2CA_ConnectFixedChnl()
1213 fixed_cid, p_lcb->remote_bd_addr, true, 0, p_lcb->transport); in L2CA_ConnectFixedChnl()
1221 fixed_cid); in L2CA_ConnectFixedChnl()
1226 if (!l2cu_initialize_fixed_ccb(p_lcb, fixed_cid)) { in L2CA_ConnectFixedChnl()
1228 fixed_cid); in L2CA_ConnectFixedChnl()
1237 fixed_cid); in L2CA_ConnectFixedChnl()
1261 uint16_t L2CA_SendFixedChnlData(uint16_t fixed_cid, const RawAddress& rem_bda, in L2CA_SendFixedChnlData() argument
1264 return bluetooth::shim::L2CA_SendFixedChnlData(fixed_cid, rem_bda, p_buf); in L2CA_SendFixedChnlData()
1270 if (fixed_cid >= L2CAP_ATT_CID && fixed_cid <= L2CAP_SMP_CID) in L2CA_SendFixedChnlData()
1273 if ((fixed_cid < L2CAP_FIRST_FIXED_CHNL) || in L2CA_SendFixedChnlData()
1274 (fixed_cid > L2CAP_LAST_FIXED_CHNL) || in L2CA_SendFixedChnlData()
1275 (l2cb.fixed_reg[fixed_cid - L2CAP_FIRST_FIXED_CHNL].pL2CA_FixedData_Cb == in L2CA_SendFixedChnlData()
1277 LOG_WARN("No service registered or invalid CID: 0x%04x", fixed_cid); in L2CA_SendFixedChnlData()
1283 LOG_WARN("Controller is not ready CID: 0x%04x", fixed_cid); in L2CA_SendFixedChnlData()
1291 LOG_WARN("Link is disconnecting or does not exist CID: 0x%04x", fixed_cid); in L2CA_SendFixedChnlData()
1304 if ((peer_channel_mask & (1 << fixed_cid)) == 0) { in L2CA_SendFixedChnlData()
1305 LOG_WARN("Peer does not support fixed channel CID: 0x%04x", fixed_cid); in L2CA_SendFixedChnlData()
1313 if (!p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]) { in L2CA_SendFixedChnlData()
1314 if (!l2cu_initialize_fixed_ccb(p_lcb, fixed_cid)) { in L2CA_SendFixedChnlData()
1315 LOG_WARN("No channel control block found for CID: 0x%4x", fixed_cid); in L2CA_SendFixedChnlData()
1321 if (p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]->cong_sent) { in L2CA_SendFixedChnlData()
1325 fixed_cid, in L2CA_SendFixedChnlData()
1327 p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL] in L2CA_SendFixedChnlData()
1329 p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]->buff_quota); in L2CA_SendFixedChnlData()
1334 LOG_DEBUG("Enqueued data for CID: 0x%04x len:%hu", fixed_cid, p_buf->len); in L2CA_SendFixedChnlData()
1335 l2c_enqueue_peer_data(p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL], in L2CA_SendFixedChnlData()
1347 if (p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]->cong_sent) { in L2CA_SendFixedChnlData()
1348 LOG_DEBUG("Link congested for CID: 0x%04x", fixed_cid); in L2CA_SendFixedChnlData()
1368 bool L2CA_RemoveFixedChnl(uint16_t fixed_cid, const RawAddress& rem_bda) { in L2CA_RemoveFixedChnl() argument
1370 return bluetooth::shim::L2CA_RemoveFixedChnl(fixed_cid, rem_bda); in L2CA_RemoveFixedChnl()
1378 if ((fixed_cid < L2CAP_FIRST_FIXED_CHNL) || in L2CA_RemoveFixedChnl()
1379 (fixed_cid > L2CAP_LAST_FIXED_CHNL) || in L2CA_RemoveFixedChnl()
1380 (l2cb.fixed_reg[fixed_cid - L2CAP_FIRST_FIXED_CHNL].pL2CA_FixedData_Cb == in L2CA_RemoveFixedChnl()
1382 L2CAP_TRACE_ERROR("L2CA_RemoveFixedChnl() Invalid CID: 0x%04x", fixed_cid); in L2CA_RemoveFixedChnl()
1386 if (fixed_cid >= L2CAP_ATT_CID && fixed_cid <= L2CAP_SMP_CID) in L2CA_RemoveFixedChnl()
1393 (!p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL])) { in L2CA_RemoveFixedChnl()
1395 << StringPrintf(" CID: 0x%04x not connected", fixed_cid); in L2CA_RemoveFixedChnl()
1400 << StringPrintf(" CID: 0x%04x", fixed_cid); in L2CA_RemoveFixedChnl()
1404 p_ccb = p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]; in L2CA_RemoveFixedChnl()
1406 p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL] = NULL; in L2CA_RemoveFixedChnl()
1415 if ((fixed_cid == L2CAP_ATT_CID) && !p_lcb->ccb_queue.p_first_ccb) in L2CA_RemoveFixedChnl()