enable the support of the Intel's E1000 NIC
This commit is contained in:
parent
947d77c775
commit
31949d82d1
1 changed files with 10 additions and 4 deletions
|
@ -43,6 +43,7 @@
|
|||
#include <netif/etharp.h>
|
||||
#endif
|
||||
#include <net/rtl8139.h>
|
||||
#include <net/e1000.h>
|
||||
#include <net/rckemac.h>
|
||||
#include <net/mmnif.h>
|
||||
#ifdef CONFIG_ROCKCREEK
|
||||
|
@ -161,10 +162,15 @@ static int init_netifs(void)
|
|||
netif_add(&default_netif, &ipaddr, &netmask, &gw, NULL, rtl8139if_init, ethernet_input);
|
||||
netif_set_default(&default_netif);
|
||||
#else
|
||||
if ((err = netifapi_netif_add(&default_netif, &ipaddr, &netmask, &gw, NULL, rtl8139if_init, tcpip_input)) != ERR_OK) {
|
||||
kprintf("Unable to add the network interface: err = %d\n", err);
|
||||
return -ENODEV;
|
||||
}
|
||||
if ((err = netifapi_netif_add(&default_netif, &ipaddr, &netmask, &gw, NULL, rtl8139if_init, tcpip_input)) == ERR_OK)
|
||||
goto success;
|
||||
if ((err = netifapi_netif_add(&default_netif, &ipaddr, &netmask, &gw, NULL, e1000if_init, tcpip_input)) == ERR_OK)
|
||||
goto success;
|
||||
|
||||
kprintf("Unable to add the network interface: err = %d\n", err);
|
||||
return -ENODEV;
|
||||
|
||||
success:
|
||||
netifapi_netif_set_default(&default_netif);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue