diff options
author | Mike Frysinger | 2011-10-02 10:01:27 +0000 |
---|---|---|
committer | Wolfgang Denk | 2011-10-05 22:22:16 +0200 |
commit | e2a53458a7ab375233048e922c4adf494866a78f (patch) | |
tree | 0d703e3070ba43394fae714629c09c998bf5b80d /net | |
parent | d90f0c107bdb9766aeaf11181b97f5d7fde3efda (diff) |
net: drop !NET_MULTI code
This is long over due. All but two net drivers have been converted, but
those have now been dropped.
The only thing left to do is actually delete all references to NET_MULTI
and code that is compiled when that is not defined. So here we scrub the
core code.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/eth.c | 49 | ||||
-rw-r--r-- | net/net.c | 30 | ||||
-rw-r--r-- | net/nfs.c | 2 | ||||
-rw-r--r-- | net/tftp.c | 4 |
4 files changed, 11 insertions, 74 deletions
diff --git a/net/eth.c b/net/eth.c index fba3c1fdf8f..4280d6dbe77 100644 --- a/net/eth.c +++ b/net/eth.c @@ -62,8 +62,6 @@ int eth_getenv_enetaddr_by_index(const char *base_name, int index, return eth_getenv_enetaddr(enetvar, enetaddr); } -#ifdef CONFIG_NET_MULTI - static int eth_mac_skip(int index) { char enetvar[15]; @@ -172,23 +170,18 @@ int eth_get_dev_index (void) static void eth_current_changed(void) { -#ifdef CONFIG_NET_MULTI - { - char *act = getenv("ethact"); - /* update current ethernet name */ - if (eth_current) - { - if (act == NULL || strcmp(act, eth_current->name) != 0) - setenv("ethact", eth_current->name); - } - /* - * remove the variable completely if there is no active - * interface - */ - else if (act != NULL) - setenv("ethact", NULL); + char *act = getenv("ethact"); + /* update current ethernet name */ + if (eth_current) { + if (act == NULL || strcmp(act, eth_current->name) != 0) + setenv("ethact", eth_current->name); } -#endif + /* + * remove the variable completely if there is no active + * interface + */ + else if (act != NULL) + setenv("ethact", NULL); } int eth_write_hwaddr(struct eth_device *dev, const char *base_name, @@ -535,23 +528,3 @@ char *eth_get_name (void) { return (eth_current ? eth_current->name : "unknown"); } - -#else /* !CONFIG_NET_MULTI */ - -#warning Ethernet driver is deprecated. Please update to use CONFIG_NET_MULTI - -extern int mcf52x2_miiphy_initialize(bd_t *bis); - - -int eth_initialize(bd_t *bis) -{ -#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) - miiphy_init(); -#endif - -#if defined(CONFIG_MCF52x2) - mcf52x2_miiphy_initialize(bis); -#endif - return 0; -} -#endif diff --git a/net/net.c b/net/net.c index 7a6058339cc..5e67886b680 100644 --- a/net/net.c +++ b/net/net.c @@ -169,14 +169,12 @@ uchar NetCDPAddr[6] = { 0x01, 0x00, 0x0c, 0xcc, 0xcc, 0xcc }; #endif /* Network loop state */ int NetState; -#ifdef CONFIG_NET_MULTI /* Tried all network devices */ int NetRestartWrap; /* Network loop restarted */ static int NetRestarted; /* At least one device configured */ static int NetDevExists; -#endif /* XXX in both little & big endian machines 0xFFFF == ntohs(-1) */ /* default is without VLAN */ @@ -347,10 +345,8 @@ NetLoop(proto_t protocol) { bd_t *bd = gd->bd; -#ifdef CONFIG_NET_MULTI NetRestarted = 0; NetDevExists = 0; -#endif /* XXX problem with bss workaround */ NetArpWaitPacketMAC = NULL; @@ -379,20 +375,14 @@ NetLoop(proto_t protocol) } eth_halt(); -#ifdef CONFIG_NET_MULTI eth_set_current(); -#endif if (eth_init(bd) < 0) { eth_halt(); return -1; } restart: -#ifdef CONFIG_NET_MULTI memcpy(NetOurEther, eth_get_dev()->enetaddr, 6); -#else - eth_getenv_enetaddr("ethaddr", NetOurEther); -#endif NetState = NETLOOP_CONTINUE; @@ -409,16 +399,12 @@ restart: eth_halt(); return -1; -#ifdef CONFIG_NET_MULTI case 2: /* network device not configured */ break; -#endif /* CONFIG_NET_MULTI */ case 0: -#ifdef CONFIG_NET_MULTI NetDevExists = 1; -#endif switch (protocol) { case TFTP: /* always use ARP to get server ethernet address */ @@ -562,9 +548,7 @@ restart: switch (NetState) { case NETLOOP_RESTART: -#ifdef CONFIG_NET_MULTI NetRestarted = 1; -#endif goto restart; case NETLOOP_SUCCESS: @@ -630,10 +614,6 @@ void NetStartAgain(void) NetTryCount++; -#ifndef CONFIG_NET_MULTI - NetSetTimeout(10000UL, startAgainTimeout); - NetSetHandler(startAgainHandler); -#else /* !CONFIG_NET_MULTI*/ eth_halt(); #if !defined(CONFIG_NET_DO_NOT_TRY_ANOTHER) eth_try_another(!NetRestarted); @@ -650,7 +630,6 @@ void NetStartAgain(void) } else { NetState = NETLOOP_RESTART; } -#endif /* CONFIG_NET_MULTI */ } /**********************************************************************/ @@ -816,9 +795,7 @@ PingHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src, static void PingStart(void) { -#if defined(CONFIG_NET_MULTI) printf("Using %s device\n", eth_get_name()); -#endif /* CONFIG_NET_MULTI */ NetSetTimeout(10000UL, PingTimeout); NetSetHandler(PingHandler); @@ -1168,9 +1145,7 @@ CDPHandler(const uchar *pkt, unsigned len) static void CDPStart(void) { -#if defined(CONFIG_NET_MULTI) printf("Using %s device\n", eth_get_name()); -#endif CDPSeq = 0; CDPOK = 0; @@ -1810,7 +1785,6 @@ common: case CDP: case DHCP: if (memcmp(NetOurEther, "\0\0\0\0\0\0", 6) == 0) { -#ifdef CONFIG_NET_MULTI extern int eth_get_dev_index(void); int num = eth_get_dev_index(); @@ -1829,10 +1803,6 @@ common: NetStartAgain(); return 2; -#else - puts("*** ERROR: `ethaddr' not set\n"); - return 1; -#endif } /* Fall through */ default: diff --git a/net/nfs.c b/net/nfs.c index f76f60d1627..5e717e3c6d6 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -714,9 +714,7 @@ NfsStart (void) nfs_filename = basename (nfs_path); nfs_path = dirname (nfs_path); -#if defined(CONFIG_NET_MULTI) printf ("Using %s device\n", eth_get_name()); -#endif printf("File transfer via NFS from server %pI4" "; our IP address is %pI4", &NfsServerIP, &NetOurIP); diff --git a/net/tftp.c b/net/tftp.c index a893e020fd6..da8eeaa58de 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -615,9 +615,7 @@ TftpStart(void) } } -#if defined(CONFIG_NET_MULTI) printf("Using %s device\n", eth_get_name()); -#endif printf("TFTP from server %pI4" "; our IP address is %pI4", &TftpRemoteIP, &NetOurIP); @@ -687,9 +685,7 @@ TftpStartServer(void) { tftp_filename[0] = 0; -#if defined(CONFIG_NET_MULTI) printf("Using %s device\n", eth_get_name()); -#endif printf("Listening for TFTP transfer on %pI4\n", &NetOurIP); printf("Load address: 0x%lx\n", load_addr); |