mirror of https://github.com/hak5/openwrt-owl.git
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> SVN-Revision: 46806owl
parent
da2178eb7e
commit
d2a9c35af0
|
@ -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. */
|
/* TODO: when nvram is on nand flash check for bad blocks first. */
|
||||||
off = FLASH_MIN;
|
off = FLASH_MIN;
|
||||||
while (off <= lim) {
|
while (off <= lim) {
|
||||||
@@ -186,6 +208,13 @@ int bcm47xx_nvram_getenv(const char *nam
|
@@ -180,6 +202,13 @@ int bcm47xx_nvram_getenv(const char *nam
|
||||||
return err;
|
if (!name)
|
||||||
}
|
return -EINVAL;
|
||||||
|
|
||||||
+ if (cfe_env) {
|
+ if (cfe_env) {
|
||||||
+ value = cfe_env_get(nvram_buf, name);
|
+ 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);
|
+ return snprintf(val, val_len, "%s", value);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
/* Look for name=value and return value */
|
if (!nvram_len) {
|
||||||
var = &nvram_buf[sizeof(struct nvram_header)];
|
err = nvram_init();
|
||||||
end = nvram_buf + sizeof(nvram_buf);
|
if (err)
|
||||||
|
|
Loading…
Reference in New Issue