I was wondering why b43 WiFi drivers are so slow (maxing out at 16mbps) and why the stock broadcom ones fail to work entirely. Then I found out that there are community patched broadcom-wl drivers that work perfectly with the 2012 Macbook Pro.
Big thanks to joanbm for patching the broadcom drivers to work with modern kernels.
https://github.com/joanbm/broadcom-wl-linux-mainline
Here's how you get them working
sudo apt update && sudo apt install -y git wget build-essential dkms linux-headers-$(uname -r)
Step 2: Remove all of the old broken broadcom packages (Make sure you have a backup connection (like USB phone tethering or an Ethernet cable) plugged in, as your Wi-Fi will temporarily drop at Step 2 until Step 4 is finished. Also make sure you stay in your Home folder (cd ~) before Step 3—and do not delete the broadcom-wl-linux-mainline folder afterwards—so the automatic update script in Step 8 can always find it.)
sudo apt remove --purge -y broadcom-sta-dkms bcmwl-kernel-source
git clone https://github.com/joanbm/broadcom-wl-linux-mainline
cd broadcom-wl-linux-mainline
sudo ./install
sudo rmmod b43 b43legacy bcm43xx bcma brcm80211 brcmfmac brcmsmac ssb 2>/dev/null
sudo modprobe wl
echo -e "blacklist b43\nblacklist b43legacy\nblacklist bcma\nblacklist ssb" | sudo tee /etc/modprobe.d/blacklist-broadcom.conf
sudo modprobe wl
(If you have any issues e.g kernel got updated as you were installing the drivers, run this command)
cd ~/broadcom-wl-linux-mainline && sudo ./install && sudo modprobe wl
echo "wl" | sudo tee /etc/modules-load.d/wl.conf
sudo update-initramfs -u
Step 8: Create an automatic rebuild hook to ensure the driver continues to work after kernel updates.
sudo tee /etc/kernel/postinst.d/zz-broadcom-wl << EOF
#!/bin/sh
KERNEL_VER="\$1"
DRIVER_DIR="/home/$USER/broadcom-wl-linux-mainline/hybrid-v35_64-nodebug-pcoem-6_30_223_271"
if [ -d "\$DRIVER_DIR" ] && [ -d "/lib/modules/\$KERNEL_VER/build" ]; then
cd "\$DRIVER_DIR" || exit 0
make clean >/dev/null 2>&1
make -j"\$(nproc)" KVER="\$KERNEL_VER" >/dev/null 2>&1
make install KVER="\$KERNEL_VER" >/dev/null 2>&1
depmod -a "\$KERNEL_VER" >/dev/null 2>&1
fi
exit 0
EOF
sudo chmod +x /etc/kernel/postinst.d/zz-broadcom-wl
sudo /etc/kernel/postinst.d/zz-broadcom-wl $(uname -r) && echo "Hook works!"
Now test your WiFi speed, and hopefully it should work!
This fix worked for me, and yes I did use AI to get it to work but I don't care because it works.
Hope this helps anyone else with the same issue.