case "$board" in
adtran,bsap1800-v2|\
adtran,bsap1840|\
+ allnet,all-wap02860ac|\
alfa-network,ap121f|\
+ alfa-network,pi-wifi4|\
+ arduino,yun|\
aruba,ap-105|\
+ avm,fritz1750e|\
avm,fritz300e|\
+ avm,fritzdvbc|\
+ comfast,cf-wr752ac-v1|\
+ comfast,cf-e130n-v2|\
devolo,dvl1200i|\
devolo,dvl1750c|\
devolo,dvl1750i|\
devolo,dvl1750x|\
+ dlink,dap-1330-a1|\
+ dlink,dap-1365-a1|\
+ dlink,dap-2230-a1|\
+ dlink,dap-2660-a1|\
+ dlink,dap-2680-a1|\
+ dlink,dap-3320-a1|\
dlink,dir-505|\
+ engenius,eap1200h|\
+ engenius,eap600|\
+ engenius,ecb1200|\
engenius,ecb1750|\
+ engenius,ecb600|\
+ enterasys,ws-ap3705i|\
glinet,gl-ar300m-lite|\
+ glinet,gl-usb150|\
+ hak5,wifi-pineapple-nano|\
+ meraki,mr16|\
netgear,ex6400|\
netgear,ex7300|\
ocedo,koala|\
ocedo,raccoon|\
+ openmesh,mr600-v1|\
+ openmesh,mr600-v2|\
+ openmesh,mr900-v1|\
+ openmesh,mr900-v2|\
+ openmesh,mr1750-v1|\
+ openmesh,mr1750-v2|\
pcs,cap324|\
pisen,ts-d084|\
pisen,wmb001n|\
tplink,cpe510-v2|\
tplink,cpe510-v3|\
tplink,cpe610-v1|\
+ tplink,cpe610-v2|\
+ tplink,eap225-outdoor-v1|\
+ tplink,eap225-v3|\
+ tplink,eap245-v1|\
tplink,re350k-v1|\
tplink,re355-v1|\
tplink,re450-v1|\
tplink,re450-v2|\
+ tplink,re450-v3|\
tplink,tl-wr902ac-v1|\
+ ubnt,bullet-ac|\
+ ubnt,bullet-m-ar7240|\
ubnt,bullet-m-ar7241|\
ubnt,bullet-m-xw|\
ubnt,lap-120|\
ubnt,litebeam-ac-gen2|\
ubnt,nanobeam-ac|\
+ ubnt,nanobridge-m|\
ubnt,nanostation-ac-loco|\
ubnt,nanostation-loco-m|\
ubnt,nanostation-loco-m-xw|\
ubnt,picostation-m|\
+ ubnt,powerbeam-5ac-500|\
+ ubnt,powerbeam-5ac-gen2|\
+ ubnt,powerbridge-m|\
ubnt,rocket-m|\
ubnt,unifiac-lite|\
ubnt,unifiac-lr|\
winchannel,wb2000)
ucidef_set_interface_lan "eth0"
;;
+ airtight,c-75)
+ ucidef_add_switch "switch0" \
+ "0@eth0" "2:wan" "3:lan" "6@eth1"
+ ;;
+ alfa-network,ap121fe)
+ ucidef_set_interface_lan "eth0 usb0"
+ ;;
+ alfa-network,n2q|\
+ alfa-network,n5q|\
+ devolo,dvl1200e|\
+ devolo,dvl1750e|\
+ engenius,enstationac-v1|\
+ engenius,ews511ap|\
+ ocedo,ursus|\
+ ubnt,unifi-ap-outdoor-plus)
+ ucidef_set_interface_lan "eth0 eth1"
+ ;;
avm,fritz4020|\
pcs,cr3000|\
tplink,archer-c58-v1|\
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:1" "2:lan:4" "3:lan:3" "4:lan:2"
;;
+ belkin,f9j1108-v2|\
+ belkin,f9k1115-v2|\
+ tplink,archer-c5-v1|\
+ tplink,archer-c7-v1|\
+ tplink,archer-c7-v2|\
+ tplink,tl-wdr4900-v2|\
+ tplink,tl-wdr7500-v3)
+ ucidef_add_switch "switch0" \
+ "0@eth1" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth0" "1:wan"
+ ;;
buffalo,bhr-4grv|\
buffalo,wzr-hp-g450h)
ucidef_add_switch "switch0" \
ucidef_add_switch "switch0" \
"0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth0"
;;
+ buffalo,wzr-600dhp|\
buffalo,wzr-hp-ag300h|\
tplink,archer-c25-v1|\
tplink,archer-c60-v1|\
tplink,archer-c60-v2|\
+ tplink,archer-c60-v3|\
tplink,tl-wdr3500-v1|\
tplink,tl-wr842n-v1|\
tplink,tl-wr842n-v3|\
comfast,cf-e110n-v2|\
comfast,cf-e120a-v3|\
comfast,cf-e314n-v2|\
+ compex,wpj531-16m|\
+ openmesh,om2p-v4|\
+ openmesh,om2p-hs-v4|\
+ plasmacloud,pa300|\
+ plasmacloud,pa300e|\
tplink,cpe210-v1|\
tplink,cpe220-v2|\
tplink,cpe220-v3|\
tplink,cpe510-v1|\
+ tplink,wbs210-v1|\
tplink,wbs210-v2|\
tplink,wbs510-v1|\
tplink,wbs510-v2|\
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
;;
comfast,cf-wr650ac-v1|\
- comfast,cf-wr650ac-v2)
+ comfast,cf-wr650ac-v2|\
+ zyxel,nbg6616)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth1"
;;
- devolo,dvl1200e|\
- devolo,dvl1750e|\
- ocedo,ursus)
- ucidef_set_interface_lan "eth0 eth1"
+ compex,wpj344-16m|\
+ compex,wpj563)
+ ucidef_add_switch "switch0" \
+ "0@eth0" "3:lan" "2:wan"
;;
devolo,magic-2-wifi)
ucidef_add_switch "switch0" \
"0@eth0" "2:wan" "3:lan" "4:lan"
;;
+ dlink,dap-2695-a1)
+ ucidef_add_switch "switch0" \
+ "0@eth0" "2:lan" "3:wan" "6@eth1"
+ ;;
+ dlink,dch-g020-a1)
+ ucidef_add_switch "switch0" \
+ "0@eth0" "1:lan:2" "2:lan:1"
+ ;;
dlink,dir-825-b1)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
ucidef_add_switch "switch0" \
"0@eth0" "1:wan" "2:lan:3" "3:lan:2"
;;
- engenius,ews511ap)
- ucidef_set_interface_lan "eth0 eth1" "dhcp"
+ engenius,eap300-v2)
+ ucidef_add_switch "switch0" \
+ "0@eth0" "1:lan"
+ ;;
+ engenius,ens202ext-v1)
+ ucidef_set_interface_lan "eth1"
+ ucidef_add_switch "switch0" \
+ "0@eth0" "1:lan"
;;
etactica,eg200)
ucidef_set_interface_lan "eth0" "dhcp"
ucidef_add_switch "switch0" \
"0@eth0" "5:wan" "6@eth1" "4:lan"
;;
+ meraki,mr12)
+ ucidef_set_interface_lan "eth0"
+ ucidef_add_switch "switch0" \
+ "0@eth1" "1:lan"
+ ;;
+ mercury,mw4530r-v1|\
+ tplink,archer-a7-v5|\
+ tplink,archer-c6-v2|\
+ tplink,archer-c6-v2-us|\
+ tplink,archer-c7-v4|\
+ tplink,archer-c7-v5|\
+ tplink,tl-wdr3600-v1|\
+ tplink,tl-wdr4300-v1|\
+ 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"
+ ;;
nec,wg1200cr|\
+ qxwlan,e1700ac-v2-8m|\
+ qxwlan,e1700ac-v2-16m|\
+ qxwlan,e750g-v8-8m|\
+ qxwlan,e750g-v8-16m|\
+ ubnt,nanobeam-ac-gen2|\
ubnt,nanostation-ac|\
- ubnt,unifiac-mesh-pro|\
- ubnt,unifiac-pro|\
yuncore,a782|\
yuncore,xd4200)
ucidef_add_switch "switch0" \
netgear,wndr3700|\
netgear,wndr3700-v2|\
netgear,wndr3800|\
- netgear,wndr3800ch)
+ netgear,wndr3800ch|\
+ netgear,wndrmac-v1|\
+ netgear,wndrmac-v2)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5u@eth0"
ucidef_add_switch "switch0" \
"0@eth0" "2:lan" "3:lan"
;;
+ qxwlan,e558-v2-8m|\
+ qxwlan,e558-v2-16m)
+ ucidef_add_switch "switch0" \
+ "0@eth1" "4:lan" "5:lan" "6@eth0" "3:wan"
+ ;;
rosinson,wr818)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:wan"
;;
- teltonika,rut955)
+ teltonika,rut955|\
+ teltonika,rut955-h7v3c0)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:3" "3:lan:2" "4:lan:1"
;;
- tplink,archer-a7-v5|\
- tplink,archer-c6-v2|\
- tplink,archer-c6-v2-us|\
- tplink,archer-c7-v4|\
- tplink,archer-c7-v5|\
- tplink,tl-wdr3600-v1|\
- tplink,tl-wdr4300-v1|\
- tplink,tl-wdr4300-v1-il)
+ tplink,archer-d50-v1)
ucidef_add_switch "switch0" \
- "0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan"
+ "0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "1:wan"
;;
- tplink,archer-c5-v1|\
- tplink,archer-c7-v1|\
- tplink,archer-c7-v2|\
- tplink,tl-wdr4900-v2)
+ tplink,archer-d7-v1|\
+ tplink,archer-d7b-v1)
ucidef_add_switch "switch0" \
- "0@eth1" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth0" "1:wan"
+ "0@eth1" "3:lan:3" "4:lan:2" "5:lan:1" "6@eth0" "2:wan:4" "1:wan:5"
;;
- tplink,archer-d50-v1)
+ tplink,eap225-wall-v2)
ucidef_add_switch "switch0" \
- "0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "1:wan"
+ "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
+ ;;
+ tplink,eap245-v3)
+ ucidef_add_switch "switch0" \
+ "0@eth0" "2:lan:1" "5:lan:2"
;;
tplink,tl-mr6400-v1)
ucidef_set_interfaces_lan_wan "eth0.1 eth1" "usb0"
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:1" "2:lan:3" "3:lan:2"
;;
+ tplink,tl-wpa8630-v1|\
+ tplink,tl-wpa8630p-v2-int|\
+ tplink,tl-wpa8630p-v2.0-eu|\
+ tplink,tl-wpa8630p-v2.1-eu)
+ # port 5 (internal) is the power-line port
+ ucidef_add_switch "switch0" \
+ "0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "5:lan:4"
+ ;;
tplink,tl-wr842n-v2)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9@eth0"
;;
- ubnt,acb-isp)
+ ubnt,aircube-ac)
+ ucidef_add_switch "switch0" \
+ "0@eth0" "2:lan:1" "3:lan:2" "5:lan:3" "4:wan"
+ ;;
+ ubnt,aircube-isp)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:1" "3:lan:3" "4:lan:2"
ucidef_add_switch "switch0" \
"0@eth0" "5:lan" "1:wan"
;;
+ ubnt,unifiac-mesh-pro|\
+ ubnt,unifiac-pro)
+ ucidef_add_switch "switch0" \
+ "0@eth0" "2:lan:1" "3:lan:2"
+ ;;
+ ubnt,unifi-ap-pro)
+ ucidef_add_switch "switch0" \
+ "0@eth0" "1:lan" "2:lan"
+ ;;
zbtlink,zbt-wd323|\
xiaomi,mi-router-4q)
ucidef_set_interface_wan "eth1"
lan_mac=$(mtd_get_mac_binary "Board data" 2)
label_mac=$lan_mac
;;
- alfa-network,ap121f)
+ alfa-network,ap121f|\
+ alfa-network,ap121fe|\
+ alfa-network,n2q|\
+ alfa-network,n5q|\
+ alfa-network,pi-wifi4|\
+ alfa-network,r36a|\
+ engenius,eap300-v2|\
+ engenius,ens202ext-v1)
label_mac=$(mtd_get_mac_binary art 0x1002)
;;
+ arduino,yun)
+ base_mac=$(mtd_get_mac_binary art 0x1002)
+ lan_mac=$(macaddr_setbit $base_mac 29)
+ [ $lan_mac = $base_mac ] && lan_mac=$(macaddr_unsetbit $base_mac 29)
+ ;;
+ avm,fritz1750e|\
+ avm,fritz450e|\
+ avm,fritzdvbc)
+ label_mac=$(fritz_tffs -n macwlan -i $(find_mtd_part "tffs (1)"))
+ ;;
avm,fritz300e)
lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
label_mac=$(fritz_tffs -n macwlan -i $(find_mtd_part "tffs (1)"))
lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
wan_mac=$(fritz_tffs -n macb -i $(find_mtd_part "tffs (1)"))
;;
+ compex,wpj344-16m|\
+ compex,wpj563)
+ wan_mac=$(mtd_get_mac_binary u-boot 0x2e018)
+ ;;
devolo,magic-2-wifi)
label_mac=$(macaddr_add "$(mtd_get_mac_binary art 0x1002)" 3)
;;
+ dlink,dap-1330-a1|\
+ dlink,dap-1365-a1|\
+ dlink,dch-g020-a1)
+ lan_mac=$(mtd_get_mac_text "mp" 0x1)
+ label_mac=$lan_mac
+ ;;
+ dlink,dap-2230-a1|\
+ dlink,dap-2660-a1|\
+ dlink,dap-2680-a1|\
+ dlink,dap-3320-a1)
+ lan_mac=$(mtd_get_mac_ascii bdcfg "lanmac")
+ label_mac=$lan_mac
+ ;;
+ dlink,dap-2695-a1)
+ label_mac=$(mtd_get_mac_ascii bdcfg "wlanmac")
+ ;;
dlink,dir-825-b1)
lan_mac=$(mtd_get_mac_text "caldata" 0xffa0)
wan_mac=$(mtd_get_mac_text "caldata" 0xffb4)
elecom,wrc-300ghbk2-i)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary art 0x1002)" -2)
;;
+ engenius,ecb1200|\
engenius,ecb1750)
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
- label_mac=$(mtd_get_mac_ascii u-boot-env athaddr)
+ label_mac=$lan_mac
;;
engenius,epg5000)
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
ucidef_set_interface "eth0" ifname "eth0" protocol "none" macaddr "$lan_mac"
ucidef_set_interface "eth1" ifname "eth1" protocol "none" macaddr "$eth1_mac"
;;
+ enterasys,ws-ap3705i)
+ label_mac=$(mtd_get_mac_ascii u-boot-env0 ethaddr)
+ ;;
+ hak5,lan-turtle|\
+ hak5,packet-squirrel)
+ label_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
+ ;;
iodata,etg3-r)
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
wan_mac=$(macaddr_add "$lan_mac" -1)
wan_mac=$(fconfig -s -r -d $(find_mtd_part "RedBoot config") -n alias/ethaddr)
lan_mac=$(macaddr_add "$wan_mac" 1)
;;
+ mercury,mw4530r-v1|\
+ tplink,tl-wdr3600-v1|\
+ tplink,tl-wdr4300-v1|\
+ tplink,tl-wdr4300-v1-il)
+ base_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
+ wan_mac=$(macaddr_add "$base_mac" 1)
+ ;;
nec,wg800hp)
lan_mac=$(mtd_get_mac_text board_data 0x280)
wan_mac=$(mtd_get_mac_text board_data 0x480)
;;
netgear,wndr3700|\
netgear,wndr3700-v2|\
- netgear,wndr3800)
+ netgear,wndr3800|\
+ netgear,wndrmac-v1|\
+ netgear,wndrmac-v2)
lan_mac=$(macaddr_setbit_la "$(mtd_get_mac_binary art 0x0)")
;;
phicomm,k2t)
base_mac=$(mtd_get_mac_binary info 0x8)
wan_mac=$(macaddr_add "$base_mac" 1)
;;
- tplink,tl-wdr3600-v1|\
- tplink,tl-wdr4300-v1|\
- tplink,tl-wdr4300-v1-il)
- base_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
- wan_mac=$(macaddr_add "$base_mac" 1)
- ;;
trendnet,tew-823dru)
lan_mac=$(mtd_get_mac_text mac 0x4)
wan_mac=$(mtd_get_mac_text mac 0x18)
label_mac=$wan_mac
;;
ubnt,airrouter|\
+ ubnt,bullet-m-ar7240|\
ubnt,bullet-m-ar7241|\
+ ubnt,nanobridge-m|\
ubnt,nanostation-loco-m|\
ubnt,nanostation-m|\
ubnt,picostation-m|\
+ ubnt,powerbridge-m|\
ubnt,rocket-m|\
ubnt,unifi)
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
;;
- ubnt,litebeam-ac-gen2)
+ ubnt,litebeam-ac-gen2|\
+ ubnt,nanobeam-ac-gen2|\
+ ubnt,powerbeam-5ac-500|\
+ ubnt,powerbeam-5ac-gen2)
label_mac=$(mtd_get_mac_binary art 0x5006)
;;
ubnt,routerstation|\
wd,mynet-wifi-rangeextender)
lan_mac=$(nvram get et0macaddr)
;;
+ zyxel,nbg6616)
+ label_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
+ ;;
esac
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac