diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2019-10-22 19:04:27 +0200 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2019-11-06 13:17:25 +0100 |
commit | d2b9333ea90ed89069879b4a676211c72c859f9b (patch) | |
tree | ef6468a3d5684c4e6656b0357ec170fee0550325 /target/linux/ramips/rt305x/base-files | |
parent | f4026ad24d0374bdb8704e8b6ec38e9fd85f5e0e (diff) | |
download | upstream-d2b9333ea90ed89069879b4a676211c72c859f9b.tar.gz upstream-d2b9333ea90ed89069879b4a676211c72c859f9b.tar.bz2 upstream-d2b9333ea90ed89069879b4a676211c72c859f9b.zip |
ramips: remove default case for MAC address assignment
So far, MAC address assignment in ramips has contained a default
case, which defined wan_mac = eth0 + 1 for _every_ device not
having an explicit case there.
This is not desirable, as many device supporters will just not
care or know about this definition, so another MAC address will be
introduced by accident. In some cases the wan_mac is assigned
although it is not needed, in other cases even addresses not
dedicated to the device will be used (e.g. wan_mac actually is
eth0 - 1, but during support nobody cared, so eth0 + 1 is used now,
which might actually belong to another device ...).
Thus, in this PR the former default case is converted to an
explicit case. This one comprises all devices not being accounted
for by other cases, reduced by those not having wan at all.
The big number of entries for this node might be another indication
that many of them wouldn't actually be there if there hadn't been
default wan_mac setup.
In exchange, the current "do nothing" case can be removed, as it
will be the new default case.
The devices being put in the newly created explicit case were
determined as follows:
1. Create a list of all devices based on the DTS files.
2. Remove all devices already having an explicit entry setting
their address.
3. Remove all devices that only have lan set up in the first part
of 02_network:
mt7620:
- alfa-network,tube-e4g
- asus,rp-n53
- buffalo,wmr-300
- comfast,cf-wr800n
- edimax,ew-7476rpc
- edimax,ew-7478ac
- elecom,wrh-300cr
- hnet,c108
- kimax,u25awf-h1
- kimax,u35wf
- kingston,mlw221
- kingston,mlwg2
- microduino,microwrt
- netgear,ex2700
- netgear,ex3700
- netgear,wn3000rp-v3
- planex,cs-qr10
- planex,mzk-ex300np
- planex,mzk-ex750np
- ravpower,wd03
- sercomm,na930
- yukai,bocco
- zbtlink,zbt-cpe102
- zte,q7
mt7621:
- gnubee,gb-pc1
- gnubee,gb-pc2
- linksys,re6500
- mikrotik,rbm11g
- netgear,ex6150
- thunder,timecloud
- tplink,re350-v1
- tplink,re650-v1
mt76x8:
- alfa-network,awusfree1
- d-team,pbr-d1
- glinet,vixmini
- vocore,vocore2-lite
- tama,w06
- tplink,tl-mr3020-v3
- tplink,tl-wa801nd-v5
- tplink,tl-wr802n-v4
- tplink,tl-wr902ac-v3
- vocore,vocore2
- widora,neo-16m
- widora,neo-32m
rt288x:
- buffalo,wli-tx4-ag300n
- dlink,dap-1522-a1
rt305x:
- allnet,all0256n-4m
- allnet,all0256n-8m
- allnet,all5002
- allnet,all5003
- alphanetworks,asl26555-16m
- alphanetworks,asl26555-8m
- asus,wl-330n
- aximcom,mr-102n
- dlink,dcs-930
- easyacc,wizard-8800
- hame,mpr-a2
- hootoo,ht-tm02
- huawei,d105
- intenso,memory2move
- planex,mzk-dp150n
- rt305x dlink,dcs-930l-b1
- sparklan,wcr-150gn
- tenda,3g150b
- tenda,3g300m
- tenda,w150m
- trendnet,tew-638apb-v2
- unbranded,a5-v11
- vocore,vocore-16m
- vocore,vocore-8m
- wansview,ncs601w
- zorlik,zl5900v2
rt3883:
- loewe,wmdr-143n
- omnima,hpm
4. Put the remaining devices in the new case.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/ramips/rt305x/base-files')
-rwxr-xr-x | target/linux/ramips/rt305x/base-files/etc/board.d/02_network | 63 |
1 files changed, 56 insertions, 7 deletions
diff --git a/target/linux/ramips/rt305x/base-files/etc/board.d/02_network b/target/linux/ramips/rt305x/base-files/etc/board.d/02_network index 326bc8a3df..5c110b375e 100755 --- a/target/linux/ramips/rt305x/base-files/etc/board.d/02_network +++ b/target/linux/ramips/rt305x/base-files/etc/board.d/02_network @@ -166,16 +166,68 @@ ramips_setup_macs() local label_mac="" case $board in + 7links,px-4885-4m|\ + 7links,px-4885-8m|\ + accton,wr6202|\ + airlive,air3gii|\ + argus,atp-52b|\ + asiarf,awapn2403|\ + asiarf,awm002-evb-4m|\ + asiarf,awm002-evb-8m|\ + asus,rt-g32-b1|\ + asus,rt-n10-plus|\ + asus,rt-n13u|\ + asus,wl-330n3g|\ + aztech,hw550-3g|\ + belkin,f5d8235-v2|\ + belkin,f7c027|\ + dlink,dap-1350|\ + dlink,dir-300-b1|\ + dlink,dir-600-b1|\ + dlink,dir-610-a1|\ + dlink,dir-620-d1|\ + dlink,dwr-512-b|\ + edimax,3g-6200n|\ + edimax,3g-6200nl|\ + fon,fonera-20n|\ + huawei,hg255d|\ + jcg,jhr-n805r|\ + jcg,jhr-n825r|\ + jcg,jhr-n926r|\ + mofinetwork,mofi3500-3gn|\ + netcore,nw718|\ + nexx,wt1520-4m|\ + nexx,wt1520-8m|\ + nixcore,x1-16m|\ + nixcore,x1-8m|\ + olimex,rt5350f-olinuxino|\ + olimex,rt5350f-olinuxino-evb|\ + omnima,miniembplug|\ + omnima,miniembwifi|\ + planex,mzk-w300nh2|\ + planex,mzk-wdpr|\ + poray,ip2202|\ + prolink,pwh2004|\ + ralink,v22rw-2x2|\ + sitecom,wl-351|\ + teltonika,rut5xx|\ + trendnet,tew-714tru|\ + unbranded,wr512-3gn-4m|\ + unbranded,wr512-3gn-8m|\ + unbranded,xdx-rn502j|\ + upvel,ur-326n4g|\ + upvel,ur-336un|\ + zyxel,keenetic|\ + zyxel,nbg-419n|\ + zyxel,nbg-419n-v2) + wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1) + ;; 8devices,carambola|\ alfa-network,w502u|\ arcwireless,freestation5|\ netgear,wnce2001) wan_mac=$(mtd_get_mac_binary factory 0x2e) ;; - buffalo,whr-g300n|\ - zyxel,keenetic-start) - # This empty case has to be kept for devices without any MAC address adjustments - ;; dlink,dir-300-b7|\ dlink,dir-320-b1|\ dlink,dir-620-a1|\ @@ -209,9 +261,6 @@ ramips_setup_macs() tenda,w306r-v2) wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 5) ;; - *) - wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1) - ;; esac [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac |