From 31d35330ee9ca6c8363d4b0e6ec888c5ba22746e Mon Sep 17 00:00:00 2001
From: Sukru Senli <sukru.senli@iopsys.eu>
Date: Thu, 3 Feb 2022 17:13:31 +0100
Subject: [PATCH] brcm63xx: read socinfo from /proc/socinfo

---
 iopsys-brcm63xx-arm/base-files/etc/init.d/bdmf_shell | 4 ++--
 iopsys-brcm63xx-arm/base-files/etc/init.d/switch     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/iopsys-brcm63xx-arm/base-files/etc/init.d/bdmf_shell b/iopsys-brcm63xx-arm/base-files/etc/init.d/bdmf_shell
index 258b5b072..c24634572 100755
--- a/iopsys-brcm63xx-arm/base-files/etc/init.d/bdmf_shell
+++ b/iopsys-brcm63xx-arm/base-files/etc/init.d/bdmf_shell
@@ -19,9 +19,9 @@ bs_init() {
 # experience delays when establishing a new connection.
 syn_flood() {
 
-        soc=$(brcm_fw_tool -k info)
+        soc=$(cat /proc/socinfo  | grep 'SoC Name' | cut -d':' -f2)
         case $soc in
-                63155)
+                BCM63155)
                         sir=30000
                 ;;
                 *)
diff --git a/iopsys-brcm63xx-arm/base-files/etc/init.d/switch b/iopsys-brcm63xx-arm/base-files/etc/init.d/switch
index 690282536..3ee6e6c67 100755
--- a/iopsys-brcm63xx-arm/base-files/etc/init.d/switch
+++ b/iopsys-brcm63xx-arm/base-files/etc/init.d/switch
@@ -23,9 +23,9 @@ boot() {
 
 	if [ -n "$(which tmctl)" ]; then
 		local flag=0
-		local cpu="$(brcm_fw_tool -k info)"
+		local cpu="$(cat /proc/socinfo  | grep 'SoC Name' | cut -d':' -f2)"
 		case $cpu in
-			6315?) flag=1 ;;
+			BCM6315?) flag=1 ;;
 		esac
 		# Initialize all interfaces without creating any queues.
 		for interf in $(db -q get hw.board.ethernetPortOrder); do
-- 
GitLab