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:
Gregory Nutt
2014-11-15 08:22:51 -06:00
parent 8d00912207
commit 388ef8db1a
28 changed files with 359 additions and 237 deletions
+7 -9
View File
@@ -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;
}