mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
Netwoek: Ada a parameter to netdev_register() to indicate the link protocol supported by the driver. Use this value to replace some logic commited yesterday
This commit is contained in:
+7
-9
@@ -229,17 +229,15 @@ int arp_send(in_addr_t ipaddr)
|
||||
goto errout;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NET_SLIP
|
||||
/* If this device does not require ARP bail out. ARP is only built of
|
||||
* CONFIG_NET_ETHERNET is enabled which always requires ARP support. The
|
||||
* following can happening only there multiple network interfaces enabled
|
||||
* (CONFIG_NET_MULTINIC) and one of the interfaces is not Ethernet. At
|
||||
* present, this is possible only if one of the interfaces is SLIP.
|
||||
*
|
||||
* REVISIT: This will need to be extended if PPP is ever incorporated.
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
/* ARP support is only built if the Ethernet data link is supported.
|
||||
* However, if we are supporting multiple network devices and using
|
||||
* different link level protocols then we can get here for other
|
||||
* link protocals as well. Continue and send the ARP request only
|
||||
* if this device uses the Ethernet data link protocol.
|
||||
*/
|
||||
|
||||
if (dev->d_flags & IFF_NOARP)
|
||||
if (dev->d_lltype != NET_LL_ETHERNET)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user