diff options
author | Waldemar Brodkorb <wbx@openwrt.org> | 2006-03-27 21:05:17 +0000 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openwrt.org> | 2006-03-27 21:05:17 +0000 |
commit | ffbdc48b535605134c437fa2f3adac0b39c93f91 (patch) | |
tree | cc5308a7b7814851a74a1ae26335e98b302b05b7 /target/linux/package | |
parent | dfac779dd6f421b8bae173035d53d999f044eaed (diff) | |
download | upstream-ffbdc48b535605134c437fa2f3adac0b39c93f91.tar.gz upstream-ffbdc48b535605134c437fa2f3adac0b39c93f91.tar.bz2 upstream-ffbdc48b535605134c437fa2f3adac0b39c93f91.zip |
add diag.o for brcm-2.4 by default, add fixes for wap54g from Tomas Vanek
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3510 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/package')
-rw-r--r-- | target/linux/package/diag/Config.in | 2 | ||||
-rw-r--r-- | target/linux/package/diag/diag_led.c | 19 |
2 files changed, 19 insertions, 2 deletions
diff --git a/target/linux/package/diag/Config.in b/target/linux/package/diag/Config.in index b34f773691..70f726c5b6 100644 --- a/target/linux/package/diag/Config.in +++ b/target/linux/package/diag/Config.in @@ -2,6 +2,6 @@ config BR2_PACKAGE_KMOD_DIAG prompt "kmod-diag......................... Driver for router LEDs and Buttons" tristate depends BR2_LINUX_2_4_BRCM - default m if CONFIG_DEVEL + default y help Driver for router LEDs and Buttons diff --git a/target/linux/package/diag/diag_led.c b/target/linux/package/diag/diag_led.c index e4dc391117..6ad7ff102f 100644 --- a/target/linux/package/diag/diag_led.c +++ b/target/linux/package/diag/diag_led.c @@ -80,6 +80,13 @@ static void v1_set_dmz(u8 state) { } } +static void wap1_set_diag(u8 state) { + set_gpio(1<<3,state); +} +static void wap1_set_dmz(u8 state) { + set_gpio(1<<4,state); +} + // - - - - - static void ignore(u8 ignored) {}; @@ -175,7 +182,7 @@ static int __init diag_init() buf=nvram_get("pmon_ver") ?: ""; if (((board_type & 0xf00) == 0x400) && (strncmp(buf, "CFE", 3) != 0)) { buf=nvram_get("boardtype")?:""; - if (!strcmp(buf,"bcm94710dev")) { + if (!strncmp(buf,"bcm94710dev",11)) { buf=nvram_get("boardnum")?:""; if (!strcmp(buf,"42")) { // wrt54g v1.x @@ -183,6 +190,16 @@ static int __init diag_init() set_dmz=v1_set_dmz; reset_gpio=(1<<6); } + if (simple_strtoul(buf, NULL, 0) == 2) { + // wap54g v1.0 + // do not use strcmp as PMON v5.3.22 has some built-in nvram + // defaults with trailing \r + set_diag=wap1_set_diag; + // no dmz led on wap54g, used green led + // labeled "WLAN Link" instead + set_dmz=wap1_set_dmz; + reset_gpio=(1<<0); + } if (!strcmp(buf,"asusX")) { //asus wl-500g reset_gpio=(1<<6); |