diff --git a/net/cdp.c b/net/cdp.c
index 392437d..d8df3ea 100644
--- a/net/cdp.c
+++ b/net/cdp.c
@@ -36,17 +36,16 @@
 
 #define CDP_TIMEOUT			250UL	/* one packet every 250ms */
 
-static int CDPSeq;
-static int CDPOK;
+static int cdp_seq;
+static int cdp_ok;
 
-ushort CDPNativeVLAN;
-ushort CDPApplianceVLAN;
+ushort cdp_native_vlan;
+ushort cdp_appliance_vlan;
 
-static const uchar CDP_SNAP_hdr[8] = {
+static const uchar cdp_snap_hdr[8] = {
 	0xAA, 0xAA, 0x03, 0x00, 0x00, 0x0C, 0x20, 0x00 };
 
-static ushort
-CDP_compute_csum(const uchar *buff, ushort len)
+static ushort cdp_compute_csum(const uchar *buff, ushort len)
 {
 	ushort csum;
 	int     odd;
@@ -104,8 +103,7 @@
 	return csum;
 }
 
-static int
-CDPSendTrigger(void)
+static int cdp_send_trigger(void)
 {
 	uchar *pkt;
 	ushort *s;
@@ -130,8 +128,8 @@
 	pkt += ETHER_HDR_SIZE;
 
 	/* SNAP header */
-	memcpy((uchar *)pkt, CDP_SNAP_hdr, sizeof(CDP_SNAP_hdr));
-	pkt += sizeof(CDP_SNAP_hdr);
+	memcpy((uchar *)pkt, cdp_snap_hdr, sizeof(cdp_snap_hdr));
+	pkt += sizeof(cdp_snap_hdr);
 
 	/* CDP header */
 	*pkt++ = 0x02;				/* CDP version 2 */
@@ -210,8 +208,8 @@
 	len = (uchar *)s - ((uchar *)net_tx_packet + ETHER_HDR_SIZE);
 	et->et_protlen = htons(len);
 
-	len = ETHER_HDR_SIZE + sizeof(CDP_SNAP_hdr);
-	chksum = CDP_compute_csum((uchar *)net_tx_packet + len,
+	len = ETHER_HDR_SIZE + sizeof(cdp_snap_hdr);
+	chksum = cdp_compute_csum((uchar *)net_tx_packet + len,
 				  (uchar *)s - (net_tx_packet + len));
 	if (chksum == 0)
 		chksum = 0xFFFF;
@@ -221,19 +219,18 @@
 	return 0;
 }
 
-static void
-CDPTimeout(void)
+static void cdp_timeout_handler(void)
 {
-	CDPSeq++;
+	cdp_seq++;
 
-	if (CDPSeq < 3) {
-		NetSetTimeout(CDP_TIMEOUT, CDPTimeout);
-		CDPSendTrigger();
+	if (cdp_seq < 3) {
+		NetSetTimeout(CDP_TIMEOUT, cdp_timeout_handler);
+		cdp_send_trigger();
 		return;
 	}
 
 	/* if not OK try again */
-	if (!CDPOK)
+	if (!cdp_ok)
 		NetStartAgain();
 	else
 		net_set_state(NETLOOP_SUCCESS);
@@ -247,15 +244,15 @@
 	ushort vlan, nvlan;
 
 	/* minimum size? */
-	if (len < sizeof(CDP_SNAP_hdr) + 4)
+	if (len < sizeof(cdp_snap_hdr) + 4)
 		goto pkt_short;
 
 	/* check for valid CDP SNAP header */
-	if (memcmp(pkt, CDP_SNAP_hdr, sizeof(CDP_SNAP_hdr)) != 0)
+	if (memcmp(pkt, cdp_snap_hdr, sizeof(cdp_snap_hdr)) != 0)
 		return;
 
-	pkt += sizeof(CDP_SNAP_hdr);
-	len -= sizeof(CDP_SNAP_hdr);
+	pkt += sizeof(cdp_snap_hdr);
+	len -= sizeof(cdp_snap_hdr);
 
 	/* Version of CDP protocol must be >= 2 and TTL != 0 */
 	if (pkt[0] < 0x02 || pkt[1] == 0)
@@ -269,7 +266,7 @@
 		printf("**WARNING: CDP packet received with a protocol version "
 				"%d > 2\n", pkt[0] & 0xff);
 
-	if (CDP_compute_csum(pkt, len) != 0)
+	if (cdp_compute_csum(pkt, len) != 0)
 		return;
 
 	pkt += 4;
@@ -340,28 +337,27 @@
 		}
 	}
 
-	CDPApplianceVLAN = vlan;
-	CDPNativeVLAN = nvlan;
+	cdp_appliance_vlan = vlan;
+	cdp_native_vlan = nvlan;
 
-	CDPOK = 1;
+	cdp_ok = 1;
 	return;
 
- pkt_short:
+pkt_short:
 	printf("** CDP packet is too short\n");
 	return;
 }
 
-void
-CDPStart(void)
+void cdp_start(void)
 {
 	printf("Using %s device\n", eth_get_name());
-	CDPSeq = 0;
-	CDPOK = 0;
+	cdp_seq = 0;
+	cdp_ok = 0;
 
-	CDPNativeVLAN = htons(-1);
-	CDPApplianceVLAN = htons(-1);
+	cdp_native_vlan = htons(-1);
+	cdp_appliance_vlan = htons(-1);
 
-	NetSetTimeout(CDP_TIMEOUT, CDPTimeout);
+	NetSetTimeout(CDP_TIMEOUT, cdp_timeout_handler);
 
-	CDPSendTrigger();
+	cdp_send_trigger();
 }
diff --git a/net/cdp.h b/net/cdp.h
index 95e4ce0..83475c9 100644
--- a/net/cdp.h
+++ b/net/cdp.h
@@ -14,7 +14,7 @@
 #ifndef __CDP_H__
 #define __CDP_H__
 
-void CDPStart(void);
+void cdp_start(void);
 /* Process a received CDP packet */
 void cdp_receive(const uchar *pkt, unsigned len);
 
diff --git a/net/net.c b/net/net.c
index a159432..3c8b608 100644
--- a/net/net.c
+++ b/net/net.c
@@ -412,7 +412,7 @@
 #endif
 #if defined(CONFIG_CMD_CDP)
 		case CDP:
-			CDPStart();
+			cdp_start();
 			break;
 #endif
 #if defined (CONFIG_NETCONSOLE) && !(CONFIG_SPL_BUILD)
