[OpenWrt-Devel] [PATCH v2] ramips: add support for ELECOM WRH-300CR

Naoki FUKAUMI naobsd at gmail.com
Wed Apr 13 00:48:58 EDT 2016


On Tue, Apr 12, 2016 at 6:20 PM, FUKAUMI Naoki <naobsd at gmail.com> wrote:
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
> index 4b65d36..2863b88 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -162,7 +162,8 @@ ramips_setup_interfaces()
>         d105|\
>         hpm|\
>         na930|\
> -       wli-tx4-ag300n)
> +       wli-tx4-ag300n|\
> +       wrh-300cr)
>                 ucidef_set_interface_lan "eth0"
>                 ;;
>         e1700|\

I want to change this part as like as follows,

+       wrh-300cr)
+               ucidef_add_switch "switch0"
+               ucidef_add_switch_attr "switch0" "enable" "false"
+               ucidef_set_interface_lan "eth0"
+               ;;

/etc/config/network is fine with this change,

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '0'

but, mysteriously, following LED settings are gone from /etc/config/system :(

config led 'led_wifi_led'
        option name 'wifi'
        option sysfs 'wrh-300cr:green:wlan'
        option trigger 'netdev'
        option mode 'link tx rx'
        option dev 'wlan0'

config led 'led_lan'
        option name 'lan'
        option sysfs 'wrh-300cr:green:ethernet'
        option trigger 'netdev'
        option mode 'link tx rx'
        option dev 'eth0'

I'm very sure that LED settings are fine without this change.
(i.e. v2 is fine for LED)

any idea?


I made backported patch for 15.05 too. following lines work fine.

+       wrh-300cr)
+               ucidef_add_switch "switch0" "1" "0"
+               ucidef_set_interface_lan "eth0"
+               ;;

this change is required for 15.05 because switch0 vlan is enabled by
default in 15.05.

on _current_ trunk, switch0 vlan is disabled, so I can give up this
change. but I'm not sure it will never be changed.


by the way, in https://dev.openwrt.org/changeset/47720, why

 ucidef_add_switch "switch0" "1" "0"

is converted into

 ucidef_add_switch_attr "switch0" "reset" "false"


openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list