diff --git a/drivers/net/netdev_upperhalf.c b/drivers/net/netdev_upperhalf.c index d4b4c92e11..a9f32cd93a 100644 --- a/drivers/net/netdev_upperhalf.c +++ b/drivers/net/netdev_upperhalf.c @@ -381,6 +381,18 @@ static void eth_input(FAR struct net_driver_s *dev) NETDEV_RXDROPPED(dev); dev->d_len = 0; } + + /* If the above function invocation resulted in data + * that should be sent out on the network, + * the field d_len will set to a value > 0. + */ + + if (dev->d_len > 0) + { + /* And send the packet */ + + netdev_upper_txpoll(dev); + } } #endif @@ -454,18 +466,6 @@ static void netdev_upper_rxpoll_work(FAR struct netdev_upperhalf_s *upper) nerr("Unknown link type %d\n", dev->d_lltype); break; } - - /* If the above function invocation resulted in data - * that should be sent out on the network, - * the field d_len will set to a value > 0. - */ - - if (dev->d_len > 0) - { - /* And send the packet */ - - netdev_upper_txpoll(dev); - } } }