Added support for TL-WA860RE

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
This commit is contained in:
Christian Dresel 2015-12-31 15:49:55 +01:00 committed by Steffen Pankratz
parent 40d33f9e7c
commit ec7fe85ab6
4 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,32 @@
WANDEV=eth0
SWITCHDEV=eth0
CLIENT_PORTS=""
WAN_PORTS=""
BATMAN_PORTS=""
. /etc/network.mode
CLIENTIF="w2ap"
ETHMESHMAC=
ROUTERMAC=w2mesh
uci set network.$SWITCHDEV=interface
uci set network.$SWITCHDEV.ifname=$SWITCHDEV
uci set network.mesh.ifname="bat0"
if [ "$ETHMODE" = "WAN" ] ; then
## Activate for WAN:
echo "net.ipv6.conf.$WANDEV.accept_ra_defrtr = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.$WANDEV.autoconf = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 1" >> /etc/sysctl.conf
uci set network.wan.ifname=$WANDEV
elif [ "$ETHMODE" = "CLIENT" ] ; then
## Activate Client:
CLIENTIF="w2ap eth0"
uci set network.mesh.ifname="bat0 $SWITCHDEV"
else
## Activate BATMAN:
uci set network.ethmesh.ifname="$SWITCHDEV"
ETH0MAC=1
fi

View File

@ -26,6 +26,8 @@ board_postbuild() {
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v1-squashfs-*.bin ./bin/
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v2-squashfs-*.bin ./bin/
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wa860re-v1-squashfs-*.bin ./bin/
}
board_clean() {

View File

@ -100,4 +100,16 @@ if [[ -n "$ROUTERMAC" ]]; then
ifconfig br-mesh up
/etc/init.d/network restart
fi
fi
fi
if [[ -n "$ETH0MAC" ]]; then
echo "Fixing MAC on eth0"
sleep 10
NEW_MACADDR=$(cat /sys/class/net/w2ap/address)
uci set network.eth0.macaddr=$NEW_MACADDR
uci commit
ifconfig eth0 down
ifconfig eth0 hw ether $NEW_MACADDR
ifconfig eth0 up
/etc/init.d/network restart
fi

View File

@ -23,6 +23,9 @@ case "$BOARD" in
nanostation-m)
BOARD=ubnt-nano-m
;;
tl-wa860re)
BOARD=tl-wa860re-v1
;;
esac
if ! uci get board.model.name; then