How OCLP‑Mod’s Modern Wireless Patching Targets Broadcom and Intel Network Interface Controllers

OCLP‑Mod detects Broadcom and Intel wireless NICs via the device_probe module, selects chipset‑specific patch sets in modern_wireless.py, and enables vendor‑specific kexts through wireless.py to restore Wi‑Fi on unsupported macOS versions.

The OCLP‑Mod project (laobamac/oclp‑mod) extends OpenCore Legacy Patcher with a “modern wireless” subsystem that re‑enables Wi‑Fi on macOS versions that no longer ship with native drivers for legacy Broadcom and Intel cards. This article explains how the patcher identifies each controller type, chooses the correct patch set, and injects the necessary kernel extensions (kexts) during the EFI build process.

Hardware Detection via device_probe

Before any patching occurs, OCLP‑Mod must determine exactly which wireless hardware is present. The detection logic lives in oclp_mod/detections/device_probe.py and returns strongly‑typed objects for each vendor.

Broadcom NIC Identification

The Broadcom dataclass models every supported Broadcom card. It exposes a chipset enum that distinguishes between AirPortBrcm4360, AirPortBrcmNIC, and AirPortBrcmNICThirdParty【5†L527-L560】. When device_probe scans the PCI bus, it instantiates this class if the vendor ID matches Broadcom’s identifier, allowing downstream code to reference computer.wifi.chipset reliably.

Intel Wireless Card Classification

Intel cards are represented by the IntelWirelessCard dataclass. Its chipset field is compared against the IntelWirelessIDs bitmask to confirm that the specific model (e.g., AC 9560, AX200) is supported【5†L605-L613】. Unlike Broadcom, Intel cards do not require legacy IO80211Family drivers on newer macOS releases, so the detection primarily drives patch‑set selection rather than kext injection.

Patch Set Selection in modern_wireless.py

Once the hardware is identified, oclp_mod/sys_patch/patchsets/hardware/networking/modern_wireless.py decides which patches to apply. This module bridges the gap between raw detection and the user‑facing “Modern Wireless” checkbox in the GUI.

Detecting Chipset Compatibility

The ModernWireless class evaluates computer.wifi using isinstance checks:

  • Broadcom – bcm_detected becomes True when the chipset is one of the three supported enums【4†L26-L33】.
  • Intel – intel_detected becomes True when the chipset matches IntelWirelessIDs【4†L34-L38】.

These boolean flags are later used to gate the injection of vendor‑specific binaries.

Assigning Patch Names for UI Feedback

To provide clear feedback in the patcher interface, the code maps the detection results to localized strings:

if intel_detected and bcm_detected:
    self.patchName = "Intel/BCM双网卡"
elif intel_detected:
    self.patchName = "Intel无线网卡"
elif bcm_detected:
    self.patchName = "BCM无线网卡"
else:
    self.patchName = "未知无线网卡"

This naming convention appears in the patch list so users know exactly which wireless stack will be modified【4†L40-L50】.

EFI Builder Configuration in wireless.py

The final stage occurs in oclp_mod/efi_builder/networking/wireless.py. Here the BuildWirelessNetworking class translates the patch‑set decisions into concrete kext enablement and NVRAM variables.

Broadcom‑Specific Kext Enablement

When bcm_detected is true, the builder injects the legacy IO80211 stack required for Broadcom cards that lost native support in macOS Sonoma:


# Enable IOSkywalkFamily and IO80211FamilyLegacy for Broadcom

if isinstance(self.computer.wifi, device_probe.Broadcom):
    if self.computer.wifi.chipset in [
        device_probe.Broadcom.Chipsets.AirportBrcmNIC,
        device_probe.Broadcom.Chipsets.AirPortBrcm4360,
    ]:
        BuildSupport(self.model, self.constants, self.computer).enable_kext(
            "IOSkywalkFamily.kext", 
            self.constants.skywalk_version, 
            self.constants.skywalk_path
        )
        BuildSupport(self.model, self.constants, self.computer).enable_kext(
            "IO80211FamilyLegacy.kext", 
            self.constants.io80211legacy_version, 
            self.constants.io80211legacy_path
        )
        # Enable the specific AirPort plugin

        BuildSupport(self.model, self.constants, self.computer).get_kext_by_bundle_path(
            "IO80211FamilyLegacy.kext/Contents/PlugIns/AirPortBrcmNIC.kext"
        )["Enabled"] = True

This sequence restores Wi‑Fi functionality by re‑introducing the drivers Apple removed【5†L53-L81】.

Country Code and Wake‑on‑WLAN Handling

For Broadcom cards that require regulatory domain fixes, the builder injects AirportBrcmFixup.kext and sets the country code via NVRAM (brcmfx-country) or boot‑args (-brcmfxwowl for Wake‑on‑WLAN)【5†L83-L95】.

Intel Wireless Support

Intel cards do not require the legacy IO80211Family stack on modern macOS versions. Consequently, wireless.py skips the kext injection for Intel hardware. The necessary patches—overwrites of wifip2pd, airportd, CoreWLAN.framework, and CoreWiFi.framework—are applied generically by the shared patch set in metal_3802.py and are sufficient to enable Intel Wi‑Fi without additional EFI‑builder logic.

Summary

  • Hardware detection in device_probe.py classifies Broadcom and Intel wireless cards via isinstance checks against Broadcom and IntelWirelessCard dataclasses.
  • Patch selection in modern_wireless.py sets bcm_detected or intel_detected flags based on chipset compatibility and maps them to user‑visible patch names.
  • EFI construction in wireless.py injects IOSkywalkFamily.kext, IO80211FamilyLegacy.kext, and AirPortBrcmNIC.kext for Broadcom hardware, applies AirportBrcmFixup.kext for country‑code fixes, and skips legacy kexts for Intel cards.
  • Generic patches for both vendors (framework overwrites) reside in shared patch sets such as metal_3802.py.

Frequently Asked Questions

How does OCLP‑Mod detect my wireless card type?

OCLP‑Mod queries the PCI bus through device_probe.py. It creates a Broadcom object if the vendor ID matches Broadcom’s identifier and the chipset is one of the supported enums (e.g., AirPortBrcm4360, AirPortBrcmNIC). For Intel, it instantiates IntelWirelessCard and verifies the chipset against IntelWirelessIDs【5†L527-L560】【5†L605-L613】.

What kexts are enabled for Broadcom vs Intel cards?

For Broadcom, the EFI builder enables IOSkywalkFamily.kext, IO80211FamilyLegacy.kext, and the AirPortBrcmNIC.kext plug‑in to restore drivers removed in macOS Sonoma. It also injects AirportBrcmFixup.kext for regulatory domain fixes. For Intel, no legacy IO80211 kexts are required; the patcher relies solely on generic framework overwrites (CoreWLAN, CoreWiFi, wifip2pd, airportd) applied by the shared patch set【5†L53-L81】【4†L26-L38】.

Why does Broadcom require additional patches compared to Intel?

Apple removed native support for many Broadcom chipsets starting with macOS Sonoma, so OCLP‑Mod must re‑inject the legacy IO80211Family stack and the specific AirPortBrcmNIC driver to restore functionality. Intel cards, while also unsupported natively, do not depend on the legacy IO80211 stack; they work with the modern Wi‑Fi architecture once the user‑space daemons and frameworks are patched, which is handled generically for both vendors【4†L74-L79】【5†L83-L95】.

Where are the patch definitions stored in the source code?

Patch definitions reside in two primary locations:

  1. Hardware‑specific logic – oclp_mod/sys_patch/patchsets/hardware/networking/modern_wireless.py contains the ModernWireless class that decides whether to apply Broadcom, Intel, or dual‑card patches【4†L1-L79】.
  2. Shared framework patches – oclp_mod/sys_patch/patchsets/shared_patches/metal_3802.py (and similar files) define the actual binary overwrites for wifip2pd, airportd, CoreWLAN.framework, and CoreWiFi.framework that are common to both Broadcom and Intel configurations.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →