ramips: Reapply sorting to board.d files

This patch is cosmetical:
It only applies sorting based on device names, whereas renames
already took place in earlier patches.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Adrian Schmutzler 2019-07-03 23:22:47 +02:00 committed by Daniel Golle
parent b4588c8538
commit 5d50155f14
3 changed files with 577 additions and 577 deletions

View File

@ -17,24 +17,28 @@ led_wlan="$(get_dt_led wlan)"
[ -n "$led_wlan" ] && ucidef_set_led_wlan "wifi_led" "wifi" "$led_wlan" "phy0tpt" [ -n "$led_wlan" ] && ucidef_set_led_wlan "wifi_led" "wifi" "$led_wlan" "phy0tpt"
case $board in case $board in
edimax,3g-6200n|\ 7links,px-4885-4m|\
edimax,br-6475nd|\ 7links,px-4885-8m)
planex,mzk-w300nh2) set_wifi_led "px-4885:orange:wifi"
set_wifi_led "$boardname:amber:wlan"
;;
edimax,3g-6200nl|\
airlive,air3gii|\
hilink,hlk-7628n|\
aximcom,mr-102n|\
skylab,skw92a|\
netgear,wnce2001|\
zbtlink,zbt-we2026)
set_wifi_led "$boardname:green:wlan"
;; ;;
aigale,ai-br100) aigale,ai-br100)
ucidef_set_led_netdev "wan" "wan" "$boardname:blue:wan" "eth0.2" ucidef_set_led_netdev "wan" "wan" "$boardname:blue:wan" "eth0.2"
set_wifi_led "$boardname:blue:wlan" set_wifi_led "$boardname:blue:wlan"
;; ;;
airlink101,ar670w|\
airlink101,ar725w|\
asiarf,awapn2403)
set_wifi_led "rt2800soc-phy0::radio"
;;
airlive,air3gii|\
aximcom,mr-102n|\
edimax,3g-6200nl|\
hilink,hlk-7628n|\
netgear,wnce2001|\
skylab,skw92a|\
zbtlink,zbt-we2026)
set_wifi_led "$boardname:green:wlan"
;;
alfa-network,ac1200rm) alfa-network,ac1200rm)
set_wifi_led "$boardname:green:wlan2g" "wlan1" set_wifi_led "$boardname:green:wlan2g" "wlan1"
;; ;;
@ -43,10 +47,6 @@ edimax,br-6478ac-v2|\
edimax,ew-7478apc) edimax,ew-7478apc)
set_wifi_led "$boardname:blue:wlan" set_wifi_led "$boardname:blue:wlan"
;; ;;
edimax,ew-7476rpc|\
edimax,ew-7478ac)
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x20"
;;
alfa-network,tube-e4g) alfa-network,tube-e4g)
ucidef_set_led_netdev "4g" "4g" "$boardname:green:4g" "wwan0" ucidef_set_led_netdev "4g" "4g" "$boardname:green:4g" "wwan0"
ucidef_set_led_netdev "lan" "lan" "$boardname:blue:lan" "eth0" ucidef_set_led_netdev "lan" "lan" "$boardname:blue:lan" "eth0"
@ -59,16 +59,25 @@ allnet,all0256n-8m)
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "all0256n:green:rssihigh" "wlan0" "70" "100" "-69" "8" ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "all0256n:green:rssihigh" "wlan0" "70" "100" "-69" "8"
set_wifi_led "rt2800pci-phy0::radio" set_wifi_led "rt2800pci-phy0::radio"
;; ;;
airlink101,ar670w|\
airlink101,ar725w|\
asiarf,awapn2403)
set_wifi_led "rt2800soc-phy0::radio"
;;
alphanetworks,asl26555-8m|\ alphanetworks,asl26555-8m|\
alphanetworks,asl26555-16m) alphanetworks,asl26555-16m)
ucidef_set_led_netdev "eth" "ETH" "asl26555:green:eth" "eth0" ucidef_set_led_netdev "eth" "ETH" "asl26555:green:eth" "eth0"
set_wifi_led "asl26555:green:wlan" set_wifi_led "asl26555:green:wlan"
;; ;;
asus,rp-n53)
ucidef_set_led_netdev "eth" "Network" "$boardname:white:back" "eth0"
set_wifi_led "$boardname:blue:wifi"
;;
asus,rt-n12p)
ucidef_set_led_netdev "lan" "lan" "$boardname:green:lan" eth0.1
ucidef_set_led_netdev "wan" "wan" "$boardname:green:wan" eth0.2
set_wifi_led "$boardname:green:air"
;;
asus,rt-n14u)
ucidef_set_led_netdev "lan" "lan" "$boardname:blue:lan" eth0.1
ucidef_set_led_netdev "wan" "wan" "$boardname:blue:wan" eth0.2
set_wifi_led "$boardname:blue:air"
;;
bdcom,wap2100-sk|\ bdcom,wap2100-sk|\
hiwifi,hc5861b) hiwifi,hc5861b)
set_wifi_led "$boardname:green:wlan2g" set_wifi_led "$boardname:green:wlan2g"
@ -77,43 +86,7 @@ belkin,f9k1109v1)
set_usb_led "$boardname:green:usb1" set_usb_led "$boardname:green:usb1"
ucidef_set_led_netdev "lan" "lan" "$boardname:blue:wps" "eth0" ucidef_set_led_netdev "lan" "lan" "$boardname:blue:wps" "eth0"
;; ;;
hauppauge,broadway) alfa-network,w502u|\
set_wifi_led "$boardname:red:wps_active"
;;
hnet,c108)
ucidef_set_led_netdev "lan" "lan" "$boardname:green:lan" "eth0"
ucidef_set_led_netdev "modem" "modem" "$boardname:green:modem" "wwan0"
;;
tplink,archer-c20i)
ucidef_set_led_switch "lan" "lan" "$boardname:blue:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:blue:wan" "switch0" "0x01"
ucidef_set_led_wlan "wlan" "wlan" "$boardname:blue:wlan" "phy0radio"
;;
tplink,archer-c50-v1)
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
ucidef_set_led_netdev "wlan2g" "wlan2g" "$boardname:green:wlan2g" wlan1
set_wifi_led "$boardname:green:wlan5g"
;;
comfast,cf-wr800n)
ucidef_set_led_netdev "lan" "lan" "$boardname:white:ethernet" eth0.1
set_wifi_led "$boardname:white:wifi"
;;
cudy,wr1000)
ucidef_set_led_switch "wan" "wan" "$boardname:blue:wan" "switch0" "0x10"
ucidef_set_led_switch "lan1" "lan1" "$boardname:blue:lan1" "switch0" "0x08"
ucidef_set_led_switch "lan2" "lan2" "$boardname:blue:lan2" "switch0" "0x04"
;;
sanlinking,d240|\
kingston,mlw221|\
kingston,mlwg2|\
rakwireless,rak633|\
asus,rt-ac51u)
set_wifi_led "$boardname:blue:wifi"
;;
dlink,dcs-930l-b1)
ucidef_set_led_netdev "wifi" "WiFi" "$boardname:blue:wps"
;;
dlink,dir-300-b1|\ dlink,dir-300-b1|\
dlink,dir-300-b7|\ dlink,dir-300-b7|\
dlink,dir-320-b1|\ dlink,dir-320-b1|\
@ -124,29 +97,62 @@ dlink,dir-615-h1|\
dlink,dir-620-a1|\ dlink,dir-620-a1|\
engenius,esr-9753|\ engenius,esr-9753|\
hilink,hlk-rm04|\ hilink,hlk-rm04|\
zyxel,keenetic|\
zyxel,nbg-419n-v2|\
skyline,sl-r7205|\
ralink,v11st-fe|\
tenda,w306r-v2|\
alfa-network,w502u|\
nexx,wt1520-4m|\ nexx,wt1520-4m|\
nexx,wt1520-8m|\ nexx,wt1520-8m|\
zyxel,keenetic-start) ralink,v11st-fe|\
skyline,sl-r7205|\
tenda,w306r-v2|\
zyxel,keenetic-start|\
zyxel,keenetic|\
zyxel,nbg-419n-v2)
set_wifi_led "rt2800pci-phy0::radio" set_wifi_led "rt2800pci-phy0::radio"
;; ;;
asus,rt-ac51u|\
kingston,mlw221|\
kingston,mlwg2|\
rakwireless,rak633|\
sanlinking,d240)
set_wifi_led "$boardname:blue:wifi"
;;
belkin,f5d8235-v1)
set_wifi_led "$boardname:blue:wireless"
;;
comfast,cf-wr800n)
ucidef_set_led_netdev "lan" "lan" "$boardname:white:ethernet" eth0.1
set_wifi_led "$boardname:white:wifi"
;;
cudy,wr1000)
ucidef_set_led_switch "wan" "wan" "$boardname:blue:wan" "switch0" "0x10"
ucidef_set_led_switch "lan1" "lan1" "$boardname:blue:lan1" "switch0" "0x08"
ucidef_set_led_switch "lan2" "lan2" "$boardname:blue:lan2" "switch0" "0x04"
;;
d-team,newifi-d2)
ucidef_set_led_switch "internet" "internet" "$boardname:amber:internet" "switch0" "0x10"
ucidef_set_led_netdev "wlan2g" "WiFi 2.4GHz" "$boardname:blue:wlan2g" "wlan0"
ucidef_set_led_netdev "wlan5g" "WiFi 5GHz" "$boardname:blue:wlan5g" "wlan1"
;;
d-team,pbr-m1|\
gehua,ghl-r-001)
ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "eth0.2"
;;
dlink,dcs-930l-b1)
ucidef_set_led_netdev "wifi" "WiFi" "$boardname:blue:wps"
;;
dlink,dir-620-d1|\ dlink,dir-620-d1|\
dlink,dwr-116-a1|\ dlink,dwr-116-a1|\
head-weblink,hdrm200|\ head-weblink,hdrm200|\
ohyeah,oy-0001|\
planex,mzk-ex300np|\
trendnet,tew-714tru|\
zbtlink,zbt-wr8305rt|\
zyxel,keenetic-omni|\ zyxel,keenetic-omni|\
zyxel,keenetic-omni-ii|\ zyxel,keenetic-omni-ii|\
zyxel,keenetic-viva|\ zyxel,keenetic-viva)
planex,mzk-ex300np|\
ohyeah,oy-0001|\
trendnet,tew-714tru|\
zbtlink,zbt-wr8305rt)
set_wifi_led "$boardname:green:wifi" set_wifi_led "$boardname:green:wifi"
;; ;;
dlink,dir-860l-b1)
ucidef_set_led_netdev "wan" "wan" "$boardname:green:net" "eth0.2"
;;
dlink,dwr-118-a1) dlink,dwr-118-a1)
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1f" ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1f"
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x20" ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x20"
@ -164,28 +170,22 @@ dlink,dwr-922-e2)
ucidef_set_led_netdev "signalstrength" "signalstrength" "$boardname:green:sigstrength" "wwan0" "link" ucidef_set_led_netdev "signalstrength" "signalstrength" "$boardname:green:sigstrength" "wwan0" "link"
ucidef_set_led_netdev "4g" "4g" "$boardname:green:4g" "wwan0" "tx rx" ucidef_set_led_netdev "4g" "4g" "$boardname:green:4g" "wwan0" "tx rx"
;; ;;
dlink,dir-860l-b1) dovado,tiny-ac|\
ucidef_set_led_netdev "wan" "wan" "$boardname:green:net" "eth0.2" fon,fonera-20n)
;;
netgear,ex2700|\
netgear,wn3000rp-v3)
set_wifi_led "$boardname:green:router"
;;
netgear,ex3700)
ucidef_set_led_netdev "wlan5g" "ROUTER (green)" "$boardname:green:router" "wlan0"
ucidef_set_led_netdev "wlan2g" "DEVICE (green)" "$boardname:green:device" "wlan1"
;;
belkin,f5d8235-v1)
set_wifi_led "$boardname:blue:wireless"
;;
fon,fonera-20n|\
dovado,tiny-ac)
set_wifi_led "$boardname:orange:wifi" set_wifi_led "$boardname:orange:wifi"
;; ;;
gnubee,gb-pc1|\ edimax,3g-6200n|\
gnubee,gb-pc2) edimax,br-6475nd|\
ucidef_set_led_switch "lan1" "lan1" "$boardname:green:lan1" "switch0" "0x01" planex,mzk-w300nh2)
ucidef_set_led_switch "lan2" "lan2" "$boardname:green:lan2" "switch0" "0x10" set_wifi_led "$boardname:amber:wlan"
;;
edimax,ew-7476rpc|\
edimax,ew-7478ac)
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x20"
;;
elecom,wrh-300cr)
set_wifi_led "$boardname:green:wlan"
ucidef_set_led_netdev "lan" "lan" "$boardname:green:ethernet" "eth0"
;; ;;
glinet,gl-mt300a|\ glinet,gl-mt300a|\
glinet,gl-mt300n|\ glinet,gl-mt300n|\
@ -196,6 +196,14 @@ glinet,gl-mt300n-v2)
set_wifi_led "$boardname:red:wlan" set_wifi_led "$boardname:red:wlan"
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x1" ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x1"
;; ;;
gnubee,gb-pc1|\
gnubee,gb-pc2)
ucidef_set_led_switch "lan1" "lan1" "$boardname:green:lan1" "switch0" "0x01"
ucidef_set_led_switch "lan2" "lan2" "$boardname:green:lan2" "switch0" "0x10"
;;
hauppauge,broadway)
set_wifi_led "$boardname:red:wps_active"
;;
hiwifi,hc5661|\ hiwifi,hc5661|\
hiwifi,hc5661a) hiwifi,hc5661a)
ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "eth0.2" ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "eth0.2"
@ -207,23 +215,31 @@ hiwifi,hc5861)
ucidef_set_led_netdev "wifi5g" "wifi5g" "$boardname:blue:wlan5g" "wlan0" ucidef_set_led_netdev "wifi5g" "wifi5g" "$boardname:blue:wlan5g" "wlan0"
ucidef_set_led_netdev "wifi2g" "wifi2g" "$boardname:blue:wlan2g" "wlan1" ucidef_set_led_netdev "wifi2g" "wifi2g" "$boardname:blue:wlan2g" "wlan1"
;; ;;
huawei,hg255d) hnet,c108)
set_wifi_led "$boardname:green:wlan" ucidef_set_led_netdev "lan" "lan" "$boardname:green:lan" "eth0"
ucidef_set_led_netdev "internet" "internet" "$boardname:green:internet" "eth0.2" ucidef_set_led_netdev "modem" "modem" "$boardname:green:modem" "wwan0"
;;
omnima,hpm)
ucidef_set_led_netdev "eth" "ETH" "$boardname:green:eth" "eth0"
set_wifi_led "$boardname:green:wifi"
;; ;;
hootoo,ht-tm02) hootoo,ht-tm02)
ucidef_set_led_netdev "eth" "Ethernet" "$boardname:green:lan" "eth0" ucidef_set_led_netdev "eth" "Ethernet" "$boardname:green:lan" "eth0"
set_wifi_led "$boardname:blue:wlan" set_wifi_led "$boardname:blue:wlan"
;; ;;
huawei,hg255d)
set_wifi_led "$boardname:green:wlan"
ucidef_set_led_netdev "internet" "internet" "$boardname:green:internet" "eth0.2"
;;
intenso,memory2move)
set_wifi_led "$boardname:blue:wifi"
ucidef_set_led_netdev "eth" "Ethernet" "$boardname:green:wan" "eth0"
;;
iodata,wn-ac1167gr|\ iodata,wn-ac1167gr|\
iodata,wn-ac733gr3) iodata,wn-ac733gr3)
ucidef_set_led_wlan "wlan5g" "WLAN5G" "$boardname:green:wlan5g" "phy0radio" ucidef_set_led_wlan "wlan5g" "WLAN5G" "$boardname:green:wlan5g" "phy0radio"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "$boardname:green:wlan2g" "phy1radio" ucidef_set_led_wlan "wlan2g" "WLAN2G" "$boardname:green:wlan2g" "phy1radio"
;; ;;
kimax,u25awf-h1)
set_wifi_led "u25awf:red:wifi"
ucidef_set_led_netdev "eth" "eth" "u25awf:green:lan" "eth0"
;;
kimax,u35wf) kimax,u35wf)
set_wifi_led "$boardname:blue:wifi" set_wifi_led "$boardname:blue:wifi"
ucidef_set_led_netdev "eth" "ETH" "$boardname:green:eth" "eth0" ucidef_set_led_netdev "eth" "ETH" "$boardname:green:eth" "eth0"
@ -232,13 +248,19 @@ lava,lr-25g001)
ucidef_set_led_netdev "wlan2g" "WiFi 2.4GHz" "$boardname:green:wlan2g" "wlan1" ucidef_set_led_netdev "wlan2g" "WiFi 2.4GHz" "$boardname:green:wlan2g" "wlan1"
ucidef_set_led_netdev "wlan5g" "WiFi 5GHz" "$boardname:green:wlan5g" "wlan0" ucidef_set_led_netdev "wlan5g" "WiFi 5GHz" "$boardname:green:wlan5g" "wlan0"
;; ;;
lenovo,newifi-y1)
ucidef_set_led_netdev "wifi" "WIFI" "$boardname:blue:wifi" "wlan1"
ucidef_set_led_netdev "wifi5g" "WIFI5G" "$boardname:blue:wifi5g" "wlan0"
ucidef_set_led_switch "lan" "LAN" "$boardname:blue:lan" "switch0" "0x03"
;;
lenovo,newifi-y1s)
ucidef_set_led_netdev "wifi" "WIFI" "$boardname:yellow:wifi" "wlan1"
ucidef_set_led_netdev "wifi5g" "WIFI5G" "$boardname:blue:wifi" "wlan0"
ucidef_set_led_netdev "wan" "WAN" "$boardname:blue:internet" "eth0.2" "tx rx"
;;
mediatek,linkit-smart-7688) mediatek,linkit-smart-7688)
ucidef_set_led_wlan "wifi" "wifi" "linkit-smart-7688:orange:wifi" "phy0tpt" ucidef_set_led_wlan "wifi" "wifi" "linkit-smart-7688:orange:wifi" "phy0tpt"
;; ;;
intenso,memory2move)
set_wifi_led "$boardname:blue:wifi"
ucidef_set_led_netdev "eth" "Ethernet" "$boardname:green:wan" "eth0"
;;
mikrotik,rbm11g) mikrotik,rbm11g)
ucidef_set_rssimon "wlan0" "200000" "1" ucidef_set_rssimon "wlan0" "200000" "1"
ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:green:rssi0" "wlan0" "1" "100" ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:green:rssi0" "wlan0" "1" "100"
@ -247,71 +269,103 @@ mikrotik,rbm11g)
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssi3" "wlan0" "60" "100" ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssi3" "wlan0" "60" "100"
ucidef_set_led_rssi "rssiveryhigh" "RSSIVERYHIGH" "$boardname:green:rssi4" "wlan0" "80" "100" ucidef_set_led_rssi "rssiveryhigh" "RSSIVERYHIGH" "$boardname:green:rssi4" "wlan0" "80" "100"
;; ;;
omnima,miniembplug)
set_wifi_led "$boardname:red:wlan"
;;
tplink,archer-mr200)
ucidef_set_led_netdev "lan" "lan" "$boardname:white:lan" "eth0.1"
ucidef_set_led_netdev "wan" "wan" "$boardname:white:wan" "usb0"
set_wifi_led "$boardname:white:wlan"
;;
mtc,wr1201) mtc,wr1201)
ucidef_set_led_switch "eth_link" "LAN link" "$boardname:green:eth_link" "switch0" "0x0f" ucidef_set_led_switch "eth_link" "LAN link" "$boardname:green:eth_link" "switch0" "0x0f"
;; ;;
planex,mzk-ex750np|\ netgear,ex2700|\
zbtlink,zbt-we826-e) netgear,wn3000rp-v3)
set_wifi_led "$boardname:red:wifi" set_wifi_led "$boardname:green:router"
;;
netgear,ex3700)
ucidef_set_led_netdev "wlan5g" "ROUTER (green)" "$boardname:green:router" "wlan0"
ucidef_set_led_netdev "wlan2g" "DEVICE (green)" "$boardname:green:device" "wlan1"
;; ;;
netgear,r6120) netgear,r6120)
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x0f" ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x0f"
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x10" ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x10"
ucidef_set_led_wlan "wlan2g" "WiFi 2.4GHz" "$boardname:green:wlan2g" "phy0tpt" ucidef_set_led_wlan "wlan2g" "WiFi 2.4GHz" "$boardname:green:wlan2g" "phy0tpt"
;; ;;
gehua,ghl-r-001|\
d-team,pbr-m1)
ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "eth0.2"
;;
d-team,newifi-d2)
ucidef_set_led_switch "internet" "internet" "$boardname:amber:internet" "switch0" "0x10"
ucidef_set_led_netdev "wlan2g" "WiFi 2.4GHz" "$boardname:blue:wlan2g" "wlan0"
ucidef_set_led_netdev "wlan5g" "WiFi 5GHz" "$boardname:blue:wlan5g" "wlan1"
;;
phicomm,psg1208)
set_wifi_led "$boardname:white:wlan2g"
;;
7links,px-4885-4m|\
7links,px-4885-8m)
set_wifi_led "px-4885:orange:wifi"
;;
netgear,r6220|\ netgear,r6220|\
netgear,r6350|\ netgear,r6350|\
netgear,wndr3700-v5) netgear,wndr3700-v5)
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x10" ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x10"
set_wifi_led "$boardname:green:wifi" set_wifi_led "$boardname:green:wifi"
;; ;;
omnima,hpm)
ucidef_set_led_netdev "eth" "ETH" "$boardname:green:eth" "eth0"
set_wifi_led "$boardname:green:wifi"
;;
omnima,miniembplug)
set_wifi_led "$boardname:red:wlan"
;;
phicomm,psg1208)
set_wifi_led "$boardname:white:wlan2g"
;;
planex,mzk-ex750np|\
zbtlink,zbt-we826-e)
set_wifi_led "$boardname:red:wifi"
;;
tama,w06)
ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0"
ucidef_set_led_wlan "wlan" "WLAN" "$boardname:green:wlan" "phy0tpt"
;;
tplink,archer-c2-v1)
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch1" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch1" "0x01"
set_wifi_led "$boardname:green:wlan"
;;
tplink,archer-c20-v1)
ucidef_set_led_switch "lan" "lan" "$boardname:blue:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:blue:wan" "switch0" "0x01"
ucidef_set_led_netdev "wlan2g" "wlan2g" "$boardname:blue:wlan2g" "wlan0"
;;
tplink,archer-c20-v4)
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
ucidef_set_led_netdev "wlan2g" "wlan2g" "$boardname:green:wlan2g" "wlan0"
;;
tplink,archer-c20i)
ucidef_set_led_switch "lan" "lan" "$boardname:blue:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:blue:wan" "switch0" "0x01"
ucidef_set_led_wlan "wlan" "wlan" "$boardname:blue:wlan" "phy0radio"
;;
tplink,archer-c50-v1)
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
ucidef_set_led_netdev "wlan2g" "wlan2g" "$boardname:green:wlan2g" wlan1
set_wifi_led "$boardname:green:wlan5g"
;;
tplink,archer-c50-v3|\
tplink,archer-c50-v4)
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan2g" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "wlan5g" "$boardname:green:wlan5g" "phy1tpt"
;;
tplink,archer-mr200)
ucidef_set_led_netdev "lan" "lan" "$boardname:white:lan" "eth0.1"
ucidef_set_led_netdev "wan" "wan" "$boardname:white:wan" "usb0"
set_wifi_led "$boardname:white:wlan"
;;
tplink,re350-v1) tplink,re350-v1)
ucidef_set_led_netdev "wifi2g" "Wifi 2.4G" "$boardname:blue:wifi2G" "wlan0" ucidef_set_led_netdev "wifi2g" "Wifi 2.4G" "$boardname:blue:wifi2G" "wlan0"
ucidef_set_led_netdev "wifi5g" "Wifi 5G" "$boardname:blue:wifi5G" "wlan1" ucidef_set_led_netdev "wifi5g" "Wifi 5G" "$boardname:blue:wifi5G" "wlan1"
ucidef_set_led_netdev "eth_act" "LAN act" "$boardname:green:eth_act" "eth0" "tx rx" ucidef_set_led_netdev "eth_act" "LAN act" "$boardname:green:eth_act" "eth0" "tx rx"
ucidef_set_led_switch "eth_link" "LAN link" "$boardname:green:eth_link" "switch0" "0x01" ucidef_set_led_switch "eth_link" "LAN link" "$boardname:green:eth_link" "switch0" "0x01"
;; ;;
asus,rp-n53) tplink,tl-mr3020-v3)
ucidef_set_led_netdev "eth" "Network" "$boardname:white:back" "eth0" set_wifi_led "$boardname:green:wlan"
set_wifi_led "$boardname:blue:wifi" ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth0"
;; ;;
asus,rt-n12p) tplink,tl-mr3420-v5|\
ucidef_set_led_netdev "lan" "lan" "$boardname:green:lan" eth0.1 tplink,tl-wr842n-v5)
ucidef_set_led_netdev "wan" "wan" "$boardname:green:wan" eth0.2 ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan" "phy0tpt"
set_wifi_led "$boardname:green:air" ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
;; ;;
asus,rt-n14u) tplink,tl-wa801nd-v5)
ucidef_set_led_netdev "lan" "lan" "$boardname:blue:lan" eth0.1 ucidef_set_led_wlan "wlan" "wlan" "$boardname:green:wlan" "phy0tpt"
ucidef_set_led_netdev "wan" "wan" "$boardname:blue:wan" eth0.2 ucidef_set_led_netdev "lan" "lan" "$boardname:green:lan" "eth0"
set_wifi_led "$boardname:blue:air"
;;
tama,w06)
ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0"
ucidef_set_led_wlan "wlan" "WLAN" "$boardname:green:wlan" "phy0tpt"
;; ;;
tplink,tl-wr840n-v4) tplink,tl-wr840n-v4)
ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan" "phy0tpt" ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan" "phy0tpt"
@ -330,50 +384,10 @@ tplink,tl-wr841n-v14)
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e" ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01" ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
;; ;;
tplink,archer-c2-v1)
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch1" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch1" "0x01"
set_wifi_led "$boardname:green:wlan"
;;
tplink,archer-c20-v1)
ucidef_set_led_switch "lan" "lan" "$boardname:blue:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:blue:wan" "switch0" "0x01"
ucidef_set_led_netdev "wlan2g" "wlan2g" "$boardname:blue:wlan2g" "wlan0"
;;
tplink,archer-c20-v4)
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
ucidef_set_led_netdev "wlan2g" "wlan2g" "$boardname:green:wlan2g" "wlan0"
;;
tplink,archer-c50-v3|\
tplink,archer-c50-v4)
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan2g" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "wlan5g" "$boardname:green:wlan5g" "phy1tpt"
;;
tplink,tl-wa801nd-v5)
ucidef_set_led_wlan "wlan" "wlan" "$boardname:green:wlan" "phy0tpt"
ucidef_set_led_netdev "lan" "lan" "$boardname:green:lan" "eth0"
;;
tplink,tl-mr3020-v3)
set_wifi_led "$boardname:green:wlan"
ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth0"
;;
tplink,tl-mr3420-v5|\
tplink,tl-wr842n-v5)
ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan" "phy0tpt"
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
;;
tplink,tl-wr902ac-v3) tplink,tl-wr902ac-v3)
ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan" "phy0tpt" ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan" "phy0tpt"
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x10" ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x10"
;; ;;
kimax,u25awf-h1)
set_wifi_led "u25awf:red:wifi"
ucidef_set_led_netdev "eth" "eth" "u25awf:green:lan" "eth0"
;;
unielec,u7628-01-128m-16m) unielec,u7628-01-128m-16m)
ucidef_set_led_switch "lan1" "lan1" "u7628-01:green:lan1" "switch0" "0x2" ucidef_set_led_switch "lan1" "lan1" "u7628-01:green:lan1" "switch0" "0x2"
ucidef_set_led_switch "lan2" "lan2" "u7628-01:green:lan2" "switch0" "0x4" ucidef_set_led_switch "lan2" "lan2" "u7628-01:green:lan2" "switch0" "0x4"
@ -400,14 +414,6 @@ wavlink,wl-wn575a3)
ucidef_set_led_rssi "wifi-med" "wifi-med" "$boardname:green:wifi-med" "wlan1" "50" "84" ucidef_set_led_rssi "wifi-med" "wifi-med" "$boardname:green:wifi-med" "wlan1" "50" "84"
ucidef_set_led_rssi "wifi-high" "wifi-high" "$boardname:green:wifi-high" "wlan1" "85" "100" ucidef_set_led_rssi "wifi-high" "wifi-high" "$boardname:green:wifi-high" "wlan1" "85" "100"
;; ;;
zbtlink,we1026-5g-16m)
ucidef_set_led_netdev "lan" "LAN" "we1026-5g:green:lan" "eth0"
set_wifi_led "we1026-5g:green:wifi"
;;
elecom,wrh-300cr)
set_wifi_led "$boardname:green:wlan"
ucidef_set_led_netdev "lan" "lan" "$boardname:green:ethernet" "eth0"
;;
xiaomi,mir3g) xiaomi,mir3g)
ucidef_set_led_switch "wan-amber" "WAN (amber)" "$boardname:amber:wan" "switch0" "0x02" "0x08" ucidef_set_led_switch "wan-amber" "WAN (amber)" "$boardname:amber:wan" "switch0" "0x02" "0x08"
ucidef_set_led_switch "lan1-amber" "LAN1 (amber)" "$boardname:amber:lan1" "switch0" "0x08" "0x08" ucidef_set_led_switch "lan1-amber" "LAN1 (amber)" "$boardname:amber:lan1" "switch0" "0x08" "0x08"
@ -422,19 +428,17 @@ xiaomi,mir3p)
xzwifi,creativebox-v1) xzwifi,creativebox-v1)
ucidef_set_led_switch "internet" "internet" "$boardname:blue:internet" "switch0" "0x10" ucidef_set_led_switch "internet" "internet" "$boardname:blue:internet" "switch0" "0x10"
;; ;;
lenovo,newifi-y1)
ucidef_set_led_netdev "wifi" "WIFI" "$boardname:blue:wifi" "wlan1"
ucidef_set_led_netdev "wifi5g" "WIFI5G" "$boardname:blue:wifi5g" "wlan0"
ucidef_set_led_switch "lan" "LAN" "$boardname:blue:lan" "switch0" "0x03"
;;
lenovo,newifi-y1s)
ucidef_set_led_netdev "wifi" "WIFI" "$boardname:yellow:wifi" "wlan1"
ucidef_set_led_netdev "wifi5g" "WIFI5G" "$boardname:blue:wifi" "wlan0"
ucidef_set_led_netdev "wan" "WAN" "$boardname:blue:internet" "eth0.2" "tx rx"
;;
youhua,wr1200js) youhua,wr1200js)
ucidef_set_led_switch "internet" "INTERNET" "$boardname:green:wan" "switch0" "0x01" ucidef_set_led_switch "internet" "INTERNET" "$boardname:green:wan" "switch0" "0x01"
;; ;;
youku,yk1)
set_wifi_led "$boardname:blue:air"
ucidef_set_led_switch "wan" "wan" "$boardname:blue:wan" "switch0" "0x10"
;;
zbtlink,we1026-5g-16m)
ucidef_set_led_netdev "lan" "LAN" "we1026-5g:green:lan" "eth0"
set_wifi_led "we1026-5g:green:wifi"
;;
zbtlink,zbt-ape522ii) zbtlink,zbt-ape522ii)
ucidef_set_led_netdev "wlan2g4" "wlan1-link" "$boardname:green:wlan2g4" "wlan1" ucidef_set_led_netdev "wlan2g4" "wlan1-link" "$boardname:green:wlan2g4" "wlan1"
ucidef_set_led_netdev "sys1" "wlan1" "$boardname:green:sys1" "wlan1" "tx rx" ucidef_set_led_netdev "sys1" "wlan1" "$boardname:green:sys1" "wlan1" "tx rx"
@ -460,10 +464,6 @@ zyxel,keenetic-extra-ii)
set_wifi_led "$boardname:green:wifi" set_wifi_led "$boardname:green:wifi"
ucidef_set_led_switch "internet" "internet" "$boardname:green:internet" "switch0" "0x01" ucidef_set_led_switch "internet" "internet" "$boardname:green:internet" "switch0" "0x01"
;; ;;
youku,yk1)
set_wifi_led "$boardname:blue:air"
ucidef_set_led_switch "wan" "wan" "$boardname:blue:wan" "switch0" "0x10"
;;
esac esac
board_config_flush board_config_flush

View File

@ -31,64 +31,21 @@ ramips_setup_interfaces()
local board="$1" local board="$1"
case $board in case $board in
wevo,11acnas|\ accton,wr6202|\
d-team,newifi-d2|\ alfa-network,w502u|\
dlink,dir-615-h1|\ b2c|\
wevo,w2914ns-v2|\ netcore,nw718|\
zbtlink,zbt-we2026) petatel,psr-680w|\
ucidef_add_switch "switch0" \ skyline,sl-r7205|\
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan:5" "6@eth0" upvel,ur-336un)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
;; ;;
asiarf,ap7621-001) afoundry,ew1200|\
ucidef_add_switch "switch0" "0:lan" "4:wan" "6@eth0"
;;
tenda,3g150b|\
tenda,3g300m|\
unbranded,a5-v11|\
allnet,all0256n-4m|\
allnet,all0256n-8m|\
allnet,all5002|\
allnet,all5003|\
yukai,bocco|\
hauppauge,broadway|\
dlink,dcs-930|\
dlink,dcs-930l-b1|\
edimax,ew-7476rpc|\
edimax,ew-7478ac|\
hootoo,ht-tm02|\
kimax,u35wf|\
mediatek,linkit-smart-7688|\
intenso,memory2move|\
microduino,microwrt|\
mikrotik,rbm11g|\
hame,mpr-a2|\
wansview,ncs601w|\
onion,omega2|\
onion,omega2p|\
thunder,timecloud|\
tplink,tl-wa801nd-v5|\
tenda,w150m|\
widora,neo-16m|\
widora,neo-32m|\
netgear,wnce2001|\
zbtlink,zbt-cpe102|\
zorlik,zl5900v2|\
zte,q7)
ucidef_add_switch "switch0"
ucidef_add_switch_attr "switch0" "enable" "false"
ucidef_set_interface_lan "eth0"
;;
kingston,mlw221|\
aximcom,mr-102n)
ucidef_set_interface_lan "eth0.2"
;;
edimax,3g-6200n|\
aigale,ai-br100|\ aigale,ai-br100|\
alfa-network,ac1200rm|\ alfa-network,ac1200rm|\
mediatek,ap-mt7621a-v60|\ asus,rt-n12p|\
xzwifi,creativebox-v1|\ buffalo,whr-g300n|\
sanlinking,d240|\ d-team,pbr-m1|\
planex,db-wrt01|\
dlink,dir-300-b7|\ dlink,dir-300-b7|\
dlink,dir-320-b1|\ dlink,dir-320-b1|\
dlink,dir-610-a1|\ dlink,dir-610-a1|\
@ -97,121 +54,129 @@ ramips_setup_interfaces()
dlink,dwr-116-a1|\ dlink,dwr-116-a1|\
dlink,dwr-921-c1|\ dlink,dwr-921-c1|\
dlink,dwr-922-e2|\ dlink,dwr-922-e2|\
afoundry,ew1200|\ edimax,3g-6200n|\
firefly,firewrt|\ firefly,firewrt|\
hilink,hlk-rm04|\
hiwifi,hc5661a|\ hiwifi,hc5661a|\
hiwifi,hc5962|\ hiwifi,hc5962|\
hilink,hlk-rm04|\ mediatek,ap-mt7621a-v60|\
phicomm,k2p|\
zyxel,keenetic|\
zyxel,keenetic-omni|\
mercury,mac1200r-v2|\
xiaomi,miwifi-mini|\
xiaomi,miwifi-nano|\
mediatek,mt7621-eval-board|\ mediatek,mt7621-eval-board|\
mediatek,mt7628an-eval-board|\ mediatek,mt7628an-eval-board|\
mercury,mac1200r-v2|\
mqmaker,witi-256m|\
mqmaker,witi-512m|\
mtc,wr1201|\ mtc,wr1201|\
planex,mzk-750dhp|\
planex,mzk-w300nh2|\
nixcore,x1-8m|\
nixcore,x1-16m|\
ohyeah,oy-0001|\
d-team,pbr-m1|\
phicomm,psg1208|\
phicomm,psg1218a|\
netgear,r6220|\ netgear,r6220|\
netgear,r6350|\ netgear,r6350|\
asus,rt-n12p|\ netgear,wndr3700-v5|\
storylink,sap-g3200u3|\ netis,wf-2881|\
nixcore,x1-16m|\
nixcore,x1-8m|\
ohyeah,oy-0001|\
phicomm,k2p|\
phicomm,psg1208|\
phicomm,psg1218a|\
planex,db-wrt01|\
planex,mzk-750dhp|\
planex,mzk-w300nh2|\
planex,vr500|\
samknows,whitebox-v8|\ samknows,whitebox-v8|\
sanlinking,d240|\
storylink,sap-g3200u3|\
telco-electronics,x1|\ telco-electronics,x1|\
totolink,a7000r|\ totolink,a7000r|\
totolink,lr1200|\ totolink,lr1200|\
unielec,u7621-06-256m-16m|\ unielec,u7621-06-256m-16m|\
unielec,u7621-06-512m-64m|\ unielec,u7621-06-512m-64m|\
planex,vr500|\
wavlink,wl-wn570ha1|\ wavlink,wl-wn570ha1|\
wavlink,wl-wn575a3|\ wavlink,wl-wn575a3|\
netis,wf-2881|\ xiaomi,miwifi-mini|\
buffalo,whr-g300n|\ xiaomi,miwifi-nano|\
mqmaker,witi-256m|\ xzwifi,creativebox-v1|\
mqmaker,witi-512m|\
netgear,wndr3700-v5|\
youku,yk1|\
youku,yk-l2|\ youku,yk-l2|\
youku,yk1|\
zbtlink,zbt-ape522ii|\ zbtlink,zbt-ape522ii|\
zbtlink,zbt-we1326|\ zbtlink,zbt-we1326|\
zbtlink,zbt-we826-e|\
zbtlink,zbt-we3526|\ zbtlink,zbt-we3526|\
zbtlink,zbt-we826-16m|\ zbtlink,zbt-we826-16m|\
zbtlink,zbt-we826-32m|\ zbtlink,zbt-we826-32m|\
zbtlink,zbt-we826-e|\
zbtlink,zbt-wg2626|\ zbtlink,zbt-wg2626|\
zbtlink,zbt-wg3526-16m|\ zbtlink,zbt-wg3526-16m|\
zbtlink,zbt-wg3526-32m|\ zbtlink,zbt-wg3526-32m|\
zbtlink,zbt-wr8305rt) zbtlink,zbt-wr8305rt|\
zyxel,keenetic|\
zyxel,keenetic-omni)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
;; ;;
gehua,ghl-r-001)
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "4:wan" "6@eth0"
;;
alfa-network,awusfree1|\
alfa-network,tube-e4g|\
planex,cs-qr10|\
huawei,d105|\
dlink,dap-1522-a1|\
dlink,dch-m225|\
netgear,ex2700|\
netgear,ex3700|\
omnima,hpm|\
planex,mzk-ex300np|\
planex,mzk-ex750np|\
sercomm,na930|\
d-team,pbr-d1|\
ravpower,wd03|\
tama,w06|\
tplink,tl-mr3020-v3|\
tplink,tl-wr802n-v4|\
kimax,u25awf-h1|\
buffalo,wli-tx4-ag300n|\
loewe,wmdr-143n|\
buffalo,wmr-300|\
netgear,wn3000rp-v3|\
elecom,wrh-300cr)
ucidef_set_interface_lan "eth0"
;;
dlink,dwr-118-a1)
ucidef_add_switch "switch0" \
"1:lan:2" "2:lan:3" "3:lan:1" "4:lan:0" "5:wan" "6@eth0"
;;
dlink,dwr-118-a2)
ucidef_add_switch "switch0" \
"1:lan:2" "2:lan:1" "3:lan:3" "4:lan" "0:wan" "6@eth0"
;;
phicomm,psg1218b)
ucidef_add_switch "switch0" \
"0:lan:3" "1:lan:2" "2:lan:1" "3:wan" "6@eth0"
;;
buffalo,whr-300hp2|\
buffalo,whr-600d|\
buffalo,wsr-1166dhp|\
buffalo,wsr-600dhp)
ucidef_add_switch "switch0" \
"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "4:wan:5" "6@eth0"
;;
airlink101,ar670w|\ airlink101,ar670w|\
airlink101,ar725w|\ airlink101,ar725w|\
rakwireless,rak633|\ asus,rt-ac51u|\
asus,rt-ac51u) rakwireless,rak633)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6t@eth0" "0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6t@eth0"
;; ;;
belkin,f9k1109v1|\ alfa-network,awusfree1|\
asus,rt-n15|\ alfa-network,tube-e4g|\
sitecom,wl-351) buffalo,wli-tx4-ag300n|\
ucidef_add_switch "switch0" \ buffalo,wmr-300|\
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5@eth0" dlink,dap-1522-a1|\
dlink,dch-m225|\
d-team,pbr-d1|\
elecom,wrh-300cr|\
huawei,d105|\
kimax,u25awf-h1|\
loewe,wmdr-143n|\
netgear,ex2700|\
netgear,ex3700|\
netgear,wn3000rp-v3|\
omnima,hpm|\
planex,cs-qr10|\
planex,mzk-ex300np|\
planex,mzk-ex750np|\
ravpower,wd03|\
sercomm,na930|\
tama,w06|\
tplink,tl-mr3020-v3|\
tplink,tl-wr802n-v4)
ucidef_set_interface_lan "eth0"
;;
allnet,all0256n-4m|\
allnet,all0256n-8m|\
allnet,all5002|\
allnet,all5003|\
dlink,dcs-930l-b1|\
dlink,dcs-930|\
edimax,ew-7476rpc|\
edimax,ew-7478ac|\
hame,mpr-a2|\
hauppauge,broadway|\
hootoo,ht-tm02|\
intenso,memory2move|\
kimax,u35wf|\
mediatek,linkit-smart-7688|\
microduino,microwrt|\
mikrotik,rbm11g|\
netgear,wnce2001|\
onion,omega2p|\
onion,omega2|\
tenda,3g150b|\
tenda,3g300m|\
tenda,w150m|\
thunder,timecloud|\
tplink,tl-wa801nd-v5|\
unbranded,a5-v11|\
wansview,ncs601w|\
widora,neo-16m|\
widora,neo-32m|\
yukai,bocco|\
zbtlink,zbt-cpe102|\
zorlik,zl5900v2|\
zte,q7)
ucidef_add_switch "switch0"
ucidef_add_switch_attr "switch0" "enable" "false"
ucidef_set_interface_lan "eth0"
;; ;;
alphanetworks,asl26555-8m|\ alphanetworks,asl26555-8m|\
alphanetworks,asl26555-16m|\ alphanetworks,asl26555-16m|\
@ -222,8 +187,8 @@ ramips_setup_interfaces()
argus,atp-52b|\ argus,atp-52b|\
asiarf,awm002-evb-4m|\ asiarf,awm002-evb-4m|\
asiarf,awm002-evb-8m|\ asiarf,awm002-evb-8m|\
asus,rt-n14u|\
bdcom,wap2100-sk|\ bdcom,wap2100-sk|\
tplink,archer-c20i|\
dlink,dir-645|\ dlink,dir-645|\
glinet,gl-mt300a|\ glinet,gl-mt300a|\
glinet,gl-mt300n|\ glinet,gl-mt300n|\
@ -236,17 +201,17 @@ ramips_setup_interfaces()
mikrotik,rb750gr3|\ mikrotik,rb750gr3|\
mikrotik,rbm33g|\ mikrotik,rbm33g|\
planex,mzk-wdpr|\ planex,mzk-wdpr|\
asus,rt-n14u|\
skylab,skw92a|\ skylab,skw92a|\
tplink,archer-c20-v4|\ tplink,archer-c20-v4|\
tplink,archer-c20i|\
tplink,archer-c50-v3|\ tplink,archer-c50-v3|\
tplink,archer-c50-v4|\ tplink,archer-c50-v4|\
tplink,tl-mr3420-v5|\ tplink,tl-mr3420-v5|\
tplink,tl-wr842n-v5|\
tplink,tl-wr840n-v4|\ tplink,tl-wr840n-v4|\
tplink,tl-wr840n-v5|\ tplink,tl-wr840n-v5|\
tplink,tl-wr841n-v13|\ tplink,tl-wr841n-v13|\
tplink,tl-wr841n-v14|\ tplink,tl-wr841n-v14|\
tplink,tl-wr842n-v5|\
unielec,u7628-01-128m-16m|\ unielec,u7628-01-128m-16m|\
ubiquiti,edgerouterx|\ ubiquiti,edgerouterx|\
ubiquiti,edgerouterx-sfp|\ ubiquiti,edgerouterx-sfp|\
@ -260,49 +225,57 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0"
;; ;;
tplink,archer-c50-v1|\ asiarf,ap7621-001)
tplink,archer-c20-v1) ucidef_add_switch "switch0" "0:lan" "4:wan" "6@eth0"
ucidef_add_switch "switch0" \
"1:lan:3" "2:lan:4" "3:lan:1" "4:lan:2" "0:wan" "6@eth0"
;;
dlink,dir-860l-b1|\
elecom,wrc-1167ghbk2-s|\
elecom,wrc-2533gst|\
elecom,wrc-1900gst|\
huawei,hg255d|\
iodata,wn-ax1167gr|\
iodata,wn-gx300gr)
ucidef_add_switch "switch0" \
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0"
;;
gnubee,gb-pc1|\
gnubee,gb-pc2)
ucidef_add_switch "switch0" \
"0:lan" "4:lan" "6@eth0"
;;
glinet,gl-mt300n-v2)
ucidef_add_switch "switch0" \
"1:lan" "0:wan" "6@eth0"
;; ;;
asiarf,awapn2403) asiarf,awapn2403)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"0:lan" "1:wan" "6@eth0" "0:lan" "1:wan" "6@eth0"
;; ;;
b2c|\ asus,rt-n15|\
netcore,nw718|\ belkin,f9k1109v1|\
petatel,psr-680w|\ sitecom,wl-351)
skyline,sl-r7205|\
upvel,ur-336un|\
alfa-network,w502u|\
accton,wr6202)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
;;
edimax,br-6475nd)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9@eth0" "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5@eth0"
;; ;;
hnet,c108|\ asus,rt-n56u)
comfast,cf-wr800n) ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8@eth0"
;;
asus,wl-330n|\
easyacc,wizard-8800|\
kingston,mlwg2)
ucidef_set_interface_lan "eth0.1"
;;
aximcom,mr-102n|\
kingston,mlw221)
ucidef_set_interface_lan "eth0.2"
;;
belkin,f5d8235-v1|\
belkin,f5d8235-v2|\
buffalo,wzr-agl300nh|\
ralink,v11st-fe|\
trendnet,tew-714tru)
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "5@eth0"
;;
buffalo,wcr-1166ds)
ucidef_add_switch "switch0" \
"3:lan" "4:wan" "6@eth0"
;;
buffalo,whr-300hp2|\
buffalo,whr-600d|\
buffalo,wsr-1166dhp|\
buffalo,wsr-600dhp)
ucidef_add_switch "switch0" \
"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "4:wan:5" "6@eth0"
;;
buffalo,whr-1166d)
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "5:wan" "6@eth0"
;;
comfast,cf-wr800n|\
hnet,c108)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"4:lan" "6t@eth0" "4:lan" "6t@eth0"
;; ;;
@ -310,30 +283,75 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"2:lan:2" "3:lan:1" "4:wan" "6@eth0" "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
;; ;;
samsung,cy-swr1100) dlink,dir-510l|\
glinet,vixmini|\
netgear,ex6150|\
tplink,re350-v1)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "9@eth0" "0:lan" "6@eth0"
;;
dlink,dir-615-h1|\
d-team,newifi-d2|\
wevo,11acnas|\
wevo,w2914ns-v2|\
zbtlink,zbt-we2026)
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan:5" "6@eth0"
;;
dlink,dir-860l-b1|\
elecom,wrc-1167ghbk2-s|\
elecom,wrc-1900gst|\
elecom,wrc-2533gst|\
huawei,hg255d|\
iodata,wn-ax1167gr|\
iodata,wn-gx300gr)
ucidef_add_switch "switch0" \
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0"
;;
dlink,dwr-118-a1)
ucidef_add_switch "switch0" \
"1:lan:2" "2:lan:3" "3:lan:1" "4:lan:0" "5:wan" "6@eth0"
;;
dlink,dwr-118-a2)
ucidef_add_switch "switch0" \
"1:lan:2" "2:lan:1" "3:lan:3" "4:lan" "0:wan" "6@eth0"
;; ;;
duzun,dm06) duzun,dm06)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"1:lan" "0:wan" "6@eth0" "1:lan" "0:wan" "6@eth0"
;; ;;
linksys,e1700|\ edimax,br-6475nd)
ralink,mt7620a-mt7530-evb) ucidef_add_switch "switch0" \
ucidef_add_switch "switch1" \ "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9@eth0"
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
;; ;;
edimax,br-6478ac-v2|\ edimax,br-6478ac-v2|\
tplink,archer-c2-v1) tplink,archer-c2-v1)
ucidef_add_switch "switch1" \ ucidef_add_switch "switch1" \
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0"
;; ;;
hiwifi,hc5661|\ gehua,ghl-r-001)
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "4:wan" "6@eth0"
;;
glinet,gl-mt300n-v2)
ucidef_add_switch "switch0" \
"1:lan" "0:wan" "6@eth0"
;;
gnubee,gb-pc1|\
gnubee,gb-pc2)
ucidef_add_switch "switch0" \
"0:lan" "4:lan" "6@eth0"
;;
head-weblink,hdrm200|\ head-weblink,hdrm200|\
hiwifi,hc5661|\
lenovo,newifi-y1s) lenovo,newifi-y1s)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "5:lan" "0:wan" "6@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:lan" "0:wan" "6@eth0"
;; ;;
hiwifi,hc5761)
ucidef_add_switch "switch0" \
"1:lan" "4:lan" "0:wan" "6@eth0"
;;
hiwifi,hc5861) hiwifi,hc5861)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"0:lan" "1:lan" "5:wan" "6@eth0" "0:lan" "1:lan" "5:wan" "6@eth0"
@ -343,31 +361,53 @@ ramips_setup_interfaces()
ucidef_add_switch "switch1" \ ucidef_add_switch "switch1" \
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0"
;; ;;
zyxel,keenetic-omni-ii) lava,lr-25g001|\
sitecom,wlr-6000|\
trendnet,tew-691gr|\
trendnet,tew-692gr)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0"
;; ;;
zyxel,keenetic-viva) lenovo,newifi-d1)
ucidef_add_switch "switch0" \
"1:lan:2" "2:lan:1" "4:wan" "6@eth0"
;;
lenovo,newifi-y1|\
zbtlink,zbt-we1226)
ucidef_add_switch "switch0" \
"0:lan:2" "1:lan:1" "4:wan" "6@eth0"
;;
linksys,e1700|\
ralink,mt7620a-mt7530-evb)
ucidef_add_switch "switch1" \ ucidef_add_switch "switch1" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "7t@eth0" "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
;; ;;
kingston,mlwg2|\ linksys,re6500)
easyacc,wizard-8800|\
asus,wl-330n)
ucidef_set_interface_lan "eth0.1"
;;
tplink,archer-mr200)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "6t@eth0" "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "6@eth0"
ucidef_set_interface_wan "usb0"
;; ;;
netgear,r6120) netgear,r6120)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0" "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
;; ;;
hiwifi,hc5761) nexx,wt1520-4m|\
nexx,wt1520-8m|\
vonets,var11n-300)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"1:lan" "4:lan" "0:wan" "6@eth0" "0:lan" "4:wan" "6@eth0"
;;
nexx,wt3020-4m|\
nexx,wt3020-8m)
ucidef_add_switch "switch0" \
"4:lan" "0:wan" "6@eth0"
;;
phicomm,k2g)
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5:wan" "6@eth0"
;;
phicomm,psg1218b)
ucidef_add_switch "switch0" \
"0:lan:3" "1:lan:2" "2:lan:1" "3:wan" "6@eth0"
;; ;;
planex,mzk-dp150n|\ planex,mzk-dp150n|\
vocore,vocore-8m|\ vocore,vocore-8m|\
@ -375,75 +415,37 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"0:lan" "4:lan" "6t@eth0" "0:lan" "4:lan" "6t@eth0"
;; ;;
lenovo,newifi-d1) samsung,cy-swr1100)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"1:lan:2" "2:lan:1" "4:wan" "6@eth0" "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "9@eth0"
;;
phicomm,k2g)
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5:wan" "6@eth0"
;;
dlink,dir-510l|\
glinet,vixmini|\
netgear,ex6150|\
tplink,re350-v1)
ucidef_add_switch "switch0" \
"0:lan" "6@eth0"
;;
linksys,re6500)
ucidef_add_switch "switch0" \
"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "6@eth0"
;;
asus,rt-n56u)
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8@eth0"
;;
trendnet,tew-638apb-v2)
ucidef_add_switch "switch0" \
"4:lan" "6@eth0"
;;
lava,lr-25g001|\
trendnet,tew-691gr|\
trendnet,tew-692gr|\
sitecom,wlr-6000)
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0"
;;
tplink,tl-wr902ac-v3)
ucidef_add_switch "switch0" \
"4:lan" "6@eth0"
;;
vonets,var11n-300|\
nexx,wt1520-4m|\
nexx,wt1520-8m)
ucidef_add_switch "switch0" \
"0:lan" "4:wan" "6@eth0"
;;
vocore,vocore2|\
vocore,vocore2-lite)
ucidef_add_switch "switch0" \
"0:lan" "2:lan" "6t@eth0"
;;
belkin,f5d8235-v1|\
belkin,f5d8235-v2|\
trendnet,tew-714tru|\
ralink,v11st-fe|\
buffalo,wzr-agl300nh)
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "5@eth0"
;;
buffalo,wcr-1166ds)
ucidef_add_switch "switch0" \
"3:lan" "4:wan" "6@eth0"
;; ;;
sparklan,wcr-150gn|\ sparklan,wcr-150gn|\
zbtlink,we1026-5g-16m) zbtlink,we1026-5g-16m)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"0:lan" "6t@eth0" "0:lan" "6t@eth0"
;; ;;
buffalo,whr-1166d) tplink,archer-c20-v1|\
tplink,archer-c50-v1)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "5:wan" "6@eth0" "1:lan:3" "2:lan:4" "3:lan:1" "4:lan:2" "0:wan" "6@eth0"
;;
tplink,archer-mr200)
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "6t@eth0"
ucidef_set_interface_wan "usb0"
;;
tplink,tl-wr902ac-v3)
ucidef_add_switch "switch0" \
"4:lan" "6@eth0"
;;
trendnet,tew-638apb-v2)
ucidef_add_switch "switch0" \
"4:lan" "6@eth0"
;;
vocore,vocore2|\
vocore,vocore2-lite)
ucidef_add_switch "switch0" \
"0:lan" "2:lan" "6t@eth0"
;; ;;
wiznet,wizfi630a) wiznet,wizfi630a)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
@ -453,11 +455,6 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"0:wan" "3:lan" "4:lan" "6@eth0" "0:wan" "3:lan" "4:lan" "6@eth0"
;; ;;
nexx,wt3020-4m|\
nexx,wt3020-8m)
ucidef_add_switch "switch0" \
"4:lan" "0:wan" "6@eth0"
;;
xiaomi,mir3g) xiaomi,mir3g)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"2:lan:2" "3:lan:1" "1:wan" "6t@eth0" "2:lan:2" "3:lan:1" "1:wan" "6t@eth0"
@ -470,15 +467,18 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"4:lan:1" "2:lan:2" "0:wan" "6@eth0" "4:lan:1" "2:lan:2" "0:wan" "6@eth0"
;; ;;
zbtlink,zbt-we1226|\ zyxel,keenetic-omni-ii)
lenovo,newifi-y1)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"0:lan:2" "1:lan:1" "4:wan" "6@eth0" "0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6@eth0"
;; ;;
zyxel,keenetic-start) zyxel,keenetic-start)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"0:lan:3" "1:lan:2" "2:lan:1" "3:lan:0" "4:wan" "6@eth0" "0:lan:3" "1:lan:2" "2:lan:1" "3:lan:0" "4:wan" "6@eth0"
;; ;;
zyxel,keenetic-viva)
ucidef_add_switch "switch1" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "7t@eth0"
;;
*) *)
RT3X5X=`cat /proc/cpuinfo | egrep "(RT3.5|RT5350)"` RT3X5X=`cat /proc/cpuinfo | egrep "(RT3.5|RT5350)"`
if [ -n "${RT3X5X}" ]; then if [ -n "${RT3X5X}" ]; then
@ -497,56 +497,61 @@ ramips_setup_macs()
local wan_mac="" local wan_mac=""
case $board in case $board in
unbranded,a5-v11|\
hootoo,ht-tm02|\
loewe,wmdr-143n)
lan_mac=$(cat /sys/class/net/eth0/address)
;;
8devices,carambola|\ 8devices,carambola|\
arcwireless,freestation5|\
alfa-network,w502u|\ alfa-network,w502u|\
arcwireless,freestation5|\
netgear,wnce2001) netgear,wnce2001)
wan_mac=$(mtd_get_mac_binary factory 46) wan_mac=$(mtd_get_mac_binary factory 46)
;; ;;
nexaira,bc2|\ arcwireless,freestation5|\
hauppauge,broadway|\
huawei,d105|\
dlink,dir-300-b7|\ dlink,dir-300-b7|\
dlink,dir-320-b1|\ dlink,dir-320-b1|\
dlink,dir-620-a1|\ dlink,dir-620-a1|\
engenius,esr-9753|\ engenius,esr-9753|\
arcwireless,freestation5|\ hame,mpr-a1|\
hauppauge,broadway|\
huawei,d105|\
hilink,hlk-7628n|\ hilink,hlk-7628n|\
hilink,hlk-rm04|\ hilink,hlk-rm04|\
hame,mpr-a1|\
petatel,psr-680w|\
skyline,sl-r7205|\
lenovo,newifi-y1|\ lenovo,newifi-y1|\
lenovo,newifi-y1s) lenovo,newifi-y1s|\
nexaira,bc2|\
petatel,psr-680w|\
skyline,sl-r7205)
lan_mac=$(cat /sys/class/net/eth0/address) lan_mac=$(cat /sys/class/net/eth0/address)
lan_mac=$(macaddr_setbit_la "$lan_mac") lan_mac=$(macaddr_setbit_la "$lan_mac")
wan_mac=$(macaddr_add "$lan_mac" 1) wan_mac=$(macaddr_add "$lan_mac" 1)
;; ;;
asus,rt-n56u)
lan_mac=$(cat /sys/class/net/eth0/address)
lan_mac=$(macaddr_setbit_la "$lan_mac")
wan_mac=$(mtd_get_mac_binary factory 32772)
;;
belkin,f9k1109v1) belkin,f9k1109v1)
wan_mac=$(mtd_get_mac_ascii uboot-env HW_WAN_MAC) wan_mac=$(mtd_get_mac_ascii uboot-env HW_WAN_MAC)
lan_mac=$(mtd_get_mac_ascii uboot-env HW_LAN_MAC) lan_mac=$(mtd_get_mac_ascii uboot-env HW_LAN_MAC)
;; ;;
edimax,br-6475nd) buffalo,wcr-1166ds|\
lan_mac=$(cat /sys/class/net/eth0/address) buffalo,wsr-1166dhp)
wan_mac=$(mtd_get_mac_binary devdata 7) local index="$(find_mtd_index "board_data")"
wan_mac="$(grep -m1 mac= "/dev/mtd${index}" | cut -d= -f2)"
lan_mac=$wan_mac
;; ;;
samsung,cy-swr1100|\ buffalo,whr-1166d|\
dlink,dch-m225) buffalo,whr-300hp2|\
buffalo,whr-600d|\
buffalo,wsr-600dhp)
wan_mac=$(mtd_get_mac_binary factory 4)
lan_mac=$wan_mac
;;
buffalo,whr-g300n|\
glinet,gl-mt300n-v2)
wan_mac=$(mtd_get_mac_binary factory 4)
;;
dlink,dch-m225|\
samsung,cy-swr1100)
lan_mac=$(mtd_get_mac_ascii factory lanmac) lan_mac=$(mtd_get_mac_ascii factory lanmac)
;; ;;
dlink,dir-645)
lan_mac=$(mtd_get_mac_ascii nvram lanmac)
wan_mac=$(mtd_get_mac_ascii nvram wanmac)
;;
dlink,dir-860l-b1)
lan_mac=$(mtd_get_mac_ascii factory lanmac)
wan_mac=$(mtd_get_mac_ascii factory wanmac)
;;
dlink,dir-510l|\ dlink,dir-510l|\
dlink,dwr-116-a1|\ dlink,dwr-116-a1|\
dlink,dwr-118-a1|\ dlink,dwr-118-a1|\
@ -557,33 +562,47 @@ ramips_setup_macs()
wan_mac=$(jboot_config_read -m -i $(find_mtd_part "config") -o 0xE000) wan_mac=$(jboot_config_read -m -i $(find_mtd_part "config") -o 0xE000)
lan_mac=$(macaddr_add "$wan_mac" 1) lan_mac=$(macaddr_add "$wan_mac" 1)
;; ;;
linksys,e1700) dlink,dir-645)
wan_mac=$(mtd_get_mac_ascii config WAN_MAC_ADDR) lan_mac=$(mtd_get_mac_ascii nvram lanmac)
wan_mac=$(mtd_get_mac_ascii nvram wanmac)
;;
dlink,dir-860l-b1)
lan_mac=$(mtd_get_mac_ascii factory lanmac)
wan_mac=$(mtd_get_mac_ascii factory wanmac)
;;
dovado,tiny-ac)
lan_mac=$(mtd_get_mac_ascii u-boot-env LAN_MAC_ADDR)
wan_mac=$(mtd_get_mac_ascii u-boot-env WAN_MAC_ADDR)
;;
edimax,br-6475nd)
lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(mtd_get_mac_binary devdata 7)
;; ;;
edimax,br-6478ac-v2) edimax,br-6478ac-v2)
lan_mac=$(cat /sys/class/net/eth0/address) lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 2) wan_mac=$(macaddr_add "$lan_mac" 2)
;; ;;
elecom,wrc-1167ghbk2-s|\ elecom,wrc-1167ghbk2-s|\
elecom,wrc-2533gst|\
elecom,wrc-1900gst|\ elecom,wrc-1900gst|\
elecom,wrc-2533gst|\
samknows,whitebox-v8) samknows,whitebox-v8)
wan_mac=$(mtd_get_mac_binary factory 57350) wan_mac=$(mtd_get_mac_binary factory 57350)
;; ;;
glinet,gl-mt300n-v2|\
buffalo,whr-g300n)
wan_mac=$(mtd_get_mac_binary factory 4)
;;
hiwifi,hc5661|\ hiwifi,hc5661|\
hiwifi,hc5661a|\
hiwifi,hc5761|\ hiwifi,hc5761|\
hiwifi,hc5861|\ hiwifi,hc5861|\
hiwifi,hc5661a|\ hiwifi,hc5861b|\
hiwifi,hc5962|\ hiwifi,hc5962)
hiwifi,hc5861b)
lan_mac=`mtd_get_mac_ascii bdinfo "Vfac_mac "` lan_mac=`mtd_get_mac_ascii bdinfo "Vfac_mac "`
[ -n "$lan_mac" ] || lan_mac=$(cat /sys/class/net/eth0/address) [ -n "$lan_mac" ] || lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 1) wan_mac=$(macaddr_add "$lan_mac" 1)
;; ;;
hootoo,ht-tm02|\
loewe,wmdr-143n|\
unbranded,a5-v11)
lan_mac=$(cat /sys/class/net/eth0/address)
;;
iodata,wn-ac1167gr|\ iodata,wn-ac1167gr|\
iodata,wn-ac733gr3) iodata,wn-ac733gr3)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary Factory 4)" -1) wan_mac=$(macaddr_add "$(mtd_get_mac_binary Factory 4)" -1)
@ -592,10 +611,12 @@ ramips_setup_macs()
iodata,wn-gx300gr) iodata,wn-gx300gr)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary Factory 4)" 1) wan_mac=$(macaddr_add "$(mtd_get_mac_binary Factory 4)" 1)
;; ;;
zyxel,keenetic-omni|\ lenovo,newifi-d1)
zyxel,keenetic-omni-ii|\ lan_mac=$(cat /sys/class/net/eth0/address)
zyxel,keenetic-viva) lan_mac=$(macaddr_add "$lan_mac" 2)
wan_mac=$(mtd_get_mac_binary factory 40) ;;
linksys,e1700)
wan_mac=$(mtd_get_mac_ascii config WAN_MAC_ADDR)
;; ;;
mediatek,linkit-smart-7688) mediatek,linkit-smart-7688)
wan_mac=$(mtd_get_mac_binary factory 4) wan_mac=$(mtd_get_mac_binary factory 4)
@ -605,9 +626,25 @@ ramips_setup_macs()
lan_mac=$(mtd_get_mac_binary factory_info 13) lan_mac=$(mtd_get_mac_binary factory_info 13)
wan_mac=$(macaddr_add "$lan_mac" 1) wan_mac=$(macaddr_add "$lan_mac" 1)
;; ;;
xiaomi,miwifi-mini) netgear,r6220|\
wan_mac=$(cat /sys/class/net/eth0/address) netgear,r6350|\
lan_mac=$(macaddr_setbit_la "$wan_mac") netgear,wndr3700-v5)
wan_mac=$(mtd_get_mac_binary factory 4)
lan_mac=$(macaddr_add "$wan_mac" 1)
;;
ohyeah,oy-0001|\
phicomm,k2g)
lan_mac=$(mtd_get_mac_binary factory 40)
wan_mac=$(mtd_get_mac_binary factory 46)
;;
onion,omega2|\
onion,omega2p)
wan_mac=$(mtd_get_mac_binary factory 4)
lan_mac=$(mtd_get_mac_binary factory 46)
;;
planex,vr500)
lan_mac=$(mtd_get_mac_binary factory 57344)
wan_mac=$(mtd_get_mac_binary factory 57350)
;; ;;
poray,m3|\ poray,m3|\
poray,m4-4m|\ poray,m4-4m|\
@ -617,80 +654,43 @@ ramips_setup_macs()
lan_mac=$(cat /sys/class/net/eth0/address) lan_mac=$(cat /sys/class/net/eth0/address)
lan_mac=$(macaddr_add "$lan_mac" -2) lan_mac=$(macaddr_add "$lan_mac" -2)
;; ;;
lenovo,newifi-d1) sitecom,wlr-6000)
lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 32772)" 2)
lan_mac=$(macaddr_add "$lan_mac" 2)
;;
onion,omega2|\
onion,omega2p)
wan_mac=$(mtd_get_mac_binary factory 4)
lan_mac=$(mtd_get_mac_binary factory 46)
;;
ohyeah,oy-0001|\
phicomm,k2g)
lan_mac=$(mtd_get_mac_binary factory 40)
wan_mac=$(mtd_get_mac_binary factory 46)
;;
netgear,r6220|\
netgear,r6350|\
netgear,wndr3700-v5)
wan_mac=$(mtd_get_mac_binary factory 4)
lan_mac=$(macaddr_add "$wan_mac" 1)
;;
asus,rt-n56u)
lan_mac=$(cat /sys/class/net/eth0/address)
lan_mac=$(macaddr_setbit_la "$lan_mac")
wan_mac=$(mtd_get_mac_binary factory 32772)
;; ;;
skylab,skw92a) skylab,skw92a)
lan_mac=$(mtd_get_mac_binary factory 40) lan_mac=$(mtd_get_mac_binary factory 40)
wan_mac=$(mtd_get_mac_binary factory 46) wan_mac=$(mtd_get_mac_binary factory 46)
;; ;;
sparklan,wcr-150gn)
wan_mac=$(mtd_get_mac_binary factory 40)
;;
tenda,w306r-v2)
lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 5)
;;
trendnet,tew-691gr) trendnet,tew-691gr)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 4)" 3) wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 4)" 3)
;; ;;
trendnet,tew-692gr) trendnet,tew-692gr)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 4)" 1) wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 4)" 1)
;; ;;
dovado,tiny-ac)
lan_mac=$(mtd_get_mac_ascii u-boot-env LAN_MAC_ADDR)
wan_mac=$(mtd_get_mac_ascii u-boot-env WAN_MAC_ADDR)
;;
planex,vr500)
lan_mac=$(mtd_get_mac_binary factory 57344)
wan_mac=$(mtd_get_mac_binary factory 57350)
;;
tenda,w306r-v2)
lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 5)
;;
buffalo,wcr-1166ds|\
buffalo,wsr-1166dhp)
local index="$(find_mtd_index "board_data")"
wan_mac="$(grep -m1 mac= "/dev/mtd${index}" | cut -d= -f2)"
lan_mac=$wan_mac
;;
sparklan,wcr-150gn)
wan_mac=$(mtd_get_mac_binary factory 40)
;;
buffalo,whr-1166d|\
buffalo,whr-300hp2|\
buffalo,whr-600d|\
buffalo,wsr-600dhp)
wan_mac=$(mtd_get_mac_binary factory 4)
lan_mac=$wan_mac
;;
wiznet,wizfi630a) wiznet,wizfi630a)
lan_mac=$(mtd_get_mac_binary factory 4) lan_mac=$(mtd_get_mac_binary factory 4)
wan_mac=$(mtd_get_mac_binary factory 40) wan_mac=$(mtd_get_mac_binary factory 40)
;; ;;
sitecom,wlr-6000)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 32772)" 2)
;;
xiaomi,mir3g|\ xiaomi,mir3g|\
xiaomi,mir3p) xiaomi,mir3p)
lan_mac=$(mtd_get_mac_binary Factory 0xe006) lan_mac=$(mtd_get_mac_binary Factory 0xe006)
;; ;;
xiaomi,miwifi-mini)
wan_mac=$(cat /sys/class/net/eth0/address)
lan_mac=$(macaddr_setbit_la "$wan_mac")
;;
zyxel,keenetic-omni|\
zyxel,keenetic-omni-ii|\
zyxel,keenetic-viva)
wan_mac=$(mtd_get_mac_binary factory 40)
;;
zyxel,keenetic-start) zyxel,keenetic-start)
wan_mac=$(mtd_get_mac_binary factory 40) wan_mac=$(mtd_get_mac_binary factory 40)
;; ;;

View File

@ -14,13 +14,13 @@ fix_checksum() {
board=$(board_name) board=$(board_name)
case "$board" in case "$board" in
samsung,cy-swr1100|\
dlink,dch-m225|\
dlink,dir-645|\
dlink,dir-860l-b1)
fix_checksum seama
;;
dlink,dap-1522-a1) dlink,dap-1522-a1)
fix_checksum wrg fix_checksum wrg
;; ;;
dlink,dch-m225|\
dlink,dir-645|\
dlink,dir-860l-b1|\
samsung,cy-swr1100)
fix_checksum seama
;;
esac esac