This is an automated email from the ASF dual-hosted git repository.

jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 1d8397a36d4fc18541626bab6b8afc98733103b6
Author: Xiang Xiao <[email protected]>
AuthorDate: Sun Dec 27 15:48:31 2020 +0800

    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 <[email protected]>
---
 drivers/wireless/bluetooth/bt_uart.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/wireless/bluetooth/bt_uart.c 
b/drivers/wireless/bluetooth/bt_uart.c
index 3cb1ed7..57b5dca 100644
--- a/drivers/wireless/bluetooth/bt_uart.c
+++ b/drivers/wireless/bluetooth/bt_uart.c
@@ -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);

Reply via email to