From ad30ef6339be16bc3c5d0824e140aa9741943af9 Mon Sep 17 00:00:00 2001 From: Michael Larsen Date: Thu, 18 Sep 2025 14:53:04 +0200 Subject: [PATCH] Tried with a different approach for cleaner code --- install/config/hardware/fix-apple-bcm43xx.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/install/config/hardware/fix-apple-bcm43xx.sh b/install/config/hardware/fix-apple-bcm43xx.sh index f7d6d324..17a57d87 100644 --- a/install/config/hardware/fix-apple-bcm43xx.sh +++ b/install/config/hardware/fix-apple-bcm43xx.sh @@ -1,5 +1,16 @@ -# Install wifi drivers for 2013-2015 MacBooks using the BCM4360 chip -if lspci -nnv | grep -A2 "14e4:43a0" | grep -q "106b:"; then +# Install Wi-Fi drivers for Broadcom chips on MacBooks: +# - BCM4360 (2013–2015) +# - BCM4331 (2012, early 2013) + +# Grab the PCI ID string once +pci_info=$(lspci -nnv) + +if echo "$pci_info" | grep -q "14e4:43a0" && echo "$pci_info" | grep -q "106b:"; then echo "Apple BCM4360 detected" - sudo pacman -S --noconfirm --needed broadcom-wl dkms linux-headers +# sudo pacman -S --noconfirm --needed broadcom-wl dkms linux-headers +elif echo "$pci_info" | grep -q "14e4:4331" && echo "$pci_info" | grep -q "106b:"; then + echo "Apple BCM4331 detected" +# sudo pacman -S --noconfirm --needed broadcom-wl dkms linux-headers +else + echo "No supported Broadcom chip detected" fi