lwip fix
Andrew Lunn
andrew@lunn.ch
Tue May 9 16:29:00 GMT 2006
Here is an lwip fix so that the ppp support compiles. I don't have a
ppp setup, so have not tested this works.
Andrew
-------------- next part --------------
Index: net/lwip_tcpip/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/lwip_tcpip/current/ChangeLog,v
retrieving revision 1.6
diff -u -r1.6 ChangeLog
--- net/lwip_tcpip/current/ChangeLog 29 Mar 2006 10:33:28 -0000 1.6
+++ net/lwip_tcpip/current/ChangeLog 9 May 2006 16:27:15 -0000
@@ -1,3 +1,10 @@
+2006-05-09 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/ecos/init.c (arp_timer): Only compile this function when
+ Ethernet is supported.
+ * include/lwipopts.h: PAP_SUPPORT & CHAP_SUPPORT must be either 0
+ or 1 otherwise we get compiler errors.
+
2006-03-26 Uwe Kindler <uwe_kindler@web.de>
* Updated the complete lwIP source to the latest lwIP
Index: net/lwip_tcpip/current/include/lwipopts.h
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/lwip_tcpip/current/include/lwipopts.h,v
retrieving revision 1.4
diff -u -r1.4 lwipopts.h
--- net/lwip_tcpip/current/include/lwipopts.h 29 Mar 2006 10:33:28 -0000 1.4
+++ net/lwip_tcpip/current/include/lwipopts.h 9 May 2006 16:27:16 -0000
@@ -164,8 +164,16 @@
#define PPP_SUPPORT defined(CYGPKG_LWIP_PPP)
#define PPP_DEV CYGDAT_LWIP_PPP_DEV
#define MD5_SUPPORT 1
-#define PAP_SUPPORT defined(CYGIMP_LWIP_PPP_PAP_AUTH)
-#define CHAP_SUPPORT defined(CYGIMP_LWIP_PPP_CHAP_AUTH)
+#ifdef CYGIMP_LWIP_PPP_PAP_AUTH
+#define PAP_SUPPORT 1
+#else
+#define PAP_SUPPORT 0
+#endif
+#ifdef CYGIMP_LWIP_PPP_CHAP_AUTH
+#define CHAP_SUPPORT 1
+#else
+#define CHAP_SUPPORT 0
+#endif
/* ------- Thread priorities ---------------*/
Index: net/lwip_tcpip/current/src/ecos/init.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/lwip_tcpip/current/src/ecos/init.c,v
retrieving revision 1.5
diff -u -r1.5 init.c
--- net/lwip_tcpip/current/src/ecos/init.c 29 Mar 2006 10:33:28 -0000 1.5
+++ net/lwip_tcpip/current/src/ecos/init.c 9 May 2006 16:27:16 -0000
@@ -111,13 +111,14 @@
struct netif ecos_loopif;
#endif
-
+#ifdef CYGPKG_LWIP_ETH
static void
arp_timer(void *arg)
{
etharp_tmr();
sys_timeout(ARP_TMR_INTERVAL, (sys_timeout_handler) arp_timer, NULL);
}
+#endif
#if LWIP_DHCP
static void lwip_dhcp_fine_tmr(void *arg)
@@ -143,7 +144,9 @@
//
void tcpip_init_done(void * arg)
{
+#ifdef CYGPKG_LWIP_ETH
sys_timeout(ARP_TMR_INTERVAL, (sys_timeout_handler) arp_timer, NULL);
+#endif
#ifdef CYGOPT_LWIP_DHCP_MANAGEMENT
sys_timeout(500, (sys_timeout_handler) lwip_dhcp_fine_tmr, NULL);
sys_timeout(60000, (sys_timeout_handler) lwip_dhcp_coarse_tmr, NULL);
More information about the Ecos-patches
mailing list