diff options
author | Joe Hershberger <joe.hershberger@ni.com> | 2015-04-08 01:41:01 -0500 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-04-18 11:11:32 -0600 |
commit | 049a95a7759c0e384c1fc7b8575d968d56a33997 (patch) | |
tree | c3d30763163e2e67324ebc8f54d6d84d1d8f9c8a /net/eth.c | |
parent | 2ea4cfdef64a690ced0af005fd7a581751a3e581 (diff) | |
download | u-boot-049a95a7759c0e384c1fc7b8575d968d56a33997.tar.gz |
net: cosmetic: Change IPaddr_t to struct in_addr
This patch is simply clean-up to make the IPv4 type that is used match
what Linux uses. It also attempts to move all variables that are IP
addresses use good naming instead of CamelCase. No functional change.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net/eth.c')
-rw-r--r-- | net/eth.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -768,14 +768,14 @@ int eth_initialize(void) * mcast_addr: multicast ipaddr from which multicast Mac is made * join: 1=join, 0=leave. */ -int eth_mcast_join(IPaddr_t mcast_ip, int join) +int eth_mcast_join(struct in_addr mcast_ip, int join) { u8 mcast_mac[6]; if (!eth_current || !eth_current->mcast) return -1; - mcast_mac[5] = htonl(mcast_ip) & 0xff; - mcast_mac[4] = (htonl(mcast_ip)>>8) & 0xff; - mcast_mac[3] = (htonl(mcast_ip)>>16) & 0x7f; + mcast_mac[5] = htonl(mcast_ip.s_addr) & 0xff; + mcast_mac[4] = (htonl(mcast_ip.s_addr)>>8) & 0xff; + mcast_mac[3] = (htonl(mcast_ip.s_addr)>>16) & 0x7f; mcast_mac[2] = 0x5e; mcast_mac[1] = 0x0; mcast_mac[0] = 0x1; |