ixp4xx: Support single zcom_npe_esa hw address
Some ixp4xx platforms with a proper RedBoot config do not contain the per-ethernet interface npe_eth0_esa, but rather a single entry named zcom_npe_esa. Let's use this if fconfig can't find the primary key. This is needed on the Netgear WG302 v1. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
6e2a842d62
commit
d15da125eb
@ -5,8 +5,12 @@
|
|||||||
set_from_redboot () {
|
set_from_redboot () {
|
||||||
for npe in eth0 eth1 eth2
|
for npe in eth0 eth1 eth2
|
||||||
do
|
do
|
||||||
|
mac="$(fconfig -s -r -d /dev/$1 -n npe_"$npe"_esa)"
|
||||||
|
if [ -z $mac ] ; then
|
||||||
|
mac="$(fconfig -s -r -d /dev/$1 -n zcom_npe_esa)"
|
||||||
|
fi
|
||||||
if ip link show dev $npe > /dev/null 2>&1; then
|
if ip link show dev $npe > /dev/null 2>&1; then
|
||||||
ip link set dev $npe address $(fconfig -s -r -d /dev/$1 -n npe_"$npe"_esa)
|
ip link set dev $npe address $mac
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user