[OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti AirRouter

Chuanhong Guo gch981213 at gmail.com
Fri Nov 16 06:05:30 EST 2018


Several suggestions inline :)
Russell Senior <russell at personaltelco.net> 于2018年11月16日周五 下午5:25写道:
...
> diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds b/target/linux/ath79/base-files/etc/board.d/01_leds
> index f04eb7f5c6..1343e03f90 100755
> --- a/target/linux/ath79/base-files/etc/board.d/01_leds
> +++ b/target/linux/ath79/base-files/etc/board.d/01_leds
> @@ -93,6 +93,8 @@ tplink,tl-wr841-v11)
>         ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
>         ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
>         ;;
> +ubnt,airrouter)
> +       ;;
This did nothing. 01_leds is used to add default led configurations.
If this device don't need this step you can skip modifying this file.
>  ubnt,bullet-m|\
>  ubnt,nano-m|\
>  ubnt,rocket-m)
> diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network
> index 5f02c5769a..8fb0188bb6 100755
> --- a/target/linux/ath79/base-files/etc/board.d/02_network
> +++ b/target/linux/ath79/base-files/etc/board.d/02_network
> @@ -31,6 +31,11 @@ ath79_setup_interfaces()
>         wd,mynet-wifi-rangeextender)
>                 ucidef_set_interface_lan "eth0"
>                 ;;
> +       ubnt,airrouter)
these "case" statements are in alphabetical order. This should be moved below.
> +               ucidef_set_interfaces_lan_wan "eth1" "eth0"
lan has been handled by ucidef_add_switch. Using
ucidef_set_interface_wan "eth0" here should be enough.
And by doing so this default configuration is duplicated with
tp-link,tl-wr841-v7. You can add this router there.
> +               ucidef_add_switch "switch0" \
> +                       "0 at eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
> +               ;;
>         avm,fritz4020)
>                 ucidef_set_interface_wan "eth0"
>                 ucidef_add_switch "switch0" \
...

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list