summaryrefslogtreecommitdiffstats
path: root/stack/l2cap/l2c_link.c
diff options
context:
space:
mode:
authorGanesh Ganapathi Batta <ganeshg@broadcom.com>2013-04-16 11:57:07 -0700
committerMatthew Xie <mattx@google.com>2013-04-17 21:07:27 -0700
commitc9053e64bd3383ea971582b4395fab9d5d614503 (patch)
treee7108618c51753c857aa963896a111ed0545b2fc /stack/l2cap/l2c_link.c
parent74b826399b0ce0d13e8cea3e44c058495b3d6abc (diff)
downloadandroid_system_bt-c9053e64bd3383ea971582b4395fab9d5d614503.tar.gz
android_system_bt-c9053e64bd3383ea971582b4395fab9d5d614503.tar.bz2
android_system_bt-c9053e64bd3383ea971582b4395fab9d5d614503.zip
Proper management of controller ACL buffers.
Reclaim all the unacknowledged controller ACL buffers associated with a L2CAP link when L2CAP control block is released. Bug:8589069 Change-Id: Icef1646041e73280a13dedc7a45564d032c59712
Diffstat (limited to 'stack/l2cap/l2c_link.c')
-rw-r--r--stack/l2cap/l2c_link.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/stack/l2cap/l2c_link.c b/stack/l2cap/l2c_link.c
index 4bb2be7e2..1974bb28d 100644
--- a/stack/l2cap/l2c_link.c
+++ b/stack/l2cap/l2c_link.c
@@ -1394,19 +1394,19 @@ void l2c_link_process_num_completed_pkts (UINT8 *p)
(*p_lcb->p_nocp_cb)(p_lcb->remote_bd_addr);
}
-#if (BLE_INCLUDED == TRUE)
- if (p_lcb && p_lcb->is_ble_link)
- l2cb.controller_le_xmit_window += num_sent;
- else
-#endif
- {
-
- /* Maintain the total window to the controller */
- l2cb.controller_xmit_window += num_sent;
- }
-
if (p_lcb)
{
+#if (BLE_INCLUDED == TRUE)
+ if (p_lcb->is_ble_link)
+ {
+ l2cb.controller_le_xmit_window += num_sent;
+ }
+ else
+#endif
+ {
+ /* Maintain the total window to the controller */
+ l2cb.controller_xmit_window += num_sent;
+ }
/* If doing round-robin, adjust communal counts */
if (p_lcb->link_xmit_quota == 0)
{