diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2015-08-12 13:29:22 +0000 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2015-08-12 13:29:22 +0000 |
commit | 4561cc2ccaeb939a17b6e2d3a49adbd26712ea26 (patch) | |
tree | aa9b76ee8118082c7c4c8ff7fab8d088d948e3d6 | |
parent | 567d2ab3f8b8abc44e1106cc57eb6612891fe137 (diff) | |
download | mtk-20170518-4561cc2ccaeb939a17b6e2d3a49adbd26712ea26.zip mtk-20170518-4561cc2ccaeb939a17b6e2d3a49adbd26712ea26.tar.gz mtk-20170518-4561cc2ccaeb939a17b6e2d3a49adbd26712ea26.tar.bz2 |
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: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 46584
-rw-r--r-- | target/linux/brcm47xx/patches-3.18/820-wgt634u-nvram-fix.patch | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/target/linux/brcm47xx/patches-3.18/820-wgt634u-nvram-fix.patch b/target/linux/brcm47xx/patches-3.18/820-wgt634u-nvram-fix.patch index 644abde..4738c22 100644 --- a/target/linux/brcm47xx/patches-3.18/820-wgt634u-nvram-fix.patch +++ b/target/linux/brcm47xx/patches-3.18/820-wgt634u-nvram-fix.patch @@ -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) |