Folks,

Please ignore this particular (additional) patch.

I've started to learn how uci-defaults work.

--- shinoda

On 2012/07/26, at 0:36, LEO Airwarosu Yoichi Shinoda wrote:

> This is an additional patch for the WLAE-AG300N that makes
> wireless led to work.
> 
> On 2012/07/24, at 11:13, LEO Airwarosu Yoichi Shinoda wrote:
> 
>> Folks,
>> 
>> I also have a question regarding how to include a board dependent
>> base-file file in the source tree.
>> 
>> More specifically, the file is a hotplug script to get the wireless
>> led work on the buffalo's wlae-ag300n. The wireless led on this board
>> is not connected to the phy, but controlled independently by gpios.
>> The script sets up the ledtrig-netdev upon detection of an addition
>> of a wireless device on wlae-ag300n, and it is written so that it will
>> ignore other boards.
>> 
>> I wonder if there is a way to specify board-dependent base-file files
>> so that this script does not go into images for other boards, or
>> better yet, if there is a way to do this better.
> 
> 
> Signed-off-by: Yoichi Shinoda <[email protected]>
> 
> ===================================================================
> 30    0       
> target/linux/ar71xx/base-files/etc/hotplug.d/net/10-wlae-ag300n-wireless-led
> ===================================================================
> --- /dev/null
> +++ 
> b/target/linux/ar71xx/base-files/etc/hotplug.d/net/10-wlae-ag300n-wireless-led
> @@ -0,0 +1,30 @@
> +#!/bin/sh
> +#
> +# Manipulate Buffalo WLAE-AG300N wireless led (green only)
> +#
> +# If the blinking led is annoying, set the ledmode to "link"
> +
> +ledmode="link tx rx"
> +
> +# Check if the device is wireless first, to prevent ar71xx.sh
> +# from being read.
> +
> +if [ -e /sys$DEVPATH/phy80211 ]; then
> +     
> +     . /lib/ar71xx.sh
> +
> +     if [ `ar71xx_board_name` != "wlae-ag300n" ]; then
> +             exit 0
> +     fi
> +     
> +     leddev=/sys/class/leds/buffalo\:green\:wireless
> +
> +     if [ $ACTION = "add" ]; then
> +             echo netdev > $leddev/trigger
> +             echo $DEVICENAME > $leddev/device_name
> +             echo $ledmode > $leddev/mode
> +     elif [ $ACTION = "remove" ]; then
> +             echo none > $leddev/trigger
> +     fi
> +fi
> +
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> [email protected]
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to