summaryrefslogtreecommitdiffstats
path: root/package/kernel/broadcom-wl/patches/100-fix_nvram_two_devices.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2013-06-21 16:54:37 +0000
committerJohn Crispin <john@openwrt.org>2013-06-21 16:54:37 +0000
commit4ebf19b48fafc8d94e14e4ba779969613b241a6a (patch)
tree9918f890a8915023b49ea30948beb5d048c333fa /package/kernel/broadcom-wl/patches/100-fix_nvram_two_devices.patch
parent44b1688e6c7b4f16f7165fbd560e1183aef69090 (diff)
downloadmaster-31e0f0ae-4ebf19b48fafc8d94e14e4ba779969613b241a6a.tar.gz
master-31e0f0ae-4ebf19b48fafc8d94e14e4ba779969613b241a6a.tar.bz2
master-31e0f0ae-4ebf19b48fafc8d94e14e4ba779969613b241a6a.zip
packages: clean up the package folder
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 37007
Diffstat (limited to 'package/kernel/broadcom-wl/patches/100-fix_nvram_two_devices.patch')
-rw-r--r--package/kernel/broadcom-wl/patches/100-fix_nvram_two_devices.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/package/kernel/broadcom-wl/patches/100-fix_nvram_two_devices.patch b/package/kernel/broadcom-wl/patches/100-fix_nvram_two_devices.patch
new file mode 100644
index 0000000000..5650862f83
--- /dev/null
+++ b/package/kernel/broadcom-wl/patches/100-fix_nvram_two_devices.patch
@@ -0,0 +1,32 @@
+--- a/driver/nvram_stub.c
++++ b/driver/nvram_stub.c
+@@ -22,6 +22,7 @@ typedef struct _vars {
+ #define VARS_T_OH sizeof(vars_t)
+
+ static vars_t *vars = NULL;
++static int nvram_init_done = 0;
+ extern char *nvram_buf[];
+
+ int
+@@ -33,6 +34,10 @@ BCMATTACHFN(nvram_init)(void *si)
+ uint nvs, bufsz;
+ vars_t *new;
+
++ nvram_init_done++;
++ if (nvram_init_done != 1)
++ return 0;
++
+ osh = si_osh(sih);
+
+ nvs = R_REG(osh, &nvh->len) - sizeof(struct nvram_header);
+@@ -79,6 +84,10 @@ BCMATTACHFN(nvram_exit)(void *si)
+ vars_t *this, *next;
+ si_t *sih;
+
++ nvram_init_done--;
++ if (nvram_init_done != 0)
++ return 0;
++
+ sih = (si_t *)si;
+ this = vars;
+ while (this) {