Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4c61ead authored by Matthew Xie's avatar Matthew Xie Committed by Android Git Automerger
Browse files

am 153f2e0e: Merge "Enable flow control when tx buffer is full and peer stuck...

am 153f2e0e: Merge "Enable flow control when tx buffer is full and peer stuck in receiving" into lmp-dev

* commit '153f2e0e':
  Enable flow control when tx buffer is full and peer stuck in receiving
parents 01dc1c63 153f2e0e
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -1561,7 +1561,13 @@ int PORT_WriteDataCO (UINT16 handle, int* p_len)
        /* if we're over buffer high water mark, we're done */
        /* if we're over buffer high water mark, we're done */
        if ((p_port->tx.queue_size  > PORT_TX_HIGH_WM)
        if ((p_port->tx.queue_size  > PORT_TX_HIGH_WM)
         || (p_port->tx.queue.count > PORT_TX_BUF_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;
            break;
         }


        /* continue with rfcomm data write */
        /* continue with rfcomm data write */
        p_buf = (BT_HDR *)GKI_getpoolbuf (RFCOMM_DATA_POOL_ID);
        p_buf = (BT_HDR *)GKI_getpoolbuf (RFCOMM_DATA_POOL_ID);