[OpenWrt-Devel] ar71xx: add model detection for UniFi AC-LR
diff mbox series

Message ID 20191022204429.608380-1-dev@andreas-ziegler.de
State Accepted, archived
Delegated to: David Bauer
Headers show
Series
  • [OpenWrt-Devel] ar71xx: add model detection for UniFi AC-LR
Related show

Commit Message

Andreas Ziegler Oct. 22, 2019, 8:44 p.m. UTC
This commit adds correct model detection for UniFi
AC-LR. Previously, said device was incorrectly detected
as UniFi-AC-LITE/MESH.

The Information about the device is stored at 0xC in the EEPROM
partition. It corresponds to the sysid in /etc/board.info of the
Ubiquiti stock firmware.

Signed-off-by: Andreas Ziegler <dev@andreas-ziegler.de>
---
 target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +++
 target/linux/ar71xx/image/generic-ubnt.mk    | 6 ++++++
 2 files changed, 9 insertions(+)

Comments

Adrian Schmutzler Oct. 22, 2019, 9:02 p.m. UTC | #1
Hi Andreas,

> +define Device/ubnt_unifiac-lr
> +  $(Device/ubnt-unifiac-lite)
> +  DEVICE_TITLE := Ubiquiti UniFi AC-LR
> +endef
> +TARGET_DEVICES += ubnt_unifiac-lr
> +

Since this is ar71xx, where vendor_model scheme is not used at all, I would prefer using "ubnt-unifiac-lr" for consistency.

Best

Adrian
Andreas Ziegler Oct. 22, 2019, 9:09 p.m. UTC | #2
Hi Adrian,

> Since this is ar71xx, where vendor_model scheme is not used at all, I would prefer using "ubnt-unifiac-lr" for consistency.

i don't mind.
Do i need to send a V2 for such a small change? Maybe this can be done
if it gets merged?

Kr,
Andreas
Adrian Schmutzler Oct. 22, 2019, 9:12 p.m. UTC | #3
Hi Andreas,

> -----Original Message-----
> From: Andreas Ziegler [mailto:dev@andreas-ziegler.de]
> Sent: Dienstag, 22. Oktober 2019 23:10
> To: Adrian Schmutzler <mail@adrianschmutzler.de>; openwrt-devel@lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH] ar71xx: add model detection for UniFi AC-LR
> 
> Hi Adrian,
> 
> > Since this is ar71xx, where vendor_model scheme is not used at all, I would prefer using "ubnt-unifiac-lr" for consistency.
> 
> i don't mind.
> Do i need to send a V2 for such a small change? Maybe this can be done
> if it gets merged?

that depends on who will merge it.

But since this is ar71xx, I would make it as easy as possible for committers, so you increase the chances for the patch to be picked at all.

=> Send a v2. :-)

Best

Adrian

Patch
diff mbox series

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 03dfbcebf9..044ef4eae5 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -111,6 +111,9 @@  ubnt_unifi_ac_board_detect() {
 	"e517")
 		model="Ubiquiti UniFi-AC-LITE"
 		;;
+	"e527")
+		model="Ubiquiti UniFi-AC-LR"
+		;;
 	"e537")
 		model="Ubiquiti UniFi-AC-PRO"
 		;;
diff --git a/target/linux/ar71xx/image/generic-ubnt.mk b/target/linux/ar71xx/image/generic-ubnt.mk
index 5a4517f81f..6bfe041b80 100644
--- a/target/linux/ar71xx/image/generic-ubnt.mk
+++ b/target/linux/ar71xx/image/generic-ubnt.mk
@@ -138,6 +138,12 @@  define Device/ubnt-unifiac-lite
 endef
 TARGET_DEVICES += ubnt-unifiac-lite
 
+define Device/ubnt_unifiac-lr
+  $(Device/ubnt-unifiac-lite)
+  DEVICE_TITLE := Ubiquiti UniFi AC-LR
+endef
+TARGET_DEVICES += ubnt_unifiac-lr
+
 define Device/ubnt-unifiac-mesh
   $(Device/ubnt-unifiac-lite)
   DEVICE_TITLE := Ubiquiti UniFi AC-Mesh