diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2015-09-07 16:43:29 +0000 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2015-09-07 16:43:29 +0000 |
commit | 4965969194b51323350baf7d13cb4082c59c5d1e (patch) | |
tree | 62f7c3ee8192b676dfce938e6c3b911f11da2db3 /target/linux | |
parent | 78a566d6323c0fb626fc41b2cfd5f370db8dcf03 (diff) | |
download | master-187ad058-4965969194b51323350baf7d13cb4082c59c5d1e.tar.gz master-187ad058-4965969194b51323350baf7d13cb4082c59c5d1e.tar.bz2 master-187ad058-4965969194b51323350baf7d13cb4082c59c5d1e.zip |
brcm47xx: fix reading WGT634U CFE variables with 4.1
This ports fix from r46584 to the 4.1.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46806 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/brcm47xx/patches-4.1/820-wgt634u-nvram-fix.patch | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/target/linux/brcm47xx/patches-4.1/820-wgt634u-nvram-fix.patch b/target/linux/brcm47xx/patches-4.1/820-wgt634u-nvram-fix.patch index 644abde604..4738c223c4 100644 --- a/target/linux/brcm47xx/patches-4.1/820-wgt634u-nvram-fix.patch +++ b/target/linux/brcm47xx/patches-4.1/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) |