summaryrefslogtreecommitdiff
path: root/target/linux/brcm47xx/patches-3.6/820-wgt634u-nvram-fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/brcm47xx/patches-3.6/820-wgt634u-nvram-fix.patch')
-rw-r--r--target/linux/brcm47xx/patches-3.6/820-wgt634u-nvram-fix.patch14
1 files changed, 7 insertions, 7 deletions
diff --git a/target/linux/brcm47xx/patches-3.6/820-wgt634u-nvram-fix.patch b/target/linux/brcm47xx/patches-3.6/820-wgt634u-nvram-fix.patch
index c2da5e0770..74b17c74e6 100644
--- a/target/linux/brcm47xx/patches-3.6/820-wgt634u-nvram-fix.patch
+++ b/target/linux/brcm47xx/patches-3.6/820-wgt634u-nvram-fix.patch
@@ -254,7 +254,7 @@ out the configuration than the in kernel cfe config reader.
static u32 find_nvram_size(u32 end)
{
-@@ -47,6 +49,26 @@ static void early_nvram_init_fill(u32 ba
+@@ -47,6 +49,26 @@ static int nvram_find_and_copy(u32 base,
u32 *src, *dst;
u32 size;
@@ -274,16 +274,16 @@ out the configuration than the in kernel cfe config reader.
+ *dst++ = *src++;
+ }
+ cfe_env = 1;
-+ return;
++ return 0;
+ }
+ }
+
/* TODO: when nvram is on nand flash check for bad blocks first. */
off = FLASH_MIN;
while (off <= lim) {
-@@ -166,6 +188,12 @@ int nvram_getenv(char *name, char *val,
- if (!nvram_buf[0])
- early_nvram_init();
+@@ -179,6 +201,12 @@ int bcm47xx_nvram_getenv(char *name, cha
+ return err;
+ }
+ if (cfe_env) {
+ value = cfe_env_get(nvram_buf, name);
@@ -294,9 +294,9 @@ out the configuration than the in kernel cfe config reader.
/* Look for name=value and return value */
var = &nvram_buf[sizeof(struct nvram_header)];
end = nvram_buf + sizeof(nvram_buf) - 2;
-@@ -194,6 +222,9 @@ char *nvram_get(const char *name)
+@@ -207,6 +235,9 @@ char *nvram_get(const char *name)
if (!nvram_buf[0])
- early_nvram_init();
+ nvram_init();
+ if (cfe_env)
+ return cfe_env_get(nvram_buf, name);