From 7ad0b721f03325ae3812be0e246f3e53c7335d35 Mon Sep 17 00:00:00 2001 From: Hoang Hong Quan Date: Wed, 1 Jan 2025 12:43:26 +0700 Subject: [PATCH] Remove duplicate device ID --- Scripts/config_prodigy.py | 6 +++--- Scripts/datasets/pci_data.py | 1 - Scripts/kext_maestro.py | 31 ++++++++++++++++--------------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Scripts/config_prodigy.py b/Scripts/config_prodigy.py index 10933e2..70381da 100644 --- a/Scripts/config_prodigy.py +++ b/Scripts/config_prodigy.py @@ -241,7 +241,7 @@ class ConfigProdigy: for network_name, network_props in hardware_report.get("Network", {}).items(): device_id = network_props.get("Device ID") - if device_id in pci_data.NetworkIDs[22:109] and network_props.get("PCI Path"): + if device_id in pci_data.NetworkIDs[21:108] and network_props.get("PCI Path"): deviceproperties_add[network_props.get("PCI Path")] = { "IOName": "pci14e4,43a0" } @@ -310,11 +310,11 @@ class ConfigProdigy: continue if network_props.get("PCI Path"): - if device_index < 19 and self.utils.parse_darwin_version(macos_version) >= self.utils.parse_darwin_version("23.0.0"): + if device_index < 18: deviceproperties_add[network_props.get("PCI Path")] = { "IOName": "pci14e4,43a0" } - elif 229 < device_index < 259: + elif 228 < device_index < 258: deviceproperties_add[network_props.get("PCI Path")] = { "IOName": "pci14e4,16b4", "device-id": self.utils.hex_to_bytes("B4160000") diff --git a/Scripts/datasets/pci_data.py b/Scripts/datasets/pci_data.py index 3ea0919..3c5b2ae 100644 --- a/Scripts/datasets/pci_data.py +++ b/Scripts/datasets/pci_data.py @@ -235,7 +235,6 @@ NetworkIDs = [ "14E4-4324", "14E4-4325", "14E4-4328", - "14E4-432B", "14E4-432C", "14E4-432D", "14E4-4357", diff --git a/Scripts/kext_maestro.py b/Scripts/kext_maestro.py index 7dcb719..3eaf100 100644 --- a/Scripts/kext_maestro.py +++ b/Scripts/kext_maestro.py @@ -159,33 +159,34 @@ class KextMaestro: except: continue - ethernet_device = 108 < device_index < 264 + ethernet_device = 107 < device_index < 263 - if device_index < 16: + if device_index < 21 and self.utils.parse_darwin_version(macos_version) >= self.utils.parse_darwin_version("23.0.0"): + selected_kexts.append("IOSkywalkFamily") + + if device_index < 15: selected_kexts.append("AirportBrcmFixup") - elif device_index == 16 and self.utils.parse_darwin_version(macos_version) >= self.utils.parse_darwin_version("19.0.0"): + elif device_index == 15 and self.utils.parse_darwin_version(macos_version) >= self.utils.parse_darwin_version("19.0.0"): selected_kexts.append("AirportBrcmFixup") - elif 16 < device_index < 19 and self.utils.parse_darwin_version(macos_version) >= self.utils.parse_darwin_version("20.0.0"): + elif 15 < device_index < 18 and self.utils.parse_darwin_version(macos_version) >= self.utils.parse_darwin_version("20.0.0"): selected_kexts.append("AirportBrcmFixup") - elif 18 < device_index < 22 and self.utils.parse_darwin_version(macos_version) >= self.utils.parse_darwin_version("23.0.0"): - selected_kexts.extend("IOSkywalkFamily") - elif 21 < device_index < 109: + elif 20 < device_index < 108: selected_kexts.append("AirportItlwm" if self.utils.parse_darwin_version(macos_version) < self.utils.parse_darwin_version("23.0.0") else "itlwm") - elif 108 < device_index < 116: + elif 109 < device_index < 115: selected_kexts.append("AppleIGC") - elif 115 < device_index < 123: + elif 114 < device_index < 122: selected_kexts.append("AtherosE2200Ethernet") - elif 122 < device_index < 184: + elif 121 < device_index < 183: selected_kexts.append("IntelMausiEthernet") - elif 183 < device_index < 187: + elif 182 < device_index < 186: selected_kexts.append("LucyRTL8125Ethernet") - elif device_index == 187: + elif device_index == 186: selected_kexts.append("RealtekRTL8100") - elif 187 < device_index < 192: + elif 186 < device_index < 191: selected_kexts.append("RealtekRTL8111") - elif 191 < device_index < 230: + elif 190 < device_index < 229: selected_kexts.append("AppleIGB") - elif 229 < device_index < 264: + elif 228 < device_index < 263: selected_kexts.append("CatalinaBCM5701Ethernet") if not ethernet_device: