ath79: add support for EnGenius EWS511AP
[openwrt/staging/mkresin.git] / target / linux / ath79 / base-files / etc / board.d / 02_network
index 626fb2cb3097f58e7ba78ce91415e9c2e0941f02..33166079e7ada62e7a8187aae73d24cb32be9fd3 100755 (executable)
@@ -86,6 +86,9 @@ ath79_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0@eth0" "1:wan" "2:lan:3" "3:lan:2"
                ;;
+       engenius,ews511ap)
+               ucidef_set_interface_lan "eth0 eth1" "dhcp"
+               ;;
        etactica,eg200)
                ucidef_set_interface_lan "eth0" "dhcp"
                ;;
@@ -252,6 +255,12 @@ ath79_setup_macs()
        elecom,wrc-300ghbk2-i)
                wan_mac=$(macaddr_add "$(mtd_get_mac_binary ART 4098)" -2)
                ;;
+       engenius,ews511ap)
+               lan_mac=$(mtd_get_mac_text "u-boot-env" 233)
+               eth1_mac=$(macaddr_add "$lan_mac" 1)
+               ucidef_set_interface "eth0" ifname "eth0" protocol "none" macaddr "$lan_mac"
+               ucidef_set_interface "eth1" ifname "eth1" protocol "none" macaddr "$eth1_mac"
+               ;;
        iodata,etg3-r)
                lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
                wan_mac=$(macaddr_add "$lan_mac" -1)