From 53a8cb734b45605cf50f91a7aedc150ac7acdab8 Mon Sep 17 00:00:00 2001 From: Simon Piriou Date: Sat, 22 Jul 2017 08:57:10 -0600 Subject: [PATCH] sim arch: poll for TX frames to speed up driver --- arch/sim/src/up_netdriver.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/sim/src/up_netdriver.c b/arch/sim/src/up_netdriver.c index bdd39ff2bc..3547cf0f50 100644 --- a/arch/sim/src/up_netdriver.c +++ b/arch/sim/src/up_netdriver.c @@ -171,6 +171,12 @@ void netdriver_loop(void) { FAR struct eth_hdr_s *eth; + /* Check for new frames. If so, then poll the network for new XMIT data */ + + net_lock(); + (void)devif_poll(&g_sim_dev, sim_txpoll); + net_unlock(); + /* netdev_read will return 0 on a timeout event and >0 on a data received event */ g_sim_dev.d_len = netdev_read((FAR unsigned char *)g_sim_dev.d_buf,