netdev_upperhalf: reply logic only for ipv4/ipv6/arp input

VELAPLATFO-12228

Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
This commit is contained in:
xucheng5 2023-07-27 15:19:46 +08:00 committed by Xiang Xiao
parent 04c4207dee
commit 872913e67b
1 changed files with 12 additions and 12 deletions

View File

@ -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);
}
}
}