sim arch: poll for TX frames to speed up driver

This commit is contained in:
Simon Piriou 2017-07-22 08:57:10 -06:00 committed by Gregory Nutt
parent 63c9f1a86e
commit 53a8cb734b

View File

@ -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,