From c5138d943b4c2b6550ca049d597ccae45d84dd2d Mon Sep 17 00:00:00 2001
From: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
Date: Tue, 14 Feb 2017 16:37:04 +0100
Subject: [PATCH] brcm63xx: CPVA502+: fix userspace support

Fix board name typo, fix network configuration and add a led trigger.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
---
 target/linux/brcm63xx/base-files/etc/board.d/01_leds    | 3 +++
 target/linux/brcm63xx/base-files/etc/board.d/02_network | 2 +-
 target/linux/brcm63xx/base-files/lib/brcm63xx.sh        | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/target/linux/brcm63xx/base-files/etc/board.d/01_leds b/target/linux/brcm63xx/base-files/etc/board.d/01_leds
index 7d208cc545..61f685e675 100755
--- a/target/linux/brcm63xx/base-files/etc/board.d/01_leds
+++ b/target/linux/brcm63xx/base-files/etc/board.d/01_leds
@@ -19,6 +19,9 @@ a4001n)
 av4202n)
 	ucidef_set_led_netdev "wlan0" "WLAN" "AV4202N:blue:wifi" "wlan0"
 	;;
+cpva502p)
+	ucidef_set_led_netdev "lan" "LAN" "CPVA502+:amber:link" "eth0"
+	;;
 dgnd3700v1_dgnd3800b)
 	ucidef_set_led_netdev "lan" "LAN" "DGND3700v1_3800B:green:lan" "eth0.1"
 	ucidef_set_led_netdev "wan" "WAN" "DGND3700v1_3800B:green:inet" "eth0.2"
diff --git a/target/linux/brcm63xx/base-files/etc/board.d/02_network b/target/linux/brcm63xx/base-files/etc/board.d/02_network
index ff5fc7a201..f703dfd3f8 100755
--- a/target/linux/brcm63xx/base-files/etc/board.d/02_network
+++ b/target/linux/brcm63xx/base-files/etc/board.d/02_network
@@ -42,7 +42,6 @@ bcm96348gw-10 |\
 bcm96348gw-11 |\
 bcm96358vw |\
 bcm96358vw2 |\
-cpva502p |\
 dg834gt |\
 dmv-s0 |\
 dsl-2650u |\
@@ -135,6 +134,7 @@ bcm963268bu_p300)
 		"0:lan" "3:lan" "4:lan" "5:lan" "6:lan" "7:lan" "8t@eth0"
 	;;
 
+cpva502p |\
 livebox1)
 	ucidef_set_interfaces_lan_wan "eth0" "eth1"
 	;;
diff --git a/target/linux/brcm63xx/base-files/lib/brcm63xx.sh b/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
index bceba8fe13..4fe33eb41a 100755
--- a/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
+++ b/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
@@ -240,7 +240,7 @@ brcm63xx_dt_detect() {
 	"TECOM GW6200")
 		board_name="g6200"
 		;;
-	"Telsey CVPA502+")
+	"Telsey CPVA502+")
 		board_name="cpva502p"
 		;;
 	"Telsey CPVA642-type (CPA-ZNTE60T)")
-- 
GitLab