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:
Christian Dresel 2016-07-25 12:04:29 +02:00 committed by Tim Niemeyer
parent 06e72576d6
commit 0950e58c58
6 changed files with 36 additions and 3 deletions

View File

@ -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-tl-mr3020-v1-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-wdr3600-v1-squashfs-sysupgrade.bin"
"openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-sysupgrade.bin"

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-boardname
PKG_VERSION:=0.0.1
PKG_VERSION:=0.0.2
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-boardname

View File

@ -28,6 +28,9 @@ case "$BOARD" in
bullet-m)
BOARD=ubnt-bullet-m
;;
unifi)
BOARD=ubnt-unifi
;;
loco-m-xw)
BOARD=ubnt-loco-m-xw
;;

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-network
PKG_VERSION:=0.0.3
PKG_VERSION:=0.0.4
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-network

View File

@ -21,7 +21,7 @@
## For devices only including one ethernet port the specifier is called
## ETHMODE. The default mode for these devices is "BATMAN".
## 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"
## 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.

View File

@ -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