-diff -urN linux.old/drivers/net/Makefile linux.dev/drivers/net/Makefile
---- linux.old/drivers/net/Makefile 2006-03-09 09:41:28.000000000 +0100
-+++ linux.dev/drivers/net/Makefile 2006-01-24 20:52:08.000000000 +0100
+--- linux-2.4.30/drivers/net/Makefile 2006-08-18 12:53:35.000000000 +0200
++++ linux-2.4.30.new/drivers/net/Makefile 2006-08-18 12:53:49.000000000 +0200
@@ -41,6 +41,8 @@
obj-$(CONFIG_ISDN) += slhc.o
endif
+subdir-m += diag
+
subdir-$(CONFIG_HND) += hnd
- subdir-$(CONFIG_ET) += et
subdir-$(CONFIG_WL) += wl
-diff -urN linux.old/drivers/net/diag/Makefile linux.dev/drivers/net/diag/Makefile
---- linux.old/drivers/net/diag/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/drivers/net/diag/Makefile 2006-01-24 20:52:08.000000000 +0100
-@@ -0,0 +1,13 @@
-+#$Id$
-+
-+EXTRA_CFLAGS := -I$(TOPDIR)/arch/mips/bcm947xx/include -DBCMDRIVER
-+
-+O_TARGET := diag.o
-+
-+MAC_OBJS := diag_led.o
-+
-+export-objs :=
-+obj-y := $(MAC_OBJS)
-+obj-m := $(O_TARGET)
-+
-+include $(TOPDIR)/Rules.make
-diff -urN linux.old/drivers/net/diag/diag_led.c linux.dev/drivers/net/diag/diag_led.c
---- linux.old/drivers/net/diag/diag_led.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux.dev/drivers/net/diag/diag_led.c 2006-03-13 00:58:04.000000000 +0100
-@@ -0,0 +1,309 @@
+ subdir-$(CONFIG_NET_PCMCIA) += pcmcia
+diff -urN linux-2.4.30/drivers/net/diag/diag_led.c linux-2.4.30.new/drivers/net/diag/diag_led.c
+--- linux-2.4.30/drivers/net/diag/diag_led.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.4.30.new/drivers/net/diag/diag_led.c 2006-08-18 12:53:58.000000000 +0200
+@@ -0,0 +1,325 @@
+/*
+ * diag_led.c - replacement diag module
+ *
+ * 2005/03/14 asus wl-500g deluxe and buffalo v2 support added
+ * 2005/04/13 added licensing informations
+ * 2005/04/18 base reset polarity off initial readings
++ * 2006/08/18 asus power led support added
+ */
+
+#include <linux/module.h>
+static void v2_set_ses(u8 state) {
+ set_gpio(SES_GPIO, (ISSET(state, 0) << 2) | (ISSET(state, 1) << 3) | (ISSET(state, 2) << 5));
+}
++// asus wl-500g (+deluxe)
++#define ASUS_PWR_GPIO (1<<0)
++
++static void asus_set_pwr(u8 state) {
++ set_gpio(ASUS_PWR_GPIO,state);
++}
+
+// v1.x - - - - -
+#define LED_DIAG 0x13
+#define BIT_DMZ (1 << 0)
+#define BIT_DIAG (1 << 2)
+#define BIT_SES (BITS(3) << 3)
++#define BIT_PWR (1 << 1)
+
+void (*set_diag)(u8 state);
+void (*set_dmz)(u8 state);
+void (*set_ses)(u8 state);
++void (*set_pwr)(u8 state);
+
+static unsigned int diag_reverse = 1;
+static unsigned int ses_reverse = 1;
-+static unsigned int diag = 0;
++static unsigned int pwr_reverse = 1;
++static unsigned int diag = BIT_PWR; // default: diag off, pwr on, dmz off
+
+static void diag_change()
+{
+ set_diag(diag_reverse ? 0xFF : 0x00); // off
+ set_dmz(diag_reverse ? 0xFF : 0x00); // off
+ set_ses(ses_reverse ? 0xFF : 0x00); // off
++ set_pwr(pwr_reverse ? 0xFF : 0x00); //off
+
+ if(diag & BIT_DIAG)
+ set_diag(diag_reverse ? 0x00 : 0xFF); // on
+ set_dmz(diag_reverse ? 0x00 : 0xFF); // on
+ if(diag & BIT_SES)
+ set_ses(((ses_reverse ? ~diag : diag) >> 3) & BITS(3));
++ if (diag & BIT_PWR)
++ set_pwr(pwr_reverse ? 0x00 : 0xFF); // on
+}
+
+static int proc_diag(ctl_table *table, int write, struct file *filp,
+ set_diag=ignore;
+ set_dmz=ignore;
+ set_ses=ignore;
++ set_pwr=ignore;
+
+ buf=nvram_get("pmon_ver") ?: "";
+ if (((board_type & 0xf00) == 0x400) && (strncmp(buf, "CFE", 3) != 0)) {
+ }
+ if (!strcmp(buf,"asusX")) {
+ //asus wl-500g
++ set_pwr=asus_set_pwr;
+ reset_gpio=(1<<6);
+ }
+ }
+ }
+ if (!strcmp(buf,"45")) {
+ //wl-500g deluxe
++ set_pwr=asus_set_pwr;
+ reset_gpio=(1<<6);
+ }
+ }
+
+module_init(diag_init);
+module_exit(diag_exit);
+diff -urN linux-2.4.30/drivers/net/diag/Makefile linux-2.4.30.new/drivers/net/diag/Makefile
+--- linux-2.4.30/drivers/net/diag/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.4.30.new/drivers/net/diag/Makefile 2006-08-18 12:53:49.000000000 +0200
+@@ -0,0 +1,13 @@
++#$Id$
++
++EXTRA_CFLAGS := -I$(TOPDIR)/arch/mips/bcm947xx/include -DBCMDRIVER
++
++O_TARGET := diag.o
++
++MAC_OBJS := diag_led.o
++
++export-objs :=
++obj-y := $(MAC_OBJS)
++obj-m := $(O_TARGET)
++
++include $(TOPDIR)/Rules.make