From 39c3c7adf3f47c39e48ecff3304c5f526e909fbc Mon Sep 17 00:00:00 2001 From: "J. Burfeind" Date: Sat, 26 Mar 2022 11:11:32 +0100 Subject: [PATCH] ath79-generic: (re)add support for UniFi AP PRO (#2416) Ubiquiti UniFi AP PRO Gone due to commit 45c84a1 ("ar71xx: drop target") --- docs/user/supported_devices.rst | 1 + package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces | 1 + .../luasrc/lib/gluon/upgrade/320-setup-ifname | 6 +++++- targets/ath79-generic | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index 3e485aa9..5ecee37a 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -88,6 +88,7 @@ ath79-generic - UniFi AC Mesh - UniFi AP - UniFi AP LR + - UniFi AP PRO ath79-nand ---------- diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces b/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces index 3bd1864c..25542d19 100755 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces @@ -47,6 +47,7 @@ if platform.match('ath79', 'generic', { 'tplink,cpe210-v2', 'tplink,cpe510-v1', 'tplink,wbs210-v2', + 'ubnt,unifi-ap-pro', }) then lan_ifname, wan_ifname = wan_ifname, lan_ifname elseif platform.match('lantiq') then diff --git a/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/320-setup-ifname b/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/320-setup-ifname index 145d371e..195663dd 100755 --- a/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/320-setup-ifname +++ b/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/320-setup-ifname @@ -3,7 +3,11 @@ local platform = require 'gluon.platform' local sysconfig = require 'gluon.sysconfig' -if platform.is_outdoor_device() then +if platform.is_outdoor_device() or + platform.match('ath79', 'generic', { + 'ubnt,unifi-ap-pro', + }) +then sysconfig.setup_ifname = sysconfig.single_ifname or sysconfig.wan_ifname else sysconfig.setup_ifname = sysconfig.single_ifname or sysconfig.lan_ifname diff --git a/targets/ath79-generic b/targets/ath79-generic index f23738d8..5dceddfd 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -323,3 +323,5 @@ device('ubiquiti-unifi-ap', 'ubnt_unifi', { 'ubiquiti-unifi', }, }) + +device('ubiquiti-unifi-ap-pro', 'ubnt_unifi-ap-pro')