bt_uart: Don't call rxdrain in the successful path

because the physical uart bus may receive the next packet asynchronously

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2020-12-27 15:48:31 +08:00
committed by Alin Jerpelea
parent ca5d8d8660
commit 1d8397a36d
-8
View File
@@ -255,14 +255,6 @@ static void btuart_rxwork(FAR void *arg)
wlinfo("Full packet received\n");
/* Drain any un-read bytes from the Rx buffer */
nread = lower->rxdrain(lower);
if (nread > 0)
{
wlwarn("WARNING: Discarded %ld bytes\n", (long)nread);
}
/* Pass buffer to the stack */
BT_DUMP("Received", buf->data, buf->len);