summaryrefslogtreecommitdiffstats
path: root/drivers/net/sandbox-raw.c
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2015-04-08 01:41:01 -0500
committerSimon Glass <sjg@chromium.org>2015-04-18 11:11:32 -0600
commit049a95a7759c0e384c1fc7b8575d968d56a33997 (patch)
treec3d30763163e2e67324ebc8f54d6d84d1d8f9c8a /drivers/net/sandbox-raw.c
parent2ea4cfdef64a690ced0af005fd7a581751a3e581 (diff)
downloadtalos-obmc-uboot-049a95a7759c0e384c1fc7b8575d968d56a33997.tar.gz
talos-obmc-uboot-049a95a7759c0e384c1fc7b8575d968d56a33997.zip
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 'drivers/net/sandbox-raw.c')
-rw-r--r--drivers/net/sandbox-raw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/sandbox-raw.c b/drivers/net/sandbox-raw.c
index 91da5f55ca..45c3b18bdf 100644
--- a/drivers/net/sandbox-raw.c
+++ b/drivers/net/sandbox-raw.c
@@ -16,7 +16,7 @@
DECLARE_GLOBAL_DATA_PTR;
static int reply_arp;
-static IPaddr_t arp_ip;
+static struct in_addr arp_ip;
static int sb_eth_raw_start(struct udevice *dev)
{
@@ -55,7 +55,7 @@ static int sb_eth_raw_send(struct udevice *dev, void *packet, int length)
* localhost works on a higher-level API in Linux than
* ARP packets, so fake it
*/
- arp_ip = NetReadIP(&arp->ar_tpa);
+ arp_ip = net_read_ip(&arp->ar_tpa);
reply_arp = 1;
return 0;
}
@@ -93,9 +93,9 @@ static int sb_eth_raw_recv(struct udevice *dev, uchar **packetp)
/* Any non-zero MAC address will work */
memset(&arp->ar_sha, 0x01, ARP_HLEN);
/* Use whatever IP we were looking for (always 127.0.0.1?) */
- NetWriteIP(&arp->ar_spa, arp_ip);
+ net_write_ip(&arp->ar_spa, arp_ip);
memcpy(&arp->ar_tha, pdata->enetaddr, ARP_HLEN);
- NetWriteIP(&arp->ar_tpa, NetOurIP);
+ net_write_ip(&arp->ar_tpa, net_ip);
length = ARP_HDR_SIZE;
} else {
/* If local, the Ethernet header won't be included; skip it */
OpenPOWER on IntegriCloud