Skip to content
Snippets Groups Projects
Commit 51e07d09 authored by rmilecki's avatar rmilecki
Browse files

brcm47xx: fix reading WGT634U CFE variables


We got check for nvram_len placed too early and the code never tried
reading CFE variables used on WGT634U. This is a regression introduced
in r45942 and reported in #20291.

Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46584 3c298f89-4303-0410-b956-a3cf2f4a3e73
parent 494e53d6
No related branches found
No related tags found
No related merge requests found
......@@ -279,9 +279,9 @@ out the configuration than the in kernel cfe config reader.
/* TODO: when nvram is on nand flash check for bad blocks first. */
off = FLASH_MIN;
while (off <= lim) {
@@ -186,6 +208,13 @@ int bcm47xx_nvram_getenv(const char *nam
return err;
}
@@ -180,6 +202,13 @@ int bcm47xx_nvram_getenv(const char *nam
if (!name)
return -EINVAL;
+ if (cfe_env) {
+ value = cfe_env_get(nvram_buf, name);
......@@ -290,6 +290,6 @@ out the configuration than the in kernel cfe config reader.
+ return snprintf(val, val_len, "%s", value);
+ }
+
/* Look for name=value and return value */
var = &nvram_buf[sizeof(struct nvram_header)];
end = nvram_buf + sizeof(nvram_buf);
if (!nvram_len) {
err = nvram_init();
if (err)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment