diff options
author | Hauke Mehrtens <hauke@openwrt.org> | 2013-01-03 01:53:30 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@openwrt.org> | 2013-01-03 01:53:30 +0000 |
commit | 880dc8381a3948b0c49610a3e36add1a91e7f06b (patch) | |
tree | 80c467f23a4f364b9be69716075cd3b186161e62 /target/linux/brcm47xx/patches-3.6/820-wgt634u-nvram-fix.patch | |
parent | 979291e9c5a2acd6c9942bbb8b846f07ec0d6050 (diff) | |
download | upstream-880dc8381a3948b0c49610a3e36add1a91e7f06b.tar.gz upstream-880dc8381a3948b0c49610a3e36add1a91e7f06b.tar.bz2 upstream-880dc8381a3948b0c49610a3e36add1a91e7f06b.zip |
brcm47xx: add a new version of the nvram rewrite patch
This is the version like it was send for mainline inclusion.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34988 3c298f89-4303-0410-b956-a3cf2f4a3e73
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.patch | 14 |
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); |