summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2015-04-08 01:41:17 -0500
committerSimon Glass <sjg@chromium.org>2015-04-18 11:11:34 -0600
commit4fd5055f59eaf6b5374ceedd924a17453e18a798 (patch)
tree61691ec1f5d6d63a38c24e368a48d6d5b970a438 /net
parent6a38a5f3df7be51b112bb6cb3f1f20cfe16ca196 (diff)
downloadu-boot-imx-4fd5055f59eaf6b5374ceedd924a17453e18a798.zip
u-boot-imx-4fd5055f59eaf6b5374ceedd924a17453e18a798.tar.gz
u-boot-imx-4fd5055f59eaf6b5374ceedd924a17453e18a798.tar.bz2
net: cosmetic: Clean up cmd_net variables and functions
Make a thorough pass through all variables and function names contained within common/cmd_net.c and remove CamelCase and improve naming. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net')
-rw-r--r--net/net.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/net/net.c b/net/net.c
index 1395276..8c09529 100644
--- a/net/net.c
+++ b/net/net.c
@@ -159,9 +159,9 @@ static int NetDevExists;
/* XXX in both little & big endian machines 0xFFFF == ntohs(-1) */
/* default is without VLAN */
-ushort NetOurVLAN = 0xFFFF;
+ushort net_our_vlan = 0xFFFF;
/* ditto */
-ushort NetOurNativeVLAN = 0xFFFF;
+ushort net_native_vlan = 0xFFFF;
/* Boot File name */
char net_boot_file_name[128];
@@ -261,8 +261,8 @@ static void NetInitLoop(void)
net_gateway = getenv_ip("gatewayip");
net_netmask = getenv_ip("netmask");
net_server_ip = getenv_ip("serverip");
- NetOurNativeVLAN = getenv_VLAN("nvlan");
- NetOurVLAN = getenv_VLAN("vlan");
+ net_native_vlan = getenv_vlan("nvlan");
+ net_our_vlan = getenv_vlan("vlan");
#if defined(CONFIG_CMD_DNS)
net_dns_server = getenv_ip("dnsip");
#endif
@@ -989,10 +989,10 @@ void net_process_received_packet(uchar *in_packet, int len)
iscdp = is_cdp_packet(et->et_dest);
#endif
- myvlanid = ntohs(NetOurVLAN);
+ myvlanid = ntohs(net_our_vlan);
if (myvlanid == (ushort)-1)
myvlanid = VLAN_NONE;
- mynvlanid = ntohs(NetOurNativeVLAN);
+ mynvlanid = ntohs(net_native_vlan);
if (mynvlanid == (ushort)-1)
mynvlanid = VLAN_NONE;
@@ -1024,7 +1024,7 @@ void net_process_received_packet(uchar *in_packet, int len)
return;
/* if no VLAN active */
- if ((ntohs(NetOurVLAN) & VLAN_IDMASK) == VLAN_NONE
+ if ((ntohs(net_our_vlan) & VLAN_IDMASK) == VLAN_NONE
#if defined(CONFIG_CMD_CDP)
&& iscdp == 0
#endif
@@ -1301,7 +1301,7 @@ net_eth_hdr_size(void)
{
ushort myvlanid;
- myvlanid = ntohs(NetOurVLAN);
+ myvlanid = ntohs(net_our_vlan);
if (myvlanid == (ushort)-1)
myvlanid = VLAN_NONE;
@@ -1314,7 +1314,7 @@ int net_set_ether(uchar *xet, const uchar *dest_ethaddr, uint prot)
struct ethernet_hdr *et = (struct ethernet_hdr *)xet;
ushort myvlanid;
- myvlanid = ntohs(NetOurVLAN);
+ myvlanid = ntohs(net_our_vlan);
if (myvlanid == (ushort)-1)
myvlanid = VLAN_NONE;
@@ -1439,7 +1439,7 @@ void ip_to_string(struct in_addr x, char *s)
);
}
-void VLAN_to_string(ushort x, char *s)
+void vlan_to_string(ushort x, char *s)
{
x = ntohs(x);
@@ -1452,7 +1452,7 @@ void VLAN_to_string(ushort x, char *s)
sprintf(s, "%d", x & VLAN_IDMASK);
}
-ushort string_to_VLAN(const char *s)
+ushort string_to_vlan(const char *s)
{
ushort id;
@@ -1467,7 +1467,7 @@ ushort string_to_VLAN(const char *s)
return htons(id);
}
-ushort getenv_VLAN(char *var)
+ushort getenv_vlan(char *var)
{
- return string_to_VLAN(getenv(var));
+ return string_to_vlan(getenv(var));
}