This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] LWIP over SLIP


Hi,

These are the minimal changes needed to get LWIP running over SLIP.
Plus a loopif cleanup.

David
---

diff --git a/packages/net/lwip_tcpip/current/src/ecos/init.c
b/packages/net/lwip_tcpip/current/src/ecos/init.c
index 3f55942..6aa098a 100644
--- a/packages/net/lwip_tcpip/current/src/ecos/init.c
+++ b/packages/net/lwip_tcpip/current/src/ecos/init.c
@@ -185,6 +185,8 @@ #endif
       sys_sem_free(sem);

#if LWIP_HAVE_LOOPIF
+       loopif_init(&ecos_loopif);
+
       IP4_ADDR(&gw, 127,0,0,1);
       IP4_ADDR(&ipaddr, 127,0,0,1);
       IP4_ADDR(&netmask, 255,0,0,0);
@@ -194,9 +196,8 @@ #if LWIP_HAVE_LOOPIF
#endif

#if LWIP_SLIP
-       lwip_set_addr(&mynetif);
       slipif_init(&mynetif);
-       netif_set_default(&mynetif);
+       lwip_set_addr(&mynetif);
#elif PPP_SUPPORT
       pppInit();
#if PAP_SUPPORT || CHAP_SUPPORT


diff --git a/packages/net/lwip_tcpip/current/src/ecos/sio.c b/packages/net/lwip_tcpip/current/src/ecos/sio.c index 60004c4..87a4eb7 100644 --- a/packages/net/lwip_tcpip/current/src/ecos/sio.c +++ b/packages/net/lwip_tcpip/current/src/ecos/sio.c @@ -82,7 +82,7 @@ void * sio_open(int devnum) { int res; - cyg_uint32 nb = 0, len = 4; + cyg_uint32 nb = 1, len = 4;

#if LWIP_SLIP
       #define SIODEV SLIP_DEV
@@ -95,9 +95,11 @@ #endif

       res = cyg_io_set_config(ser, CYG_IO_SET_CONFIG_READ_BLOCKING,
&nb, &len);
       res = cyg_io_set_config(ser, CYG_IO_SET_CONFIG_WRITE_BLOCKING,
&nb, &len);
+#if 0
       len = 4;
       nb = 0xFFFFFFFF;
       res = cyg_io_set_config(ser,
CYG_IO_SET_CONFIG_SERIAL_FLOW_CONTROL_METHOD, &nb, &len);
+#endif
       if (res != ENOERR)
                       diag_printf("set_config flow_control returned
an error\n");
       return &ser;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]