mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 14:10:51 +10:00
wireless.py: Refactor
This commit is contained in:
@@ -10,6 +10,7 @@ class build_wired:
|
||||
self.config = config
|
||||
self.computer = self.constants.computer
|
||||
|
||||
|
||||
def build(self):
|
||||
# Check if Ethernet was detected, otherwise fall back to assumptions (mainly for 2011 MacBook Airs and TB Ethernet)
|
||||
if not self.constants.custom_model and self.constants.computer.ethernet:
|
||||
@@ -17,6 +18,7 @@ class build_wired:
|
||||
else:
|
||||
self.prebuilt_assumption()
|
||||
|
||||
|
||||
def on_model(self):
|
||||
# On-model hardware detection
|
||||
for controller in self.constants.computer.ethernet:
|
||||
@@ -44,6 +46,7 @@ class build_wired:
|
||||
elif isinstance(controller, device_probe.Marvell) or isinstance(controller, device_probe.SysKonnect):
|
||||
support.build_support(self.model, self.constants, self.config).enable_kext("MarvelYukonEthernet.kext", self.constants.marvel_version, self.constants.marvel_path)
|
||||
|
||||
|
||||
def prebuilt_assumption(self):
|
||||
# Stock hardware assumptions
|
||||
if not self.model in smbios_data.smbios_dictionary:
|
||||
|
||||
Reference in New Issue
Block a user