summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--stack/l2cap/l2c_link.c9
-rw-r--r--stack/l2cap/l2c_utils.c6
2 files changed, 15 insertions, 0 deletions
diff --git a/stack/l2cap/l2c_link.c b/stack/l2cap/l2c_link.c
index 438ae0583..1432b1ae6 100644
--- a/stack/l2cap/l2c_link.c
+++ b/stack/l2cap/l2c_link.c
@@ -85,6 +85,7 @@ BOOLEAN hci_blacklistted_for_role_switch (BD_ADDR addr)
return FALSE;
}
+#define HI_PRI_LINK_QUOTA 2 //Mininum ACL buffer quota for high priority link
/*******************************************************************************
**
** Function l2c_link_hci_conn_req
@@ -898,6 +899,14 @@ void l2c_link_adjust_allocation (void)
while ( (num_hipri_links * high_pri_link_quota + low_quota) > controller_xmit_quota )
high_pri_link_quota--;
+ /*Adjust high pri link with min 3 buffers*/
+ if(num_hipri_links > 0)
+ {
+ if(high_pri_link_quota < HI_PRI_LINK_QUOTA)
+ {
+ high_pri_link_quota = HI_PRI_LINK_QUOTA;
+ }
+ }
/* Work out the xmit quota and buffer quota high and low priorities */
hi_quota = num_hipri_links * high_pri_link_quota;
low_quota = (hi_quota < controller_xmit_quota) ? controller_xmit_quota - hi_quota : 1;
diff --git a/stack/l2cap/l2c_utils.c b/stack/l2cap/l2c_utils.c
index dafe34498..5bf11556d 100644
--- a/stack/l2cap/l2c_utils.c
+++ b/stack/l2cap/l2c_utils.c
@@ -2613,6 +2613,12 @@ BOOLEAN l2cu_set_acl_priority (BD_ADDR bd_addr, UINT8 priority, BOOLEAN reset_af
return (FALSE);
}
+ if (p_lcb->acl_priority != priority)
+ {
+ p_lcb->acl_priority = priority;
+ l2c_link_adjust_allocation();
+ }
+
if (BTM_IS_BRCM_CONTROLLER())
{
/* Called from above L2CAP through API; send VSC if changed */