From 68a040a5d282aa088771082bc16a25aa995e2ae7 Mon Sep 17 00:00:00 2001 From: Chris Manton Date: Mon, 24 Aug 2020 14:33:28 -0700 Subject: [PATCH] Use Api stack/acl/btm_acl::acl_send_data_packet Provide separate br_edr and ble entry points Towards proper interfaces Bug: 163134718 Tag: #refactor Test: compile & verify basic functions working Change-Id: I1ea5899d17a5e0977b263957a4e466aee80cff9f --- stack/l2cap/l2c_link.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/stack/l2cap/l2c_link.cc b/stack/l2cap/l2c_link.cc index 11d9ef568..1c697c09e 100644 --- a/stack/l2cap/l2c_link.cc +++ b/stack/l2cap/l2c_link.cc @@ -1015,10 +1015,6 @@ void l2c_OnHciModeChangeSendPendingPackets(RawAddress remote) { * Description This function queues the buffer for HCI transmission * ******************************************************************************/ -constexpr uint16_t kDataPacketEventBrEdr = (BT_EVT_TO_LM_HCI_ACL); -constexpr uint16_t kDataPacketEventBle = - (BT_EVT_TO_LM_HCI_ACL | LOCAL_BLE_CONTROLLER_ID); - static void l2c_link_send_to_lower_br_edr(tL2C_LCB* p_lcb, BT_HDR* p_buf) { const uint16_t acl_packet_size_classic = controller_get_interface()->get_acl_packet_size_classic(); @@ -1060,7 +1056,7 @@ static void l2c_link_send_to_lower_br_edr(tL2C_LCB* p_lcb, BT_HDR* p_buf) { l2cb.controller_xmit_window -= num_segs; if (p_lcb->link_xmit_quota == 0) l2cb.round_robin_unacked += num_segs; } - acl_send_data_packet(p_buf, kDataPacketEventBrEdr); + acl_send_data_packet_br_edr(p_lcb->remote_bd_addr, p_buf); L2CAP_TRACE_DEBUG( "TotalWin=%d,Hndl=0x%x,Quota=%d,Unack=%d,RRQuota=%d,RRUnack=%d", l2cb.controller_xmit_window, p_lcb->Handle(), p_lcb->link_xmit_quota, @@ -1107,7 +1103,7 @@ static void l2c_link_send_to_lower_ble(tL2C_LCB* p_lcb, BT_HDR* p_buf) { l2cb.controller_le_xmit_window -= num_segs; if (p_lcb->link_xmit_quota == 0) l2cb.ble_round_robin_unacked += num_segs; } - acl_send_data_packet(p_buf, kDataPacketEventBle); + acl_send_data_packet_ble(p_lcb->remote_bd_addr, p_buf); L2CAP_TRACE_DEBUG( "TotalWin=%d,Hndl=0x%x,Quota=%d,Unack=%d,RRQuota=%d,RRUnack=%d", l2cb.controller_le_xmit_window, p_lcb->Handle(), p_lcb->link_xmit_quota, -- 2.11.0