aredn/patches/708-define-aredn-ath79-netw...

327 lines
12 KiB
Diff

--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -113,7 +113,9 @@ ath79_setup_interfaces()
ubnt,unifi|\
wd,mynet-wifi-rangeextender|\
winchannel,wb2000)
- ucidef_set_interface_lan "eth0"
+ ucidef_set_interfaces_lan_wan "eth0" "eth0.1"
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
+ ucidef_set_interface "dtdlink" device "eth0.2" protocol "static"
;;
airtight,c-75)
ucidef_add_switch "switch0" \
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -130,7 +132,9 @@ ath79_setup_interfaces()
engenius,ews511ap|\
ocedo,ursus|\
ubnt,unifi-ap-outdoor-plus)
- ucidef_set_interface_lan "eth0 eth1"
+ ucidef_set_interfaces_lan_wan "eth0 eth1" "eth0.1 eth1.1"
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
+ ucidef_set_interface "dtdlink" device "eth0.2 eth1.2" protocol "static"
;;
atheros,db120)
ucidef_add_switch "switch0" \
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -165,6 +169,7 @@ ath79_setup_interfaces()
;;
buffalo,bhr-4grv2|\
trendnet,tew-823dru)
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
ucidef_add_switch "switch0" \
"0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth0"
;;
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -180,7 +185,8 @@ ath79_setup_interfaces()
ubnt,airrouter)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
- "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
+ "0@eth0" "1t:dummy" "1t:dtdlink" "4:lan" "3:lan" "2:lan"
+ ucidef_set_interface "wifi" device "wlan0" "protocol" "static"
;;
buffalo,wzr-hp-g300nh-rb|\
buffalo,wzr-hp-g300nh-s|\
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -214,7 +220,10 @@ ath79_setup_interfaces()
tplink,wbs510-v2|\
ubnt,nanostation-m|\
ubnt,routerstation)
- ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ucidef_set_interface_lan "eth0 eth1"
+ ucidef_set_interface_wan "eth0.1 eth1.1"
+ ucidef_set_interface "dtdlink" device "eth0.2 eth1.2" protocol "static"
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
;;
comfast,cf-e375ac)
ucidef_add_switch "switch0" \
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -272,13 +281,15 @@ ath79_setup_interfaces()
tplink,tl-wr1043nd-v4|\
tplink,tl-wr1043n-v5)
ucidef_add_switch "switch0" \
- "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
+ "0@eth0" "5:wan" "1t:wan" "1t:dtdlink" "2:lan" "3:lan" "4:lan"
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
;;
elecom,wrc-1750ghbk2-i|\
elecom,wrc-300ghbk2-i|\
sitecom,wlr-8100)
ucidef_add_switch "switch0" \
- "0@eth0" "2:lan:4" "3:lan:3" "4:lan:2" "5:lan:1" "1:wan"
+ "0@eth0" "5t:wan" "1:wan" "5t:dtdlink" "2:lan" "3:lan" "4:lan"
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
;;
embeddedwireless,balin)
ucidef_add_switch "switch0" \
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -303,7 +314,8 @@ ath79_setup_interfaces()
glinet,gl-ar750)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
- "0@eth0" "1:lan" "2:lan"
+ "0@eth0" "1:lan" "2t:dtdlink"
+ ucidef_set_interface "wifi" device "wlan1" protocol "static"
;;
glinet,gl-x300b)
ucidef_set_interface_wan "eth1"
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -355,7 +367,8 @@ ath79_setup_interfaces()
tplink,tl-wdr4300-v1-il|\
tplink,tl-wdr4310-v1)
ucidef_add_switch "switch0" \
- "0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan"
+ "0@eth0" "1:wan" "5t:wan" "5t:dtdlink" "2:lan" "3:lan" "4:lan"
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
;;
nec,wf1200cr)
ucidef_set_interface_wan "eth1"
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -367,8 +380,6 @@ ath79_setup_interfaces()
qxwlan,e1700ac-v2-16m|\
qxwlan,e750g-v8-8m|\
qxwlan,e750g-v8-16m|\
- ubnt,nanobeam-ac-gen2|\
- ubnt,nanostation-ac|\
yuncore,a782|\
yuncore,xd3200|\
yuncore,xd4200)
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -484,30 +495,38 @@ ath79_setup_interfaces()
ubnt,edgeswitch-5xp)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
- "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:lan"
+ "0@eth0" "1t:dummy" "1t:dtdlink" "2:lan" "3:lan" "4:lan" "5:lan"
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
;;
ubnt,edgeswitch-8xp)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
- "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "4:lan:5" "5:lan:6" "6:lan:7" "7:lan:8" "8@eth0"
+ "8@eth0" "7:wan" "1t:dtdlink" "2:lan" "3:lan" "4:lan" "5:lan" "6:lan"
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
;;
ubnt,routerstation-pro)
ucidef_set_interface_wan "eth0"
ucidef_add_switch "switch0" \
- "0@eth1" "2:lan:3" "3:lan:2" "4:lan:1"
+ "0@eth1" "4t:dummy" "4t:dtdlink" "2:lan" "3:lan"
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
;;
- ubnt,nanostation-m-xw)
- ucidef_add_switch "switch0" \
- "0@eth0" "5:lan" "1:wan"
+ ubnt,nanostation-m-xw|\
+ ubnt,nanobeam-ac-gen2|\
+ ubnt,nanostation-ac)
+ ucidef_set_interfaces_lan_wan "eth0" "eth0.1"
+ ucidef_set_interface "dtdlink" device "eth0.2" protocol "static"
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
;;
ubnt,unifiac-mesh-pro|\
ubnt,unifiac-pro)
ucidef_add_switch "switch0" \
- "0@eth0" "2:lan:1" "3:lan:2"
+ "0@eth0" "3t:wan" "3t:dtdlink" "2:lan"
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
;;
ubnt,unifi-ap-pro)
ucidef_add_switch "switch0" \
- "0@eth0" "1:lan" "2:lan"
+ "0@eth0" "3t:wan" "3t:dtdlink" "1:lan"
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
;;
tplink,deco-m4r-v1)
ucidef_add_switch "switch0" \
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -519,8 +538,15 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "3:lan:1" "4:lan:2"
;;
+ glinet,gl-ar150)
+ ucidef_set_interfaces_lan_wan "eth0 eth1" "eth0.1 eth1.1"
+ ucidef_set_interface "dtdlink" device "eth0.2 eth1.2" protocol "static"
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
+ ;;
*)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_wan "eth0" "eth0.1"
+ ucidef_set_interface "dtdlink" device "eth0.2" protocol "static"
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
;;
esac
}
--- a/target/linux/ath79/nand/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network
@@ -9,7 +9,9 @@ ath79_setup_interfaces()
case "$board" in
aerohive,hiveap-121|\
glinet,gl-e750)
- ucidef_set_interface_lan "eth0"
+ ucidef_set_interfaces_lan_wan "eth0" "eth0.1"
+ ucidef_set_interface "dtdlink" device "eth0.2" protocol "static"
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
;;
domywifi,dw33d)
ucidef_add_switch "switch0" \
--- a/target/linux/ath79/nand/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network
@@ -23,7 +25,8 @@ ath79_setup_interfaces()
glinet,gl-ar750s-nor|\
glinet,gl-ar750s-nor-nand)
ucidef_add_switch "switch0" \
- "0@eth0" "2:lan:2" "3:lan:1" "1:wan"
+ "0@eth0" "1:wan" "3t:dtdlink" "2:lan"
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
;;
glinet,gl-xe300)
ucidef_set_interface_wan "eth1"
--- a/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
@@ -19,6 +19,7 @@
mikrotik,routerboard-lhg-5nd|\
mikrotik,routerboard-mapl-2nd|\
mikrotik,routerboard-sxt-5nd-r2|\
+ mikrotik,routerboard-sxt-5nd|\
mikrotik,routerboard-wap-2nd|\
mikrotik,routerboard-wap-g-5hact2hnd|\
mikrotik,routerboard-wapr-2nd)
--- a/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
@@ -22,14 +22,21 @@
mikrotik,routerboard-wap-2nd|\
mikrotik,routerboard-wap-g-5hact2hnd|\
mikrotik,routerboard-wapr-2nd)
- ucidef_set_interface_lan "eth0"
+ ucidef_set_interfaces_lan_wan "eth0" "eth0.1"
+ ucidef_set_interface "dtdlink" device "eth0.2 eth1.2" protocol "static"
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
;;
- mikrotik,routerboard-951ui-2nd|\
- mikrotik,routerboard-952ui-5ac2nd)
+ mikrotik,routerboard-951ui-2nd)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
;;
+ mikrotik,routerboard-952ui-5ac2nd)
+ ucidef_set_interface_wan "eth1"
+ ucidef_set_interface "wifi" device "wlan1" protocol "static"
+ ucidef_add_switch "switch0" \
+ "0@eth0" "4:lan:2" "3:lan:3" "2:lan:4" "1t:dtdlink:5"
+ ;;
mikrotik,routerboard-map-2nd)
ucidef_set_interface_lan "eth0 eth1"
;;
--- a/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
@@ -35,7 +37,9 @@ ath79_setup_interfaces()
"0@eth0" "2:lan" "3:lan" "4:lan" "5:lan" "1:wan"
;;
*)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_wan "eth0" "eth1.1"
+ ucidef_set_interface "dtdlink" device "eth0.2" protocol "static"
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
;;
esac
}
--- a/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
@@ -27,6 +27,12 @@
ucidef_set_interface "dtdlink" device "eth0.2 eth1.2" protocol "static"
ucidef_set_interface "wifi" device "wlan0" protocol "static"
;;
+ mikrotik,routerboard-921gs-5hpacd-15s|\
+ mikrotik,routerboard-921gs-5hpacd-19s)
+ ucidef_set_interfaces_lan_wan "eth0 eth1" "eth0.1 eth1.1"
+ ucidef_set_interface "dtdlink" device "eth0.2 eth1.2" protocol "static"
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
+ ;;
mikrotik,routerboard-951ui-2nd)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
--- a/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
@@ -67,6 +68,7 @@
mikrotik,routerboard-map-2nd|\
mikrotik,routerboard-mapl-2nd|\
mikrotik,routerboard-sxt-5nd-r2|\
+ mikrotik,routerboard-sxt-5nd|\
mikrotik,routerboard-wap-2nd|\
mikrotik,routerboard-wap-g-5hact2hnd|\
mikrotik,routerboard-wapr-2nd)
--- a/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
@@ -82,6 +82,7 @@
lan_mac="$mac_base"
;;
mikrotik,routerboard-921gs-5hpacd-15s|\
+ mikrotik,routerboard-921gs-5hpacd-19s|\
mikrotik,routerboard-922uags-5hpacd)
label_mac="$mac_base"
lan_mac="$mac_base"
--- a/target/linux/ath79/tiny/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/tiny/base-files/etc/board.d/02_network
@@ -111,7 +111,10 @@
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
;;
ubnt,nanostation-m)
- ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ucidef_set_interface_lan "eth0 eth1"
+ ucidef_set_interface_wan "eth0.1 eth1.1"
+ ucidef_set_interface "dtdlink" device "eth0.2 eth1.2" protocol "static"
+ ucidef_set_interface "wifi" device "wlan0" protocol "static"
;;
*)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
--- a/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -26,6 +26,7 @@
mikrotik,routerboard-912uag-2hpnd|\
mikrotik,routerboard-lhg-2nd|\
mikrotik,routerboard-lhg-5nd|\
+ mikrotik,routerboard-sxt-5nd|\
mikrotik,routerboard-sxt-5nd-r2|\
mikrotik,routerboard-wap-2nd|\
mikrotik,routerboard-wapr-2nd)