summaryrefslogtreecommitdiff
path: root/net/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/net.c')
-rw-r--r--net/net.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/net/net.c b/net/net.c
index b4563a4cab..084269e31e 100644
--- a/net/net.c
+++ b/net/net.c
@@ -78,6 +78,12 @@
* - own IP address
* We want: - network time
* Next step: none
+ *
+ * WOL:
+ *
+ * Prerequisites: - own ethernet address
+ * We want: - magic packet or timeout
+ * Next step: none
*/
@@ -108,6 +114,9 @@
#if defined(CONFIG_CMD_SNTP)
#include "sntp.h"
#endif
+#if defined(CONFIG_CMD_WOL)
+#include "wol.h"
+#endif
/** BOOTP EXTENTIONS **/
@@ -515,6 +524,11 @@ restart:
link_local_start();
break;
#endif
+#if defined(CONFIG_CMD_WOL)
+ case WOL:
+ wol_start();
+ break;
+#endif
default:
break;
}
@@ -1281,6 +1295,11 @@ void net_process_received_packet(uchar *in_packet, int len)
ntohs(ip->udp_src),
ntohs(ip->udp_len) - UDP_HDR_SIZE);
break;
+#ifdef CONFIG_CMD_WOL
+ case PROT_WOL:
+ wol_receive(ip, len);
+ break;
+#endif
}
}