Loading system/stack/l2cap/l2c_int.h +0 −7 Original line number Diff line number Diff line Loading @@ -523,13 +523,6 @@ typedef struct { typedef void(tL2C_FCR_MGMT_EVT_HDLR)(uint8_t, tL2C_CCB*); /* Necessary info for postponed TX completion callback */ typedef struct { uint16_t local_cid; uint16_t num_sdu; } tL2C_TX_COMPLETE_CB_INFO; /* The offset in a buffer that L2CAP will use when building commands. */ #define L2CAP_SEND_CMD_OFFSET 0 Loading system/stack/l2cap/l2c_link.cc +10 −20 Original line number Diff line number Diff line Loading @@ -39,10 +39,8 @@ void btm_sco_acl_removed(const RawAddress* bda); void btm_ble_decrement_link_topology_mask(uint8_t link_role); static void l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf, tL2C_TX_COMPLETE_CB_INFO* p_cbi); static BT_HDR* l2cu_get_next_buffer_to_send(tL2C_LCB* p_lcb, tL2C_TX_COMPLETE_CB_INFO* p_cbi); static void l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf); static BT_HDR* l2cu_get_next_buffer_to_send(tL2C_LCB* p_lcb); /******************************************************************************* * Loading Loading @@ -918,17 +916,16 @@ void l2c_link_check_send_pkts(tL2C_LCB* p_lcb, uint16_t local_cid, if (!list_is_empty(p_lcb->link_xmit_data_q)) { p_buf = (BT_HDR*)list_front(p_lcb->link_xmit_data_q); list_remove(p_lcb->link_xmit_data_q, p_buf); l2c_link_send_to_lower(p_lcb, p_buf, NULL); l2c_link_send_to_lower(p_lcb, p_buf); } else if (single_write) { /* If only doing one write, break out */ break; } /* If nothing on the link queue, check the channel queue */ else { tL2C_TX_COMPLETE_CB_INFO cbi; p_buf = l2cu_get_next_buffer_to_send(p_lcb, &cbi); p_buf = l2cu_get_next_buffer_to_send(p_lcb); if (p_buf != NULL) { l2c_link_send_to_lower(p_lcb, p_buf, &cbi); l2c_link_send_to_lower(p_lcb, p_buf); } } } Loading Loading @@ -961,7 +958,7 @@ void l2c_link_check_send_pkts(tL2C_LCB* p_lcb, uint16_t local_cid, p_buf = (BT_HDR*)list_front(p_lcb->link_xmit_data_q); list_remove(p_lcb->link_xmit_data_q, p_buf); l2c_link_send_to_lower(p_lcb, p_buf, NULL); l2c_link_send_to_lower(p_lcb, p_buf); } if (!single_write) { Loading @@ -971,11 +968,10 @@ void l2c_link_check_send_pkts(tL2C_LCB* p_lcb, uint16_t local_cid, (l2cb.controller_le_xmit_window != 0 && (p_lcb->transport == BT_TRANSPORT_LE))) && (p_lcb->sent_not_acked < p_lcb->link_xmit_quota)) { tL2C_TX_COMPLETE_CB_INFO cbi; p_buf = l2cu_get_next_buffer_to_send(p_lcb, &cbi); p_buf = l2cu_get_next_buffer_to_send(p_lcb); if (p_buf == NULL) break; l2c_link_send_to_lower(p_lcb, p_buf, &cbi); l2c_link_send_to_lower(p_lcb, p_buf); } } Loading Loading @@ -1105,8 +1101,7 @@ static void l2c_link_send_to_lower_ble(tL2C_LCB* p_lcb, BT_HDR* p_buf) { l2cb.ble_round_robin_unacked); } static void l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf, tL2C_TX_COMPLETE_CB_INFO* p_cbi) { static void l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf) { if (p_lcb->transport == BT_TRANSPORT_BR_EDR) { l2c_link_send_to_lower_br_edr(p_lcb, p_buf); } else { Loading Loading @@ -1393,8 +1388,7 @@ tL2C_CCB* l2cu_get_next_channel_in_rr(tL2C_LCB* p_lcb) { * Returns pointer to buffer or NULL * ******************************************************************************/ BT_HDR* l2cu_get_next_buffer_to_send(tL2C_LCB* p_lcb, tL2C_TX_COMPLETE_CB_INFO* p_cbi) { BT_HDR* l2cu_get_next_buffer_to_send(tL2C_LCB* p_lcb) { tL2C_CCB* p_ccb; BT_HDR* p_buf; Loading Loading @@ -1433,10 +1427,6 @@ BT_HDR* l2cu_get_next_buffer_to_send(tL2C_LCB* p_lcb, return (NULL); } /* Prepare callback info for TX completion */ p_cbi->local_cid = p_ccb->local_cid; p_cbi->num_sdu = 1; l2cu_check_channel_congestion(p_ccb); l2cu_set_acl_hci_header(p_buf, p_ccb); return (p_buf); Loading Loading
system/stack/l2cap/l2c_int.h +0 −7 Original line number Diff line number Diff line Loading @@ -523,13 +523,6 @@ typedef struct { typedef void(tL2C_FCR_MGMT_EVT_HDLR)(uint8_t, tL2C_CCB*); /* Necessary info for postponed TX completion callback */ typedef struct { uint16_t local_cid; uint16_t num_sdu; } tL2C_TX_COMPLETE_CB_INFO; /* The offset in a buffer that L2CAP will use when building commands. */ #define L2CAP_SEND_CMD_OFFSET 0 Loading
system/stack/l2cap/l2c_link.cc +10 −20 Original line number Diff line number Diff line Loading @@ -39,10 +39,8 @@ void btm_sco_acl_removed(const RawAddress* bda); void btm_ble_decrement_link_topology_mask(uint8_t link_role); static void l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf, tL2C_TX_COMPLETE_CB_INFO* p_cbi); static BT_HDR* l2cu_get_next_buffer_to_send(tL2C_LCB* p_lcb, tL2C_TX_COMPLETE_CB_INFO* p_cbi); static void l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf); static BT_HDR* l2cu_get_next_buffer_to_send(tL2C_LCB* p_lcb); /******************************************************************************* * Loading Loading @@ -918,17 +916,16 @@ void l2c_link_check_send_pkts(tL2C_LCB* p_lcb, uint16_t local_cid, if (!list_is_empty(p_lcb->link_xmit_data_q)) { p_buf = (BT_HDR*)list_front(p_lcb->link_xmit_data_q); list_remove(p_lcb->link_xmit_data_q, p_buf); l2c_link_send_to_lower(p_lcb, p_buf, NULL); l2c_link_send_to_lower(p_lcb, p_buf); } else if (single_write) { /* If only doing one write, break out */ break; } /* If nothing on the link queue, check the channel queue */ else { tL2C_TX_COMPLETE_CB_INFO cbi; p_buf = l2cu_get_next_buffer_to_send(p_lcb, &cbi); p_buf = l2cu_get_next_buffer_to_send(p_lcb); if (p_buf != NULL) { l2c_link_send_to_lower(p_lcb, p_buf, &cbi); l2c_link_send_to_lower(p_lcb, p_buf); } } } Loading Loading @@ -961,7 +958,7 @@ void l2c_link_check_send_pkts(tL2C_LCB* p_lcb, uint16_t local_cid, p_buf = (BT_HDR*)list_front(p_lcb->link_xmit_data_q); list_remove(p_lcb->link_xmit_data_q, p_buf); l2c_link_send_to_lower(p_lcb, p_buf, NULL); l2c_link_send_to_lower(p_lcb, p_buf); } if (!single_write) { Loading @@ -971,11 +968,10 @@ void l2c_link_check_send_pkts(tL2C_LCB* p_lcb, uint16_t local_cid, (l2cb.controller_le_xmit_window != 0 && (p_lcb->transport == BT_TRANSPORT_LE))) && (p_lcb->sent_not_acked < p_lcb->link_xmit_quota)) { tL2C_TX_COMPLETE_CB_INFO cbi; p_buf = l2cu_get_next_buffer_to_send(p_lcb, &cbi); p_buf = l2cu_get_next_buffer_to_send(p_lcb); if (p_buf == NULL) break; l2c_link_send_to_lower(p_lcb, p_buf, &cbi); l2c_link_send_to_lower(p_lcb, p_buf); } } Loading Loading @@ -1105,8 +1101,7 @@ static void l2c_link_send_to_lower_ble(tL2C_LCB* p_lcb, BT_HDR* p_buf) { l2cb.ble_round_robin_unacked); } static void l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf, tL2C_TX_COMPLETE_CB_INFO* p_cbi) { static void l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf) { if (p_lcb->transport == BT_TRANSPORT_BR_EDR) { l2c_link_send_to_lower_br_edr(p_lcb, p_buf); } else { Loading Loading @@ -1393,8 +1388,7 @@ tL2C_CCB* l2cu_get_next_channel_in_rr(tL2C_LCB* p_lcb) { * Returns pointer to buffer or NULL * ******************************************************************************/ BT_HDR* l2cu_get_next_buffer_to_send(tL2C_LCB* p_lcb, tL2C_TX_COMPLETE_CB_INFO* p_cbi) { BT_HDR* l2cu_get_next_buffer_to_send(tL2C_LCB* p_lcb) { tL2C_CCB* p_ccb; BT_HDR* p_buf; Loading Loading @@ -1433,10 +1427,6 @@ BT_HDR* l2cu_get_next_buffer_to_send(tL2C_LCB* p_lcb, return (NULL); } /* Prepare callback info for TX completion */ p_cbi->local_cid = p_ccb->local_cid; p_cbi->num_sdu = 1; l2cu_check_channel_congestion(p_ccb); l2cu_set_acl_hci_header(p_buf, p_ccb); return (p_buf); Loading