mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 06:10:00 +10:00
defaults.py: Adjust logic for modern wifi
This commit is contained in:
Binary file not shown.
@@ -233,7 +233,6 @@ class Constants:
|
|||||||
os_data.os_data.big_sur,
|
os_data.os_data.big_sur,
|
||||||
os_data.os_data.monterey,
|
os_data.os_data.monterey,
|
||||||
os_data.os_data.ventura,
|
os_data.os_data.ventura,
|
||||||
os_data.os_data.sonoma,
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# Payload Location
|
# Payload Location
|
||||||
|
|||||||
+38
-10
@@ -147,8 +147,11 @@ class GenerateDefaults:
|
|||||||
Networking specific probe
|
Networking specific probe
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
is_legacy_wifi = False
|
||||||
|
is_modern_wifi = False
|
||||||
|
|
||||||
if self.host_is_target:
|
if self.host_is_target:
|
||||||
if not (
|
if (
|
||||||
(
|
(
|
||||||
isinstance(self.constants.computer.wifi, device_probe.Broadcom) and
|
isinstance(self.constants.computer.wifi, device_probe.Broadcom) and
|
||||||
self.constants.computer.wifi.chipset in [
|
self.constants.computer.wifi.chipset in [
|
||||||
@@ -160,28 +163,53 @@ class GenerateDefaults:
|
|||||||
self.constants.computer.wifi.chipset == device_probe.Atheros.Chipsets.AirPortAtheros40
|
self.constants.computer.wifi.chipset == device_probe.Atheros.Chipsets.AirPortAtheros40
|
||||||
)
|
)
|
||||||
):
|
):
|
||||||
return
|
is_legacy_wifi = True
|
||||||
|
elif (
|
||||||
|
(
|
||||||
|
isinstance(self.constants.computer.wifi, device_probe.Broadcom) and
|
||||||
|
self.constants.computer.wifi.chipset in [
|
||||||
|
device_probe.Broadcom.Chipsets.AirPortBrcm4360,
|
||||||
|
device_probe.Broadcom.Chipsets.AirportBrcmNIC,
|
||||||
|
]
|
||||||
|
)
|
||||||
|
):
|
||||||
|
is_modern_wifi = True
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if not self.model in smbios_data.smbios_dictionary:
|
print("Checking WiFi")
|
||||||
|
if self.model not in smbios_data.smbios_dictionary:
|
||||||
return
|
return
|
||||||
if (
|
if (
|
||||||
smbios_data.smbios_dictionary[self.model]["Wireless Model"] not in [
|
smbios_data.smbios_dictionary[self.model]["Wireless Model"] in [
|
||||||
device_probe.Broadcom.Chipsets.AirPortBrcm4331,
|
device_probe.Broadcom.Chipsets.AirPortBrcm4331,
|
||||||
device_probe.Broadcom.Chipsets.AirPortBrcm43224,
|
device_probe.Broadcom.Chipsets.AirPortBrcm43224,
|
||||||
device_probe.Atheros.Chipsets.AirPortAtheros40
|
device_probe.Atheros.Chipsets.AirPortAtheros40,
|
||||||
]
|
]
|
||||||
):
|
):
|
||||||
return
|
is_legacy_wifi = True
|
||||||
|
elif (
|
||||||
|
smbios_data.smbios_dictionary[self.model]["Wireless Model"] in [
|
||||||
|
device_probe.Broadcom.Chipsets.AirPortBrcm4360,
|
||||||
|
device_probe.Broadcom.Chipsets.AirportBrcmNIC,
|
||||||
|
]
|
||||||
|
):
|
||||||
|
print("Modern WiFi")
|
||||||
|
is_modern_wifi = True
|
||||||
|
|
||||||
|
if is_legacy_wifi is False and is_modern_wifi is False:
|
||||||
|
return
|
||||||
|
|
||||||
# 12.0: Legacy Wireless chipsets require root patching
|
# 12.0: Legacy Wireless chipsets require root patching
|
||||||
|
# 14.0: Modern Wireless chipsets require root patching
|
||||||
self.constants.sip_status = False
|
self.constants.sip_status = False
|
||||||
self.constants.secure_status = False
|
self.constants.secure_status = False
|
||||||
|
self.constants.disable_cs_lv = True
|
||||||
|
|
||||||
# 13.0: Enabling AirPlay to Mac patches breaks Control Center on legacy chipsets
|
if is_legacy_wifi is True:
|
||||||
# AirPlay to Mac was unsupported regardless, so we can safely disable it
|
# 13.0: Enabling AirPlay to Mac patches breaks Control Center on legacy chipsets
|
||||||
self.constants.fu_status = True
|
# AirPlay to Mac was unsupported regardless, so we can safely disable it
|
||||||
self.constants.fu_arguments = " -disable_sidecar_mac"
|
self.constants.fu_status = True
|
||||||
|
self.constants.fu_arguments = " -disable_sidecar_mac"
|
||||||
|
|
||||||
|
|
||||||
def _misc_hardwares_probe(self) -> None:
|
def _misc_hardwares_probe(self) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user