From 9b3bf07494584a73be21be3e0495c724c8d41a54 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Mon, 17 Jul 2023 11:10:51 -0600 Subject: [PATCH] wireless.py: Ensure IO80211 patches apply on BCM94331/3224 chipsets --- payloads/Config/config.plist | 72 +++++++++++++------------- resources/build/networking/wireless.py | 6 ++- 2 files changed, 40 insertions(+), 38 deletions(-) diff --git a/payloads/Config/config.plist b/payloads/Config/config.plist index 4765409e5..18c3cb19e 100644 --- a/payloads/Config/config.plist +++ b/payloads/Config/config.plist @@ -429,42 +429,6 @@ PlistPath Contents/Info.plist - - Arch - x86_64 - Comment - Broadcom Wifi Patch - Enabled - - MaxKernel - - MinKernel - 12.0.0 - BundlePath - AirportBrcmFixup.kext - ExecutablePath - Contents/MacOS/AirportBrcmFixup - PlistPath - Contents/Info.plist - - - Arch - x86_64 - Comment - 4331 Wifi Patch - Enabled - - MaxKernel - - MinKernel - 20.0.0 - BundlePath - AirportBrcmFixup.kext/Contents/PlugIns/AirPortBrcmNIC_Injector.kext - ExecutablePath - - PlistPath - Contents/Info.plist - Arch x86_64 @@ -1635,6 +1599,42 @@ PlistPath Contents/Info.plist + + Arch + x86_64 + Comment + Broadcom Wifi Patch + Enabled + + MaxKernel + + MinKernel + 12.0.0 + BundlePath + AirportBrcmFixup.kext + ExecutablePath + Contents/MacOS/AirportBrcmFixup + PlistPath + Contents/Info.plist + + + Arch + x86_64 + Comment + 4331 Wifi Patch + Enabled + + MaxKernel + + MinKernel + 20.0.0 + BundlePath + AirportBrcmFixup.kext/Contents/PlugIns/AirPortBrcmNIC_Injector.kext + ExecutablePath + + PlistPath + Contents/Info.plist + Arch x86_64 diff --git a/resources/build/networking/wireless.py b/resources/build/networking/wireless.py index 0d6001d95..0ef2af82e 100644 --- a/resources/build/networking/wireless.py +++ b/resources/build/networking/wireless.py @@ -45,7 +45,7 @@ class BuildWirelessNetworking: self.config["#Revision"]["Hardware-Wifi"] = f"{utilities.friendly_hex(self.computer.wifi.vendor_id)}:{utilities.friendly_hex(self.computer.wifi.device_id)}" if isinstance(self.computer.wifi, device_probe.Broadcom): - if self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirportBrcmNIC: + if self.computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirportBrcmNIC, device_probe.Broadcom.Chipsets.AirPortBrcm4360]: support.BuildSupport(self.model, self.constants, self.config).enable_kext("IOSkywalkFamily.kext", self.constants.ioskywalk_version, self.constants.ioskywalk_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("IO80211FamilyLegacy.kext", self.constants.io80211legacy_version, self.constants.io80211legacy_path) support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("IO80211FamilyLegacy.kext/Contents/PlugIns/AirPortBrcmNIC.kext")["Enabled"] = True @@ -107,11 +107,13 @@ class BuildWirelessNetworking: support.BuildSupport(self.model, self.constants, self.config).enable_kext("IO80211ElCap.kext", self.constants.io80211elcap_version, self.constants.io80211elcap_path) support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("IO80211ElCap.kext/Contents/PlugIns/AirPortAtheros40.kext")["Enabled"] = True elif smbios_data.smbios_dictionary[self.model]["Wireless Model"] == device_probe.Broadcom.Chipsets.AirportBrcmNIC: + support.BuildSupport(self.model, self.constants, self.config).enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path) + + if smbios_data.smbios_dictionary[self.model]["Wireless Model"] in [device_probe.Broadcom.Chipsets.AirportBrcmNIC, device_probe.Broadcom.Chipsets.AirPortBrcm4360]: support.BuildSupport(self.model, self.constants, self.config).enable_kext("IOSkywalkFamily.kext", self.constants.ioskywalk_version, self.constants.ioskywalk_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("IO80211FamilyLegacy.kext", self.constants.io80211legacy_version, self.constants.io80211legacy_path) support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("IO80211FamilyLegacy.kext/Contents/PlugIns/AirPortBrcmNIC.kext")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Block"], "Identifier", "com.apple.iokit.IOSkywalkFamily")["Enabled"] = True - support.BuildSupport(self.model, self.constants, self.config).enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path) def _wowl_handling(self) -> None: