aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/microblaze/lib/eth_addrs.c
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-11-23 15:35:48 -0800
committerJosh Blum <josh@joshknows.com>2010-11-23 15:35:48 -0800
commitf56c1247cbe7b7e90acee2711b5dda3356b9486a (patch)
tree81dadc83537c2c50550cd94e224571e472176c6f /firmware/microblaze/lib/eth_addrs.c
parent9f94ef843ceca63bcb83b2d473cbba709c9110b6 (diff)
parenteb26e8adb4a5718ee3db3bb7f32c0cd31d060af9 (diff)
downloaduhd-f56c1247cbe7b7e90acee2711b5dda3356b9486a.tar.gz
uhd-f56c1247cbe7b7e90acee2711b5dda3356b9486a.tar.bz2
uhd-f56c1247cbe7b7e90acee2711b5dda3356b9486a.zip
Merge branch 'next' of ettus.sourcerepo.com:ettus/uhdpriv into next
Diffstat (limited to 'firmware/microblaze/lib/eth_addrs.c')
-rw-r--r--firmware/microblaze/lib/eth_addrs.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/firmware/microblaze/lib/eth_addrs.c b/firmware/microblaze/lib/eth_addrs.c
index c6320e4fa..ff5d04f4d 100644
--- a/firmware/microblaze/lib/eth_addrs.c
+++ b/firmware/microblaze/lib/eth_addrs.c
@@ -46,9 +46,20 @@ unprogrammed(const void *t, size_t len)
//////////////////// MAC Addr Stuff ///////////////////////
static int8_t src_mac_addr_initialized = false;
+
+static const eth_mac_addr_t default_mac_addr = {{
+ 0x00, 0x50, 0xC2, 0x85, 0x3f, 0xff
+ }};
+
static eth_mac_addr_t src_mac_addr = {{
0x00, 0x50, 0xC2, 0x85, 0x3f, 0xff
}};
+
+void set_default_mac_addr(void)
+{
+ src_mac_addr_initialized = true;
+ src_mac_addr = default_mac_addr;
+}
const eth_mac_addr_t *
ethernet_mac_addr(void)
@@ -88,10 +99,20 @@ ethernet_set_mac_addr(const eth_mac_addr_t *t)
//////////////////// IP Addr Stuff ///////////////////////
static int8_t src_ip_addr_initialized = false;
+
+static const struct ip_addr default_ip_addr = {
+ (192 << 24 | 168 << 16 | 10 << 8 | 2 << 0)
+};
+
static struct ip_addr src_ip_addr = {
(192 << 24 | 168 << 16 | 10 << 8 | 2 << 0)
};
+void set_default_ip_addr(void)
+{
+ src_ip_addr_initialized = true;
+ src_ip_addr = default_ip_addr;
+}
const struct ip_addr *get_ip_addr(void)
{