From 246a617d717583c296f8bb0f90cb5c808f7bdc79 Mon Sep 17 00:00:00 2001
From: David Bauer <blocktrron@users.noreply.github.com>
Date: Thu, 11 Oct 2018 03:21:51 +0200
Subject: [PATCH] ar71xx: add support for TL-WR902AC v1 (#1546)

This adds support for the TP-Link TL-WR902Ac v1 travel router.

The device is marked as broken due to 64MB which might be insufficient
in certain environments.
---
 package/gluon-core/luasrc/lib/gluon/upgrade/010-primary-mac | 3 ++-
 targets/ar71xx-generic                                      | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/010-primary-mac b/package/gluon-core/luasrc/lib/gluon/upgrade/010-primary-mac
index 353fa1562..01164c87c 100755
--- a/package/gluon-core/luasrc/lib/gluon/upgrade/010-primary-mac
+++ b/package/gluon-core/luasrc/lib/gluon/upgrade/010-primary-mac
@@ -23,7 +23,8 @@ if not (
   table.insert(try_files, 1, '/sys/class/ieee80211/phy0/macaddress')
 end
 
-if platform.match('ar71xx', 'generic', {'tl-wdr3600', 'tl-wdr4300'}) then
+if platform.match('ar71xx', 'generic', {'tl-wdr3600', 'tl-wdr4300',
+                                        'tl-wr902ac-v1'}) then
   table.insert(try_files, 1, '/sys/class/ieee80211/phy1/macaddress')
 elseif platform.match('ramips', 'mt7621', {'dir-860l-b1'}) then
   table.insert(try_files, 1, '/sys/class/ieee80211/phy1/macaddress')
diff --git a/targets/ar71xx-generic b/targets/ar71xx-generic
index 0d8038114..d393a82e9 100644
--- a/targets/ar71xx-generic
+++ b/targets/ar71xx-generic
@@ -234,6 +234,10 @@ if [ "$BROKEN" ]; then
 device tp-link-re355 re355-v1 # BROKEN: OOM with 5GHz enabled in most environments if device is 64M RAM variant
 fi
 
+if [ "$BROKEN" ]; then
+device tp-link-tl-wr902ac-v1 tl-wr902ac-v1 # BROKEN: OOM due to insufficient RAM for ath10k expected
+fi
+
 device tp-link-re450 re450-v1
 packages $ATH10K_PACKAGES
 
-- 
GitLab