system/bt
修订版 | 269a25986877d639136eedf8d9ebb999461ab21d (tree) |
---|---|
时间 | 2019-09-01 08:12:45 |
作者 | android-build-team Robot <android-build-team-robot@goog...> |
Commiter | android-build-team Robot |
Snap for 5845810 from 7080584a1b69931dc069bf17a5942d66285d409c to qt-qpr1-release
Change-Id: I2d8f696e16dad9b066cda7abd464ef7404495a8f
@@ -823,6 +823,9 @@ static void gatt_send_conn_cback(tGATT_TCB* p_tcb) { | ||
823 | 823 | } |
824 | 824 | } |
825 | 825 | |
826 | + /* Remove the direct connection */ | |
827 | + connection_manager::on_connection_complete(p_tcb->peer_bda); | |
828 | + | |
826 | 829 | if (!p_tcb->app_hold_link.empty() && p_tcb->att_lcid == L2CAP_ATT_CID) { |
827 | 830 | /* disable idle timeout if one or more clients are holding the link disable |
828 | 831 | * the idle timer */ |
@@ -675,6 +675,8 @@ void l2c_link_adjust_allocation(void) { | ||
675 | 675 | uint16_t num_hipri_links = 0; |
676 | 676 | uint16_t controller_xmit_quota = l2cb.num_lm_acl_bufs; |
677 | 677 | uint16_t high_pri_link_quota = L2CAP_HIGH_PRI_MIN_XMIT_QUOTA_A; |
678 | + bool is_share_buffer = | |
679 | + (l2cb.num_lm_ble_bufs == L2C_DEF_NUM_BLE_BUF_SHARED) ? true : false; | |
678 | 680 | |
679 | 681 | /* If no links active, reset buffer quotas and controller buffers */ |
680 | 682 | if (l2cb.num_links_active == 0) { |
@@ -685,7 +687,8 @@ void l2c_link_adjust_allocation(void) { | ||
685 | 687 | |
686 | 688 | /* First, count the links */ |
687 | 689 | for (yy = 0, p_lcb = &l2cb.lcb_pool[0]; yy < MAX_L2CAP_LINKS; yy++, p_lcb++) { |
688 | - if (p_lcb->in_use) { | |
690 | + if (p_lcb->in_use && | |
691 | + (is_share_buffer || p_lcb->transport != BT_TRANSPORT_LE)) { | |
689 | 692 | if (p_lcb->acl_priority == L2CAP_PRIORITY_HIGH) |
690 | 693 | num_hipri_links++; |
691 | 694 | else |
@@ -732,7 +735,8 @@ void l2c_link_adjust_allocation(void) { | ||
732 | 735 | |
733 | 736 | /* Now, assign the quotas to each link */ |
734 | 737 | for (yy = 0, p_lcb = &l2cb.lcb_pool[0]; yy < MAX_L2CAP_LINKS; yy++, p_lcb++) { |
735 | - if (p_lcb->in_use) { | |
738 | + if (p_lcb->in_use && | |
739 | + (is_share_buffer || p_lcb->transport != BT_TRANSPORT_LE)) { | |
736 | 740 | if (p_lcb->acl_priority == L2CAP_PRIORITY_HIGH) { |
737 | 741 | p_lcb->link_xmit_quota = high_pri_link_quota; |
738 | 742 | } else { |