netloop: speed up NetLoop

NetLoop polls every cycle with getenv some environment variables.
This is horribly slow, especially when the environment is big.

This patch reads only the environment variables in NetLoop,
when they were changed.

Also moved the init part of the NetLoop function in a seperate
function.

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
This commit is contained in:
Heiko Schocher 2009-02-10 09:38:52 +01:00 committed by Ben Warren
parent ad2d16393e
commit 2f70c49e5b
4 changed files with 91 additions and 61 deletions

View file

@ -269,6 +269,7 @@ void forceenv (char *, char *);
#ifdef CONFIG_AUTO_COMPLETE
int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf);
#endif
int get_env_id (void);
void pci_init (void);
void pci_init_board(void);