aboutsummaryrefslogtreecommitdiffstats
path: root/package/switch/src
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-11-16 03:11:09 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-11-16 03:11:09 +0000
commite3ecefbd23d297ed659422db4b9a886dbfebbdca (patch)
treedf0bed58a47a8bf0bbbeaedb0bb36f169b2ee85d /package/switch/src
parent67dd9a73dcb62e5b072244dddd7b19d521e20e67 (diff)
downloadupstream-e3ecefbd23d297ed659422db4b9a886dbfebbdca.tar.gz
upstream-e3ecefbd23d297ed659422db4b9a886dbfebbdca.tar.bz2
upstream-e3ecefbd23d297ed659422db4b9a886dbfebbdca.zip
fix adm switch misdetection, which led to bogus button events that caused the system to shut down
SVN-Revision: 9555
Diffstat (limited to 'package/switch/src')
-rw-r--r--package/switch/src/switch-adm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/package/switch/src/switch-adm.c b/package/switch/src/switch-adm.c
index 0fb21ffaaf..8d5de04b48 100644
--- a/package/switch/src/switch-adm.c
+++ b/package/switch/src/switch-adm.c
@@ -500,13 +500,13 @@ static int detect_adm(void)
int boardflags = atoi(nvram_get("boardflags"));
int boardnum = atoi(nvram_get("boardnum"));
- if (boardnum == 44) { /* Trendware TEW-411BRP+ */
- ret = 1;
+ if ((boardnum == 44) && (boardflags == 0x0388)) { /* Trendware TEW-411BRP+ */
+ ret = 1;
- eecs = get_gpiopin("adm_eecs", 2);
- eesk = get_gpiopin("adm_eesk", 3);
- eedi = get_gpiopin("adm_eedi", 4);
- eerc = get_gpiopin("adm_rc", 5);
+ eecs = get_gpiopin("adm_eecs", 2);
+ eesk = get_gpiopin("adm_eesk", 3);
+ eedi = get_gpiopin("adm_eedi", 4);
+ eerc = get_gpiopin("adm_rc", 5);
} else if ((boardflags & 0x80) || force) {
ret = 1;