mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 19:36:35 +08:00
arp_poll: skip arp_out when arp_send flow
there is no need to call arp_out again to perform layer 2 header filling in the arp_send process, so we should directly call the driver's callback. Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
committed by
Alan C. Assis
parent
a0bd741387
commit
cdaf4ee653
+8
-1
@@ -54,6 +54,8 @@
|
|||||||
|
|
||||||
int arp_poll(FAR struct net_driver_s *dev, devif_poll_callback_t callback)
|
int arp_poll(FAR struct net_driver_s *dev, devif_poll_callback_t callback)
|
||||||
{
|
{
|
||||||
|
int bstop = 0;
|
||||||
|
|
||||||
/* Setup for the ARP callback (most of these do not apply) */
|
/* Setup for the ARP callback (most of these do not apply) */
|
||||||
|
|
||||||
dev->d_appdata = NULL;
|
dev->d_appdata = NULL;
|
||||||
@@ -66,7 +68,12 @@ int arp_poll(FAR struct net_driver_s *dev, devif_poll_callback_t callback)
|
|||||||
|
|
||||||
/* Call back into the driver */
|
/* Call back into the driver */
|
||||||
|
|
||||||
return devif_poll_out(dev, callback);
|
if (dev->d_len > 0)
|
||||||
|
{
|
||||||
|
bstop = callback(dev);
|
||||||
|
}
|
||||||
|
|
||||||
|
return bstop;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_NET_ARP_SEND */
|
#endif /* CONFIG_NET_ARP_SEND */
|
||||||
|
|||||||
Reference in New Issue
Block a user