summaryrefslogtreecommitdiffstats
path: root/stack/rfcomm/port_api.c
diff options
context:
space:
mode:
authorZhenye Zhu <zhenye@broadcom.com>2014-09-17 16:59:52 -0700
committerMatthew Xie <mattx@google.com>2014-09-18 16:01:57 -0700
commitb4a53ec6e9aa106168836f9f2874610814b74363 (patch)
tree3ddafaef2e70fe1892c17f266f9fe1ec0c36e277 /stack/rfcomm/port_api.c
parent13e916d7e120796a45f3bf109ff959d7f4c42f0f (diff)
downloadandroid_system_bt-b4a53ec6e9aa106168836f9f2874610814b74363.tar.gz
android_system_bt-b4a53ec6e9aa106168836f9f2874610814b74363.tar.bz2
android_system_bt-b4a53ec6e9aa106168836f9f2874610814b74363.zip
Enable flow control when tx buffer is full and
peer stuck in receiving bug 17525124 Change-Id:Ic67e9c0aab7e64afc9679733e6c3de10a28078d7
Diffstat (limited to 'stack/rfcomm/port_api.c')
-rw-r--r--stack/rfcomm/port_api.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/stack/rfcomm/port_api.c b/stack/rfcomm/port_api.c
index c629527f4..364308838 100644
--- a/stack/rfcomm/port_api.c
+++ b/stack/rfcomm/port_api.c
@@ -1561,7 +1561,13 @@ int PORT_WriteDataCO (UINT16 handle, int* p_len)
/* if we're over buffer high water mark, we're done */
if ((p_port->tx.queue_size > PORT_TX_HIGH_WM)
|| (p_port->tx.queue.count > PORT_TX_BUF_HIGH_WM))
+ {
+ port_flow_control_user(p_port);
+ event |= PORT_EV_FC;
+ debug("tx queue is full,tx.queue_size:%d,tx.queue.count:%d,available:%d",
+ p_port->tx.queue_size, p_port->tx.queue.count, available);
break;
+ }
/* continue with rfcomm data write */
p_buf = (BT_HDR *)GKI_getpoolbuf (RFCOMM_DATA_POOL_ID);