summaryrefslogtreecommitdiffstats
path: root/firmware/microblaze/apps
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-11-22 16:50:14 -0800
committerNick Foster <nick@nerdnetworks.org>2010-11-22 16:50:14 -0800
commita2dfa1988c6f624c3c45bd55ca7a7af9c10eb041 (patch)
treeeca7163356bc9dda13cd9af937d399ff41c6a3f1 /firmware/microblaze/apps
parente7b98030eb3ea7e42bd8d6fa5f115b0219ae2685 (diff)
downloaduhd-a2dfa1988c6f624c3c45bd55ca7a7af9c10eb041.tar.gz
uhd-a2dfa1988c6f624c3c45bd55ca7a7af9c10eb041.tar.bz2
uhd-a2dfa1988c6f624c3c45bd55ca7a7af9c10eb041.zip
N200 comes up with default IP and MAC when booted in safe mode (button pushed).
Diffstat (limited to 'firmware/microblaze/apps')
-rw-r--r--firmware/microblaze/apps/txrx_uhd.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/firmware/microblaze/apps/txrx_uhd.c b/firmware/microblaze/apps/txrx_uhd.c
index d00f2bc1f..c7163b6bf 100644
--- a/firmware/microblaze/apps/txrx_uhd.c
+++ b/firmware/microblaze/apps/txrx_uhd.c
@@ -497,6 +497,16 @@ main(void)
{
u2_init();
+//we do this to see if we should set a default ip addr or not
+#ifdef USRP2P
+ bool safe_fw = find_safe_booted_flag();
+ set_safe_booted_flag(0);
+ if(safe_fw) {
+ set_default_ip_addr();
+ set_default_mac_addr();
+ }
+#endif
+
putstr("\nTxRx-NEWETH\n");
print_mac_addr(ethernet_mac_addr()->addr);
newline();
@@ -507,7 +517,7 @@ main(void)
//1) register the addresses into the network stack
register_mac_addr(ethernet_mac_addr());
register_ip_addr(get_ip_addr());
-
+
//2) register callbacks for udp ports we service
register_udp_listener(USRP2_UDP_CTRL_PORT, handle_udp_ctrl_packet);
register_udp_listener(USRP2_UDP_DATA_PORT, handle_udp_data_packet);