9
0
Fork 0

remove unused cdp code

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2010-01-04 09:43:03 +01:00
parent 0dde20da20
commit d2a58c2173
2 changed files with 0 additions and 56 deletions

View File

@ -210,54 +210,6 @@ out:
return rcode;
}
#ifdef CONFIG_NET_CDP
static void cdp_update_env(void)
{
char tmp[16];
if (CDPApplianceVLAN != htons(-1)) {
printf("CDP offered appliance VLAN %d\n", ntohs(CDPApplianceVLAN));
VLAN_to_string(CDPApplianceVLAN, tmp);
setenv("vlan", tmp);
NetOurVLAN = CDPApplianceVLAN;
}
if (CDPNativeVLAN != htons(-1)) {
printf("CDP offered native VLAN %d\n", ntohs(CDPNativeVLAN));
VLAN_to_string(CDPNativeVLAN, tmp);
setenv("nvlan", tmp);
NetOurNativeVLAN = CDPNativeVLAN;
}
}
static int do_cdp (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int r;
if (NetLoopInit(CDP) < 0)
return 1;
r = NetLoop();
if (r < 0) {
printf("cdp failed; perhaps not a CISCO switch?\n");
return 1;
}
cdp_update_env();
return 0;
}
BAREBOX_CMD_START(cdp)
.cmd = do_cdp,
.usage = "Perform CDP network configuration",
BAREBOX_CMD_HELP("[loadAddress] [host ip addr:bootfilename]\n")
BAREBOX_CMD_END
#endif /* CONFIG_NET_CDP */
static int do_ethact (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
struct eth_device *edev;

View File

@ -279,10 +279,6 @@ extern uchar NetEtherNullAddr[6];
extern ushort NetOurVLAN; /* Our VLAN */
extern ushort NetOurNativeVLAN; /* Our Native VLAN */
extern uchar NetCDPAddr[6]; /* Ethernet CDP address */
extern ushort CDPNativeVLAN; /* CDP returned native VLAN */
extern ushort CDPApplianceVLAN; /* CDP returned appliance VLAN */
extern int NetState; /* Network loop state */
/* ---------- Added by sha ------------ */
@ -301,10 +297,6 @@ extern void ArpRequest (void);
typedef enum { BOOTP, RARP, ARP, TFTP, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP } proto_t;
/* when CDP completes these hold the return values */
extern ushort CDPNativeVLAN;
extern ushort CDPApplianceVLAN;
/* Initialize the network adapter */
int NetLoopInit(proto_t);