mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-21 03:04:31 +10:00
Add WLAN patch
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/353
This commit is contained in:
@@ -260,6 +260,9 @@ class BuildOpenCore:
|
||||
self.config["DeviceProperties"]["Add"][arpt_path] = {"device-id": binascii.unhexlify("ba430000"), "compatible": "pci14e4,43ba"}
|
||||
if not self.constants.custom_model and self.computer.wifi and self.computer.wifi.country_code:
|
||||
self.config["DeviceProperties"]["Add"][arpt_path].update({"brcmfx-country": self.computer.wifi.country_code})
|
||||
if self.constants.enable_wake_on_wlan is True:
|
||||
print("- Enabling Wake on WLAN support")
|
||||
self.config["DeviceProperties"]["Add"][arpt_path].update({"brcmfxwowl": binascii.unhexlify("01000000")})
|
||||
|
||||
# WiFi patches
|
||||
# TODO: -a is not supported in Lion and older, need to add proper fix
|
||||
@@ -282,8 +285,14 @@ class BuildOpenCore:
|
||||
arpt_path = self.computer.wifi.pci_path
|
||||
print(f"- Found ARPT device at {arpt_path}")
|
||||
self.config["DeviceProperties"]["Add"][arpt_path] = {"brcmfx-country": self.computer.wifi.country_code}
|
||||
if self.constants.enable_wake_on_wlan is True:
|
||||
print("- Enabling Wake on WLAN support")
|
||||
self.config["DeviceProperties"]["Add"][arpt_path].update({"brcmfxwowl": binascii.unhexlify("01000000")})
|
||||
else:
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" brcmfx-country={self.computer.wifi.country_code}"
|
||||
if self.constants.enable_wake_on_wlan is True:
|
||||
print("- Enabling Wake on WLAN support")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" -brcmfxwowl"
|
||||
elif self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirPortBrcm4360:
|
||||
wifi_fake_id(self)
|
||||
elif self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirPortBrcm4331:
|
||||
@@ -313,6 +322,9 @@ class BuildOpenCore:
|
||||
self.enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path)
|
||||
# print(f"- Setting Wireless Card's Country Code: {self.computer.wifi.country_code}")
|
||||
# self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" brcmfx-country={self.computer.wifi.country_code}"
|
||||
if self.constants.enable_wake_on_wlan is True:
|
||||
print("- Enabling Wake on WLAN support")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" -brcmfxwowl"
|
||||
|
||||
# CPUFriend
|
||||
pp_map_path = Path(self.constants.platform_plugin_plist_path) / Path(f"{self.model}/Info.plist")
|
||||
|
||||
Reference in New Issue
Block a user