mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
net: Use env callbacks for net variables
Instead of checking for changes to the env each time we enter the net_loop, use the env callbacks to update the values of the variables. Don't update the variables when the source was programmatic, since the variables were the source of the new value. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:

committed by
Tom Rini

parent
73c2bbeea3
commit
fd3056337e
@ -37,6 +37,26 @@
|
||||
#define ENV_DOT_ESCAPE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CMD_DNS
|
||||
#define DNS_CALLBACK "dnsip:dnsip,"
|
||||
#else
|
||||
#define DNS_CALLBACK
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET
|
||||
#define NET_CALLBACKS \
|
||||
"bootfile:bootfile," \
|
||||
"ipaddr:ipaddr," \
|
||||
"gatewayip:gatewayip," \
|
||||
"netmask:netmask," \
|
||||
"serverip:serverip," \
|
||||
"nvlan:nvlan," \
|
||||
"vlan:vlan," \
|
||||
DNS_CALLBACK
|
||||
#else
|
||||
#define NET_CALLBACKS
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This list of callback bindings is static, but may be overridden by defining
|
||||
* a new association in the ".callbacks" environment variable.
|
||||
@ -44,7 +64,7 @@
|
||||
#define ENV_CALLBACK_LIST_STATIC ENV_DOT_ESCAPE ENV_CALLBACK_VAR ":callbacks," \
|
||||
ENV_DOT_ESCAPE ENV_FLAGS_VAR ":flags," \
|
||||
"baudrate:baudrate," \
|
||||
"bootfile:bootfile," \
|
||||
NET_CALLBACKS \
|
||||
"loadaddr:loadaddr," \
|
||||
SILENT_CALLBACK \
|
||||
SPLASHIMAGE_CALLBACK \
|
||||
|
Reference in New Issue
Block a user