On Sat, Nov 27, 2010 at 2:48 PM, Felix Fietkau <n...@openwrt.org> wrote:
> On 2010-11-27 4:20 AM, Dave Lichterman wrote:
>> I'm pretty sure I followed the directions... apologies if I missed
>> something as this is my first patch.
>>
>> Sets appropriate defaults for the LED configuration on the Buffalo
>> WZR-HP-G300NH. By default, it looks weird in LuCI (since mon.wlan0 is
>> missing when radio0 is off), but when wireless is enabled, it works
>> like a charm.
>>
>> Signed-off-by: Dave Lichterman <laviddichterman-a.t-gmail.com>
> With my recent mac80211 LED changes, this patch should be reworked to
> use the phy0tpt trigger instead.
>
> - Felix
>
Sorry this took so long to re-submit. I removed the Security LED
config since it's not really accurate and I switched the wireless to
use the phy0tpt trigger.
Signed-off-by: Dave Lichterman <laviddichter...@gmail.com>

--

Index: target/linux/ar71xx/base-files/etc/uci-defaults/wzr-hp-g300nh
===================================================================
--- target/linux/ar71xx/base-files/etc/uci-defaults/wzr-hp-g300nh       
(revision 0)
+++ target/linux/ar71xx/base-files/etc/uci-defaults/wzr-hp-g300nh       
(revision 0)
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# Copyright (C) 2010 OpenWrt.org
+#
+
+. /lib/ar71xx.sh
+
+board=$(ar71xx_board_name)
+
+wzrhpg300nh_set_leds() {
+       uci batch <<EOF
+add system led
+set syst...@led[-1]='led'
+set syst...@led[-1].name='Wireless'
+set syst...@led[-1].sysfs='wzr-hp-g300nh:green:wireless'
+set syst...@led[-1].trigger='phy0tpt'
+add system led
+set syst...@led[-1]='led'
+set syst...@led[-1].name='Router'
+set syst...@led[-1].sysfs='wzr-hp-g300nh:green:router'
+set syst...@led[-1].trigger='netdev'
+set syst...@led[-1].dev='eth1'
+set syst...@led[-1].mode='link tx rx'
+add system led
+set syst...@led[-1]='led'
+set syst...@led[-1].name='USB'
+set syst...@led[-1].sysfs='wzr-hp-g300nh:blue:usb'
+set syst...@led[-1].trigger='nand-disk'
+commit system
+EOF
+}
+
+if [ "${board}" == "wzr-hp-g300nh" ]; then
+       wzrhpg300nh_set_leds
+fi

Property changes on:
target/linux/ar71xx/base-files/etc/uci-defaults/wzr-hp-g300nh
___________________________________________________________________
Added: svn:executable
   + *
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to