Loading system/stack/l2cap/l2c_utils.cc +24 −18 Original line number Diff line number Diff line Loading @@ -2681,23 +2681,30 @@ void l2cu_process_fixed_chnl_resp(tL2C_LCB* p_lcb) { /* Tell all registered fixed channels about the connection */ for (int xx = 0; xx < L2CAP_NUM_FIXED_CHNLS; xx++) { uint16_t channel_id = xx + L2CAP_FIRST_FIXED_CHNL; /* See BT Spec Ver 5.0 | Vol 3, Part A 2.1 table 2.1 and 2.2 */ /* skip sending LE fix channel callbacks on BR/EDR links */ if (p_lcb->transport == BT_TRANSPORT_BR_EDR && xx + L2CAP_FIRST_FIXED_CHNL >= L2CAP_ATT_CID && xx + L2CAP_FIRST_FIXED_CHNL <= L2CAP_SMP_CID) channel_id >= L2CAP_ATT_CID && channel_id <= L2CAP_SMP_CID) continue; /* skip sending BR fix channel callbacks on LE links */ if (p_lcb->transport == BT_TRANSPORT_LE && channel_id == L2CAP_SMP_BR_CID) continue; if (l2cb.fixed_reg[xx].pL2CA_FixedConn_Cb != NULL) { if (p_lcb->peer_chnl_mask[(xx + L2CAP_FIRST_FIXED_CHNL) / 8] & (1 << ((xx + L2CAP_FIRST_FIXED_CHNL) % 8))) { if (!l2cb.fixed_reg[xx].pL2CA_FixedConn_Cb) continue; if (p_lcb->peer_chnl_mask[(channel_id) / 8] & (1 << ((channel_id) % 8))) { if (p_lcb->p_fixed_ccbs[xx]) p_lcb->p_fixed_ccbs[xx]->chnl_state = CST_OPEN; (*l2cb.fixed_reg[xx].pL2CA_FixedConn_Cb)(xx + L2CAP_FIRST_FIXED_CHNL, p_lcb->remote_bd_addr, true, 0, p_lcb->transport); (*l2cb.fixed_reg[xx].pL2CA_FixedConn_Cb)( channel_id, p_lcb->remote_bd_addr, true, 0, p_lcb->transport); } else { (*l2cb.fixed_reg[xx].pL2CA_FixedConn_Cb)( xx + L2CAP_FIRST_FIXED_CHNL, p_lcb->remote_bd_addr, false, p_lcb->disc_reason, p_lcb->transport); channel_id, p_lcb->remote_bd_addr, false, p_lcb->disc_reason, p_lcb->transport); if (p_lcb->p_fixed_ccbs[xx]) { l2cu_release_ccb(p_lcb->p_fixed_ccbs[xx]); Loading @@ -2706,7 +2713,6 @@ void l2cu_process_fixed_chnl_resp(tL2C_LCB* p_lcb) { } } } } #endif /******************************************************************************* Loading Loading
system/stack/l2cap/l2c_utils.cc +24 −18 Original line number Diff line number Diff line Loading @@ -2681,23 +2681,30 @@ void l2cu_process_fixed_chnl_resp(tL2C_LCB* p_lcb) { /* Tell all registered fixed channels about the connection */ for (int xx = 0; xx < L2CAP_NUM_FIXED_CHNLS; xx++) { uint16_t channel_id = xx + L2CAP_FIRST_FIXED_CHNL; /* See BT Spec Ver 5.0 | Vol 3, Part A 2.1 table 2.1 and 2.2 */ /* skip sending LE fix channel callbacks on BR/EDR links */ if (p_lcb->transport == BT_TRANSPORT_BR_EDR && xx + L2CAP_FIRST_FIXED_CHNL >= L2CAP_ATT_CID && xx + L2CAP_FIRST_FIXED_CHNL <= L2CAP_SMP_CID) channel_id >= L2CAP_ATT_CID && channel_id <= L2CAP_SMP_CID) continue; /* skip sending BR fix channel callbacks on LE links */ if (p_lcb->transport == BT_TRANSPORT_LE && channel_id == L2CAP_SMP_BR_CID) continue; if (l2cb.fixed_reg[xx].pL2CA_FixedConn_Cb != NULL) { if (p_lcb->peer_chnl_mask[(xx + L2CAP_FIRST_FIXED_CHNL) / 8] & (1 << ((xx + L2CAP_FIRST_FIXED_CHNL) % 8))) { if (!l2cb.fixed_reg[xx].pL2CA_FixedConn_Cb) continue; if (p_lcb->peer_chnl_mask[(channel_id) / 8] & (1 << ((channel_id) % 8))) { if (p_lcb->p_fixed_ccbs[xx]) p_lcb->p_fixed_ccbs[xx]->chnl_state = CST_OPEN; (*l2cb.fixed_reg[xx].pL2CA_FixedConn_Cb)(xx + L2CAP_FIRST_FIXED_CHNL, p_lcb->remote_bd_addr, true, 0, p_lcb->transport); (*l2cb.fixed_reg[xx].pL2CA_FixedConn_Cb)( channel_id, p_lcb->remote_bd_addr, true, 0, p_lcb->transport); } else { (*l2cb.fixed_reg[xx].pL2CA_FixedConn_Cb)( xx + L2CAP_FIRST_FIXED_CHNL, p_lcb->remote_bd_addr, false, p_lcb->disc_reason, p_lcb->transport); channel_id, p_lcb->remote_bd_addr, false, p_lcb->disc_reason, p_lcb->transport); if (p_lcb->p_fixed_ccbs[xx]) { l2cu_release_ccb(p_lcb->p_fixed_ccbs[xx]); Loading @@ -2706,7 +2713,6 @@ void l2cu_process_fixed_chnl_resp(tL2C_LCB* p_lcb) { } } } } #endif /******************************************************************************* Loading