mirror of
https://github.com/outbackdingo/OpCore-Simplify.git
synced 2026-01-27 10:19:49 +00:00
Remove the check for connection name being Ethernet or WiFi
This commit is contained in:
@@ -1509,9 +1509,10 @@ DefinitionBlock ("", "SSDT", 2, "CORP ", "SsdtEC", 0x00001000)
|
||||
"Replace": "4701700070000102"
|
||||
})
|
||||
|
||||
def add_null_ethernet_device(self, ethernet_pci):
|
||||
if ethernet_pci:
|
||||
return
|
||||
def add_null_ethernet_device(self, network):
|
||||
for network_name, network_props in network.items():
|
||||
if self.utils.contains_any(pci_data.NetworkIDs, network_props.get("Device ID"), start=108, end=219):
|
||||
return
|
||||
|
||||
random_mac_address = self.smbios.generate_random_mac()
|
||||
mac_address_byte = ", ".join([f'0x{random_mac_address[i:i+2]}' for i in range(0, len(random_mac_address), 2)])
|
||||
@@ -2897,7 +2898,7 @@ DefinitionBlock ("", "SSDT", 2, "ZPSS", "GPUSPOOF", 0x00001000)
|
||||
})
|
||||
self.dropping_the_table("APIC")
|
||||
|
||||
def initialize_patches(self, motherboard_name, motherboard_chipset, platform, cpu_manufacturer, cpu_codename, integrated_gpu, discrete_gpu, ethernet_pci, touchpad_communication, smbios, intel_mei, unsupported_devices, macos_version, acpi_directory):
|
||||
def initialize_patches(self, motherboard_name, motherboard_chipset, platform, cpu_manufacturer, cpu_codename, integrated_gpu, discrete_gpu, network, touchpad_communication, smbios, intel_mei, unsupported_devices, macos_version, acpi_directory):
|
||||
self.acpi_directory = self.check_acpi_directory(acpi_directory)
|
||||
|
||||
if self.select_dsdt():
|
||||
@@ -2905,7 +2906,7 @@ DefinitionBlock ("", "SSDT", 2, "ZPSS", "GPUSPOOF", 0x00001000)
|
||||
self.get_low_pin_count_bus_device()
|
||||
self.add_intel_management_engine(cpu_codename, intel_mei)
|
||||
self.add_memory_controller_device(cpu_manufacturer, smbios)
|
||||
self.add_null_ethernet_device(ethernet_pci)
|
||||
self.add_null_ethernet_device(network)
|
||||
self.add_system_management_bus_device(cpu_manufacturer, cpu_codename)
|
||||
self.add_usb_power_properties(smbios)
|
||||
self.ambient_light_sensor(motherboard_name, platform, integrated_gpu)
|
||||
|
||||
@@ -266,19 +266,15 @@ class AIDA64:
|
||||
network_adapters = self.utils.search_dict_iter(windows_devices, network_adapter)
|
||||
|
||||
for adapter_name, adapter_props in network_adapters.items():
|
||||
device_description = adapter_name + adapter_props.get("PCI Device", "Unknown")
|
||||
connection_name = "WiFi" if "WiFi" in device_description or "Wi-Fi" in device_description or "Wireless" in device_description else \
|
||||
"Ethernet" if "Network" in device_description or "Ethernet" in device_description else None
|
||||
bus_type = adapter_props.get("Bus Type", "Unknown")
|
||||
if (bus_type.startswith("PCI") or bus_type.startswith("USB")) and connection_name:
|
||||
if bus_type.startswith("PCI") or bus_type.startswith("USB"):
|
||||
device_key = adapter_props.get("PCI Device") if not " - " in adapter_props.get("PCI Device", " - ") else adapter_name
|
||||
network_info[device_key.split(" [")[0]] = {
|
||||
"Connection Name": connection_name,
|
||||
"Bus Type": bus_type,
|
||||
"Device ID": adapter_props.get("Device ID", "Unknown")
|
||||
}
|
||||
|
||||
return self.utils.sort_dict_by_key(network_info, "Connection Name")
|
||||
return network_info
|
||||
|
||||
def sd_controller(self, pci_devices, usb_devices, hardware):
|
||||
combined_devices = pci_devices.copy()
|
||||
|
||||
@@ -139,7 +139,6 @@ class CompatibilityChecker:
|
||||
supported_network = {}
|
||||
|
||||
for device_name, device_props in network_info.items():
|
||||
connection_name = device_props.get("Connection Name")
|
||||
bus_type = device_props.get("Bus Type")
|
||||
device_id = device_props.get("Device ID")
|
||||
is_device_supported = device_id in pci_data.NetworkIDs
|
||||
@@ -149,7 +148,7 @@ class CompatibilityChecker:
|
||||
self.min_supported_macos_version = 19
|
||||
|
||||
if not is_device_supported:
|
||||
self.unsupported_devices["{}: {}".format(connection_name, device_name)] = device_props
|
||||
self.unsupported_devices["Network: {}".format(device_name)] = device_props
|
||||
else:
|
||||
supported_network[device_name] = device_props
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ class ConfigProdigy:
|
||||
|
||||
return kernel_patch
|
||||
|
||||
def boot_args(self, motherboard_name, platform, cpu_manufacturer, cpu_codename, discrete_gpu_codename, discrete_gpu_id, integrated_gpu_name, ethernet_pci, codec_id, touchpad_communication, unsupported_devices, custom_cpu_name, macos_version):
|
||||
def boot_args(self, motherboard_name, platform, cpu_manufacturer, cpu_codename, discrete_gpu_codename, discrete_gpu_id, integrated_gpu_name, codec_id, touchpad_communication, unsupported_devices, custom_cpu_name, macos_version):
|
||||
boot_args = [
|
||||
"-v",
|
||||
"debug=0x100",
|
||||
@@ -178,12 +178,6 @@ class ConfigProdigy:
|
||||
if self.utils.contains_any(cpu_data.IntelCPUGenerations, cpu_codename, start=13):
|
||||
boot_args.append("-ctrsmt")
|
||||
|
||||
if ethernet_pci in ["8086-15F2", "8086-15F3", "8086-15F8"]:
|
||||
if macos_version == 20:
|
||||
boot_args.append("dk.e1000=0")
|
||||
elif macos_version == 21:
|
||||
boot_args.append("e1000=0")
|
||||
|
||||
if "Intel" in cpu_manufacturer:
|
||||
if "UHD" in integrated_gpu_name and macos_version > 18:
|
||||
boot_args.append("igfxonln=1")
|
||||
@@ -328,7 +322,6 @@ class ConfigProdigy:
|
||||
hardware.get("Discrete GPU").get("GPU Codename", ""),
|
||||
hardware.get("Discrete GPU").get("Device ID", ""),
|
||||
hardware.get("Integrated GPU Name"),
|
||||
hardware.get("Ethernet (PCI)"),
|
||||
hardware.get("Codec ID"),
|
||||
hardware.get("Touchpad Communication"),
|
||||
", ".join(list(hardware.get("Unsupported Devices").keys())),
|
||||
|
||||
@@ -397,16 +397,7 @@ class builder:
|
||||
hardware_shorc["Discrete GPU"] = list(hardware.get("GPU").items())[0][1].copy() if "Discrete GPU" in list(hardware.get("GPU").items())[0][1]["Device Type"] else {}
|
||||
if hardware_shorc["Discrete GPU"]:
|
||||
hardware_shorc["Discrete GPU"]["GPU Name"] = list(hardware.get("GPU").keys())[0]
|
||||
hardware_shorc["Ethernet (PCI)"] = []
|
||||
for network_name, network_props in hardware["Network"].items():
|
||||
connection_name = network_props["Connection Name"]
|
||||
bus_type = network_props["Bus Type"]
|
||||
|
||||
if bus_type.startswith("PCI"):
|
||||
if connection_name.startswith("WiFi"):
|
||||
hardware_shorc["Wi-Fi (PCI)"] = network_props.get("Device ID")
|
||||
elif connection_name.startswith("Ethernet"):
|
||||
hardware_shorc["Ethernet (PCI)"].append(network_props.get("Device ID"))
|
||||
hardware_shorc["Network"] = hardware.get("Network")
|
||||
hardware_shorc["Bluetooth"] = [device_props.get("Device ID") for device_name, device_props in hardware.get("Bluetooth", {}).items()]
|
||||
hardware_shorc["Codec ID"] = next((device_props.get("Codec ID") for device_name, device_props in hardware.get("Audio").items()), None)
|
||||
hardware_shorc["SD Controller"] = hardware.get("SD Controller")
|
||||
@@ -450,7 +441,7 @@ class builder:
|
||||
hardware_shorc["CPU Codename"],
|
||||
hardware_shorc["Integrated GPU"],
|
||||
hardware_shorc["Discrete GPU"],
|
||||
hardware_shorc["Ethernet (PCI)"],
|
||||
hardware_shorc["Network"],
|
||||
hardware_shorc["Touchpad Communication"],
|
||||
efi_option.get("SMBIOS"),
|
||||
hardware_shorc.get("Intel MEI"),
|
||||
@@ -467,8 +458,7 @@ class builder:
|
||||
hardware_shorc["CPU Codename"],
|
||||
hardware_shorc["Discrete GPU"].get("GPU Codename", ""),
|
||||
hardware_shorc["Integrated GPU"],
|
||||
hardware_shorc.get("Wi-Fi (PCI)"),
|
||||
hardware_shorc["Ethernet (PCI)"],
|
||||
hardware_shorc.get("Network"),
|
||||
hardware_shorc.get("Bluetooth"),
|
||||
hardware_shorc.get("Codec ID"),
|
||||
hardware_shorc["Input"],
|
||||
@@ -478,7 +468,7 @@ class builder:
|
||||
efi_option.get("SMBIOS"),
|
||||
efi_option.get("Custom CPU Name"),
|
||||
efi_option.get("Synchronize the TSC"),
|
||||
efi_option.get("ACPI").get("Battery Status Patch Needed"),
|
||||
efi_option.get("ACPI"),
|
||||
efi_option.get("macOS Version")
|
||||
)
|
||||
|
||||
|
||||
@@ -584,7 +584,7 @@ class KextMaestro:
|
||||
|
||||
return pci_ids
|
||||
|
||||
def gathering_kexts(self, motherboard_name, platform, cpu_configuration, cpu_manufacturer, cpu_codename, discrete_gpu_codename, integrated_gpu, wifi_pci, ethernet_pci, bluetooth, codec_id, input, sd_controller, storage_controllers, usb_controllers, smbios, custom_cpu_name, tsc_sync, battery_status_patch_needed, macos_version):
|
||||
def gathering_kexts(self, motherboard_name, platform, cpu_configuration, cpu_manufacturer, cpu_codename, discrete_gpu_codename, integrated_gpu, network, bluetooth, codec_id, input, sd_controller, storage_controllers, usb_controllers, smbios, custom_cpu_name, tsc_sync, acpi, macos_version):
|
||||
kexts = [
|
||||
"Lilu",
|
||||
"VirtualSMC",
|
||||
@@ -614,36 +614,36 @@ class KextMaestro:
|
||||
else:
|
||||
kexts.append("NootRX" if "Navi 2" in discrete_gpu_codename else "WhateverGreen")
|
||||
|
||||
if wifi_pci and wifi_pci in pci_data.NetworkIDs:
|
||||
if wifi_pci.startswith("14E4"):
|
||||
if wifi_pci in ["14E4-43A0", "14E4-43A3", "14E4-43BA"]:
|
||||
if "SSDT-RMNE" in ", ".join(acpi_table.get("Path") for acpi_table in acpi.get("Add")):
|
||||
kexts.append("NullEthernet")
|
||||
|
||||
wifi_pci = None
|
||||
for network_name, network_props in network.items():
|
||||
device_id = network_props.get("Device ID")
|
||||
|
||||
if self.utils.contains_any(pci_data.NetworkIDs, device_id, end=21):
|
||||
wifi_pci = device_id
|
||||
if device_id in ["14E4-43A0", "14E4-43A3", "14E4-43BA"]:
|
||||
if macos_version > 22:
|
||||
kexts.extend(["AirportBrcmFixup", "IOSkywalkFamily", "IO80211FamilyLegacy", "AMFIPass"])
|
||||
elif wifi_pci in pci_data.NetworkIDs:
|
||||
elif device_id in pci_data.NetworkIDs:
|
||||
kexts.append("AirportBrcmFixup")
|
||||
elif wifi_pci.startswith("8086"):
|
||||
elif self.utils.contains_any(pci_data.NetworkIDs, device_id, start=21, end=108):
|
||||
kexts.append("AirportItlwm" if macos_version < 23 else "itlwm")
|
||||
|
||||
if not ethernet_pci or not (ethernet_pci[0] in pci_data.NetworkIDs or ethernet_pci[-1] in pci_data.NetworkIDs):
|
||||
kexts.append("NullEthernet")
|
||||
else:
|
||||
for pci_id in ethernet_pci:
|
||||
idx = pci_data.NetworkIDs.index(pci_id)
|
||||
|
||||
if 108 <= idx <= 114:
|
||||
kexts.append("AppleIGC")
|
||||
elif 115 <= idx <= 121:
|
||||
kexts.append("AtherosE2200Ethernet")
|
||||
elif 122 <= idx <= 172:
|
||||
kexts.append("IntelMausi")
|
||||
elif 173 <= idx <= 175:
|
||||
kexts.append("LucyRTL8125Ethernet")
|
||||
elif idx == 176:
|
||||
kexts.append("RealtekRTL8100")
|
||||
elif 177 <= idx <= 180:
|
||||
kexts.append("RealtekRTL8111")
|
||||
elif 181 <= idx <= 218:
|
||||
kexts.append("AppleIGB")
|
||||
elif self.utils.contains_any(pci_data.NetworkIDs, device_id, start=108, end=115):
|
||||
kexts.append("AppleIGC")
|
||||
elif self.utils.contains_any(pci_data.NetworkIDs, device_id, start=115, end=122):
|
||||
kexts.append("AtherosE2200Ethernet")
|
||||
elif self.utils.contains_any(pci_data.NetworkIDs, device_id, start=122, end=173):
|
||||
kexts.append("IntelMausi")
|
||||
elif self.utils.contains_any(pci_data.NetworkIDs, device_id, start=173, end=176):
|
||||
kexts.append("LucyRTL8125Ethernet")
|
||||
elif self.utils.contains_any(pci_data.NetworkIDs, device_id, start=176, end=177):
|
||||
kexts.append("RealtekRTL8100")
|
||||
elif self.utils.contains_any(pci_data.NetworkIDs, device_id, start=177, end=181):
|
||||
kexts.append("RealtekRTL8111")
|
||||
elif self.utils.contains_any(pci_data.NetworkIDs, device_id, start=181, end=219):
|
||||
kexts.append("AppleIGB")
|
||||
|
||||
if bluetooth and macos_version > 20 and not wifi_pci in ["14E4-43A0", "14E4-43A3", "14E4-43BA"]:
|
||||
kexts.append("BlueToolFixup")
|
||||
@@ -689,7 +689,7 @@ class KextMaestro:
|
||||
elif 79 < idx:
|
||||
kexts.append("VoodooRMI")
|
||||
|
||||
if "Laptop" in platform and "SURFACE" not in motherboard_name and battery_status_patch_needed:
|
||||
if "Laptop" in platform and "SURFACE" not in motherboard_name and acpi.get("Battery Status Patch Needed"):
|
||||
kexts.append("ECEnabler")
|
||||
|
||||
if sd_controller and sd_controller.get("Device ID") in pci_data.RealtekCardReaderIDs:
|
||||
|
||||
Reference in New Issue
Block a user