From 5b3fd950696bb8bdbe8a37bba3b4525de9bd081f Mon Sep 17 00:00:00 2001
From: Jayakumar Anantha krishnan <jayakumar.2.ananthakrishnan@bt.com>
Date: Tue, 12 Dec 2023 16:58:04 +0000
Subject: [PATCH] brcmbca: BCM recommended to handle shutdown event to unload
 WLAN driver

WLAN drivers specifically need to be unloaded during soft reboot since
it has separate CPU running.

The sleep is a temporary workaround that was determined experimentally
and will be removed once a proper solution has been provided by
Broadcom.

BCM-Case: CS00012327423
BCM-Case: CS00012295404
---
 brcmbca/base-files/etc/init.d/wifi_bringup | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/brcmbca/base-files/etc/init.d/wifi_bringup b/brcmbca/base-files/etc/init.d/wifi_bringup
index ecdb42fb5..71fb3b545 100755
--- a/brcmbca/base-files/etc/init.d/wifi_bringup
+++ b/brcmbca/base-files/etc/init.d/wifi_bringup
@@ -3,6 +3,7 @@
 # Prepare the NVRAM and load Broadcom wifi drivers
 
 START=18
+STOP=18
 
 # Function:
 # Tries to find a NVRAM file supplied by the manufacturer and use this as source.
@@ -162,3 +163,9 @@ boot() {
 
 	return 0
 }
+
+############ shutdown-function ############
+shutdown() {
+	/etc/init.d/bcm-wlan-drivers.sh stop
+	sleep 3
+}
-- 
GitLab