forked from freifunk-franken/firmware
Add support for Ubiquiti Unifi AP
Signed-off-by: Christian Dresel <fff@chrisi01.de> Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
This commit is contained in:
parent
06e72576d6
commit
0950e58c58
|
@ -21,6 +21,7 @@ images=("openwrt-ar71xx-generic-cpe210-220-510-520-squashfs-sysupgrade.bin"
|
||||||
"openwrt-ar71xx-generic-gl-ar150-squashfs-sysupgrade.bin"
|
"openwrt-ar71xx-generic-gl-ar150-squashfs-sysupgrade.bin"
|
||||||
"openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-sysupgrade.bin"
|
"openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-sysupgrade.bin"
|
||||||
"openwrt-ar71xx-generic-ubnt-bullet-m-squashfs-sysupgrade.bin"
|
"openwrt-ar71xx-generic-ubnt-bullet-m-squashfs-sysupgrade.bin"
|
||||||
|
"openwrt-ar71xx-generic-ubnt-unifi-squashfs-sysupgrade.bin"
|
||||||
"openwrt-ar71xx-generic-tl-wdr3500-v1-squashfs-sysupgrade.bin"
|
"openwrt-ar71xx-generic-tl-wdr3500-v1-squashfs-sysupgrade.bin"
|
||||||
"openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-sysupgrade.bin"
|
"openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-sysupgrade.bin"
|
||||||
"openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-sysupgrade.bin"
|
"openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-sysupgrade.bin"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-boardname
|
PKG_NAME:=fff-boardname
|
||||||
PKG_VERSION:=0.0.1
|
PKG_VERSION:=0.0.2
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-boardname
|
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-boardname
|
||||||
|
|
|
@ -28,6 +28,9 @@ case "$BOARD" in
|
||||||
bullet-m)
|
bullet-m)
|
||||||
BOARD=ubnt-bullet-m
|
BOARD=ubnt-bullet-m
|
||||||
;;
|
;;
|
||||||
|
unifi)
|
||||||
|
BOARD=ubnt-unifi
|
||||||
|
;;
|
||||||
loco-m-xw)
|
loco-m-xw)
|
||||||
BOARD=ubnt-loco-m-xw
|
BOARD=ubnt-loco-m-xw
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-network
|
PKG_NAME:=fff-network
|
||||||
PKG_VERSION:=0.0.3
|
PKG_VERSION:=0.0.4
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-network
|
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-network
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
## For devices only including one ethernet port the specifier is called
|
## For devices only including one ethernet port the specifier is called
|
||||||
## ETHMODE. The default mode for these devices is "BATMAN".
|
## ETHMODE. The default mode for these devices is "BATMAN".
|
||||||
## For example this is the case for: gl-ar150, tl-mr3020-v1, tl-wa850re-v1,
|
## For example this is the case for: gl-ar150, tl-mr3020-v1, tl-wa850re-v1,
|
||||||
## tl-wa860re-v1, ubnt-bullet-m, ubnt-loco-m-xw, ubnt-nano-m
|
## tl-wa860re-v1, ubnt-bullet-m, ubnt-loco-m-xw, ubnt-nano-m, ubnt-unifi
|
||||||
ETHMODE="BATMAN"
|
ETHMODE="BATMAN"
|
||||||
## Devices featuring 2 ethernet ports are configured by SPECIFIERs ressembling
|
## Devices featuring 2 ethernet ports are configured by SPECIFIERs ressembling
|
||||||
## the labels on the PORT itself. For the cpe210 these are called LAN0 and LAN1.
|
## the labels on the PORT itself. For the cpe210 these are called LAN0 and LAN1.
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
WANDEV=eth0
|
||||||
|
SWITCHDEV=eth0
|
||||||
|
CLIENT_PORTS=""
|
||||||
|
WAN_PORTS=""
|
||||||
|
BATMAN_PORTS=""
|
||||||
|
|
||||||
|
. /etc/network.mode
|
||||||
|
|
||||||
|
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:
|
||||||
|
uci set network.mesh.ifname="bat0 $SWITCHDEV"
|
||||||
|
else
|
||||||
|
## Activate BATMAN:
|
||||||
|
uci set network.ethmesh.ifname="$SWITCHDEV"
|
||||||
|
fi
|
Loading…
Reference in New Issue