diff options
| author | [email protected] <[email protected]> | 2011-09-19 14:14:31 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2011-09-19 14:14:31 +0000 |
| commit | fea7d02bfd41a73be2d4fb2c0ecfe2b8628be68b (patch) | |
| tree | d0a6ebd463d9a17a51fd9e4f1c65368b20dd7382 /components | |
| parent | 405678552dd1aeaf6755d4878b373a5bc4fa1042 (diff) | |
update lwip1.4 for old drivers compatibility
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1714 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components')
| -rw-r--r-- | components/net/lwip-1.4.0/src/netif/ethernetif.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/components/net/lwip-1.4.0/src/netif/ethernetif.c b/components/net/lwip-1.4.0/src/netif/ethernetif.c index 56f20c5d1f..0dcf637e34 100644 --- a/components/net/lwip-1.4.0/src/netif/ethernetif.c +++ b/components/net/lwip-1.4.0/src/netif/ethernetif.c @@ -81,6 +81,37 @@ static char eth_rx_thread_mb_pool[RT_LWIP_ETHTHREAD_MBOX_SIZE * 4]; static char eth_rx_thread_stack[RT_LWIP_ETHTHREAD_STACKSIZE]; +/* Ugly hacks for old drivers compatible */ +/* ===================================== */ +#if 1 +static struct eth_device * ptmpdev; +struct eth_device * get_eth_dev(void) +{ + return ptmpdev; +} +int eth_device_init(struct eth_device * dev, char *name) +{ + ptmpdev = dev; + dev->parent.type = RT_Device_Class_NetIf; + rt_device_register(&(dev->parent), "eth0", RT_DEVICE_FLAG_RDWR); + return 0; +} +void lwip_sys_init(void) +{ + lwip_enetif_init(); +} +void eth_system_device_init() +{ +} +rt_err_t eth_device_ready(struct eth_device* dev) +{ + return eth_rx_ready(dev); +} +#endif +/* ===================================== */ + + + /* ethernet buffer */ static void eth_rx_thread_entry(void* parameter) { |
