forked from freifunk-franken/firmware
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:
parent
40d33f9e7c
commit
ec7fe85ab6
|
@ -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
|
|
@ -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-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-wr1043nd-v2-squashfs-*.bin ./bin/
|
||||||
|
|
||||||
|
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wa860re-v1-squashfs-*.bin ./bin/
|
||||||
}
|
}
|
||||||
|
|
||||||
board_clean() {
|
board_clean() {
|
||||||
|
|
|
@ -100,4 +100,16 @@ if [[ -n "$ROUTERMAC" ]]; then
|
||||||
ifconfig br-mesh up
|
ifconfig br-mesh up
|
||||||
/etc/init.d/network restart
|
/etc/init.d/network restart
|
||||||
fi
|
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
|
||||||
|
|
|
@ -23,6 +23,9 @@ case "$BOARD" in
|
||||||
nanostation-m)
|
nanostation-m)
|
||||||
BOARD=ubnt-nano-m
|
BOARD=ubnt-nano-m
|
||||||
;;
|
;;
|
||||||
|
tl-wa860re)
|
||||||
|
BOARD=tl-wa860re-v1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if ! uci get board.model.name; then
|
if ! uci get board.model.name; then
|
||||||
|
|
Loading…
Reference in New Issue