From patchwork Thu Nov 8 11:09:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gio--- via openwrt-devel X-Patchwork-Id: 994769 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=lists.openwrt.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="M4xTL3p0"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42rLBr3ld6z9s1x for ; Thu, 8 Nov 2018 22:09:08 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Date:Sender:Content-Type: Subject:List-Help:Reply-To:List-Archive:List-Unsubscribe:List-Subscribe:From: List-Post:List-Id:Message-ID:MIME-Version:References:In-Reply-To:To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fNSFO+Wn0ftf8ihTpMH4qayJjhLyvT9oldIyZdTeqoI=; b=M4xTL3p0m8hOJruE2CeLzy1v1 pv7T3Nenc4GDS1oPJdYG3PCJCv2bBoz17nFoPuikBPUo9p/FLLYR1ep2h/oZKnKdPoOuYyX9HJEK8 EHNyVRRO1uqSihEtGwm7QXyNnwQOsWaTQI4b/0qebnyE5WpUBFYzK0rdnKWFMbuZP9Rk1+HQhhiIH Guz9VS2m863j6qNThOprItEldyLgS55O6DJvE/KvQXnsS2VOj5YqZuBNmFMCHdU9nbvWZy0ZNEexH Xvo8sTpJDBTNM83mUxjJWnUx1b6wp07Zn6xxE6VARA5nqxdyKyziRMtfxspEmoTVOuhQhEOfn23EE nMk6y6ncQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKiBK-0000Rr-Be; Thu, 08 Nov 2018 11:09:02 +0000 To: openwrt-devel@lists.openwrt.org In-Reply-To: <20181108110717.18235-1-achterin@googlemail.com> References: <20181108110717.18235-1-achterin@googlemail.com> MIME-Version: 1.0 Message-ID: List-Id: List-Post: X-Patchwork-Original-From: Christoph Krapp via openwrt-devel From: gio--- via openwrt-devel Precedence: list X-Mailman-Version: 2.1.21 X-BeenThere: openwrt-devel@lists.openwrt.org List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Christoph Krapp List-Help: Subject: [OpenWrt-Devel] [PATCH] ar71xx: add support for UniFi-AC-Mesh-Pro Sender: "openwrt-devel" Date: Thu, 08 Nov 2018 11:09:02 +0000 Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. This adds the build option for UniFi AC Mesh Pro as well as model detection for it. The device is a hardware clone of the AC Pro. - SoC: QCA9563-AL3A (775Mhz) - RAM: 128MiB - Flash: 16MiB - dual firmware partitions! - LAN: 2x 1000M - POE+ - Wireless: 2.4G: QCA9563 5G: UniFi Chip, QCA988X compatible Signed-off-by: Christoph Krapp --- target/linux/ar71xx/base-files/lib/ar71xx.sh | 17 ++++++++++++----- .../files/arch/mips/ath79/Kconfig.openwrt | 2 +- .../files/arch/mips/ath79/mach-ubnt-unifiac.c | 2 +- .../ar71xx/files/arch/mips/ath79/machtypes.h | 2 +- target/linux/ar71xx/image/generic-ubnt.mk | 6 ++++++ 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 05f497fcbf..a9df93a2da 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -98,22 +98,28 @@ ubnt_xm_board_detect() { [ -z "$model" ] || AR71XX_MODEL="${model}${magic:3:1}" } -ubnt_ac_lite_get_mtd_part_magic() { +ubnt_unifi_ac_get_mtd_part_magic() { ar71xx_get_mtd_offset_size_format EEPROM 12 2 %02x } -ubnt_ac_lite_board_detect() { +ubnt_unifi_ac_board_detect() { local model local magic - magic="$(ubnt_ac_lite_get_mtd_part_magic)" + magic="$(ubnt_unifi_ac_get_mtd_part_magic)" case ${magic:0:4} in "e517") model="Ubiquiti UniFi-AC-LITE" ;; + "e537") + model="Ubiquiti UniFi-AC-PRO" + ;; "e557") model="Ubiquiti UniFi-AC-MESH" ;; + "e567") + model="Ubiquiti UniFi-AC-MESH-PRO" + ;; esac [ -z "$model" ] || AR71XX_MODEL="${model}" @@ -1388,10 +1394,11 @@ ar71xx_board_detect() { ;; *"UniFi-AC-LITE/MESH") name="unifiac-lite" - ubnt_ac_lite_board_detect + ubnt_unifi_ac_board_detect ;; - *"UniFi-AC-PRO") + *"UniFi-AC-PRO/MESH-PRO") name="unifiac-pro" + ubnt_unifi_ac_board_detect ;; *"UniFiAP Outdoor") name="unifi-outdoor" diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index f60825a6dd..86581a6743 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -2133,7 +2133,7 @@ config ATH79_MACH_UBNT select ATH79_DEV_USB config ATH79_MACH_UBNT_UNIFIAC - bool "Ubiquiti UniFi AC (LITE/LR/MESH/PRO) support" + bool "Ubiquiti UniFi AC (LITE/LR/MESH/PRO/MESH-PRO) support" select SOC_QCA956X select ATH79_DEV_AP9X_PCI if PCI select ATH79_DEV_ETH diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-unifiac.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-unifiac.c index 5ea0028df8..09a0bba867 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-unifiac.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-unifiac.c @@ -176,4 +176,4 @@ static void __init ubnt_unifiac_pro_setup(void) MIPS_MACHINE(ATH79_MACH_UBNT_UNIFIAC_PRO, "UBNT-UF-AC-PRO", - "Ubiquiti UniFi-AC-PRO", ubnt_unifiac_pro_setup); + "Ubiquiti UniFi-AC-PRO/MESH-PRO", ubnt_unifiac_pro_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h index 987e80bb1f..2298be55bb 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -333,7 +333,7 @@ enum ath79_mach_type { ATH79_MACH_UBNT_UAP_PRO, /* Ubiquiti UniFi AP Pro */ ATH79_MACH_UBNT_UNIFI, /* Ubiquiti Unifi */ ATH79_MACH_UBNT_UNIFIAC_LITE, /* Ubiquiti Unifi AC LITE/LR/MESH */ - ATH79_MACH_UBNT_UNIFIAC_PRO, /* Ubiquiti Unifi AC PRO */ + ATH79_MACH_UBNT_UNIFIAC_PRO, /* Ubiquiti Unifi AC PRO/MESH PRO */ ATH79_MACH_UBNT_UNIFI_OUTDOOR, /* Ubiquiti UnifiAP Outdoor */ ATH79_MACH_UBNT_UNIFI_OUTDOOR_PLUS, /* Ubiquiti UnifiAP Outdoor+ */ ATH79_MACH_UBNT_XM, /* Ubiquiti Networks XM board rev 1.0 */ diff --git a/target/linux/ar71xx/image/generic-ubnt.mk b/target/linux/ar71xx/image/generic-ubnt.mk index 6941012cbe..42275bae18 100644 --- a/target/linux/ar71xx/image/generic-ubnt.mk +++ b/target/linux/ar71xx/image/generic-ubnt.mk @@ -143,6 +143,12 @@ define Device/ubnt-unifiac-pro endef TARGET_DEVICES += ubnt-unifiac-pro +define Device/ubnt-unifiac-mesh-pro + $(Device/ubnt-unifiac-pro) + DEVICE_TITLE := Ubiquiti UniFi AC-Mesh-Pro +endef +TARGET_DEVICES += ubnt-unifiac-mesh-pro + define Device/ubnt-unifi-outdoor $(Device/ubnt-bz) DEVICE_TITLE := Ubiquiti UniFi Outdoor