summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrerepa Viswanadham <dham@google.com>2014-10-23 13:50:57 -0700
committerThe Android Automerger <android-build@google.com>2014-10-29 13:29:45 -0700
commit352e2a2ec30f651bf69c6f947c5c4531f945a495 (patch)
tree09aa3fc083fad5f2715fb726b1478761073b8383
parentda9b0f84cb53ad02386149f09ffec111903bcca0 (diff)
downloadbluedroid-352e2a2ec30f651bf69c6f947c5c4531f945a495.tar.gz
Don't starve a BT ACL link with 0 xmit quotaandroid-5.0.0_r4android-5.0.0_r3android-5.0.0_r2
With new link management of controller buffers between different ACL connections, it is possible that a ACL conn would get 0 buffers - thus no profile can run. This affects classic and LE ACL connections. This work around allows a floor of 1 buffer as the floor for all connection, irrespective of controller capability. Bug: 17976311 Change-Id: I7cd0d34af47c441c5ea7f2b836b591a4fec62ad1
-rw-r--r--stack/l2cap/l2c_ble.c4
-rw-r--r--stack/l2cap/l2c_link.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/stack/l2cap/l2c_ble.c b/stack/l2cap/l2c_ble.c
index a132775..75a2bfb 100644
--- a/stack/l2cap/l2c_ble.c
+++ b/stack/l2cap/l2c_ble.c
@@ -836,7 +836,7 @@ void l2c_ble_link_adjust_allocation (void)
if (num_lowpri_links > low_quota)
{
l2cb.ble_round_robin_quota = low_quota;
- qq = qq_remainder = 0;
+ qq = qq_remainder = 1;
}
/* If each low priority link can have at least one buffer */
else if (num_lowpri_links > 0)
@@ -851,7 +851,7 @@ void l2c_ble_link_adjust_allocation (void)
{
l2cb.ble_round_robin_quota = 0;
l2cb.ble_round_robin_unacked = 0;
- qq = qq_remainder = 0;
+ qq = qq_remainder = 1;
}
L2CAP_TRACE_EVENT ("l2c_ble_link_adjust_allocation num_hipri: %u num_lowpri: %u low_quota: %u round_robin_quota: %u qq: %u",
num_hipri_links, num_lowpri_links, low_quota,
diff --git a/stack/l2cap/l2c_link.c b/stack/l2cap/l2c_link.c
index aa8f66c..5ee5faa 100644
--- a/stack/l2cap/l2c_link.c
+++ b/stack/l2cap/l2c_link.c
@@ -743,7 +743,7 @@ void l2c_link_adjust_allocation (void)
if (num_lowpri_links > low_quota)
{
l2cb.round_robin_quota = low_quota;
- qq = qq_remainder = 0;
+ qq = qq_remainder = 1;
}
/* If each low priority link can have at least one buffer */
else if (num_lowpri_links > 0)
@@ -758,7 +758,7 @@ void l2c_link_adjust_allocation (void)
{
l2cb.round_robin_quota = 0;
l2cb.round_robin_unacked = 0;
- qq = qq_remainder = 0;
+ qq = qq_remainder = 1;
}
L2CAP_TRACE_EVENT ("l2c_link_adjust_allocation num_hipri: %u num_lowpri: %u low_quota: %u round_robin_quota: %u qq: %u",