summaryrefslogtreecommitdiff
path: root/nuttx/examples/thttpd/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/examples/thttpd/main.c')
-rw-r--r--nuttx/examples/thttpd/main.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/nuttx/examples/thttpd/main.c b/nuttx/examples/thttpd/main.c
index b7c040cdb..f9d0ee055 100644
--- a/nuttx/examples/thttpd/main.c
+++ b/nuttx/examples/thttpd/main.c
@@ -107,7 +107,7 @@
# endif
# define SLIP_DEVNO 0
-# define NET_DEVNAME "slip0"
+# define NET_DEVNAME "sl0"
#else
/* Otherwise, use the standard ethernet device name */
@@ -190,6 +190,17 @@ int user_start(int argc, char *argv[])
char *thttpd_argv = "thttpd";
int ret;
+ /* Configure SLIP */
+
+#ifdef CONFIG_NET_SLIP
+ ret = slip_initialize(SLIP_DEVNO, CONFIG_NET_SLIPTTY);
+ if (ret < 0)
+ {
+ message("ERROR: SLIP initialization failed: %d\n", ret);
+ exit(1);
+ }
+#endif
+
/* Many embedded network interfaces must have a software assigned MAC */
#ifdef CONFIG_EXAMPLE_THTTPD_NOMAC
@@ -204,17 +215,6 @@ int user_start(int argc, char *argv[])
uip_setmacaddr(NET_DEVNAME, mac);
#endif
- /* Configure SLIP */
-
-#ifdef CONFIG_NET_SLIP
- ret = slip_initialize(SLIP_DEVNO, CONFIG_NET_SLIPTTY);
- if (ret < 0)
- {
- message("ERROR: SLIP initialization failed: %d\n", ret);
- exit(1);
- }
-#endif
-
/* Set up our host address */
message("Setup network addresses\n");