Jump to content
Sign in to follow this  
Followers 0
nijhawank

AR5B97 with Mojave

4 posts in this topic

Recommended Posts

So after failing to make AR5BHB112 work with macOS (its claimed to be unsupported at many places over the internet, but I had mistakenly ordered one), I now want to bring AR5B97 to life.

 

The reasons for using Atheros cards is not that they are cheap but my machine is aimed to be a dual boot machine with windows 10 also on it and I want a card that works well with windows and macOS both, plus my machine requires a half-size mini pci-e. So my options are pretty limited. So here I'm with AR5B97 which is working in Windows/Linux and my adventure in macOS starts.

 

I'm aware that this particular card is not supported OOB but I need to declare compatibility with an OOB card + bring the kexts from High Sierra.

So this is what I did...

1. Added the _DSM method to Device(EXP2) in DSDT...

            Device (EXP2)
            {
                Name (_ADR, 0x001C0001)  // _ADR: Address
                Name (RID, 0x00)
                OperationRegion (PECS, PCI_Config, 0x00, 0x0100)
                Field (PECS, DWordAcc, NoLock, Preserve)
                {
                    Offset (0x62), 
                    PS,     1, 
                    PP,     1, 
                    Offset (0xDB), 
                        ,   7, 
                    PMCE,   1, 
                    Offset (0xDF), 
                        ,   7, 
                    PMCS,   1
                }

                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x09, 
                    0x04
                })
                Name (LPRT, Package (0x04)
                {
                    Package (0x04)
                    {
                        0xFFFF, 
                        0x00, 
                        \_SB.LNKB, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x01, 
                        \_SB.LNKC, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x02, 
                        \_SB.LNKD, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x03, 
                        \_SB.LNKA, 
                        0x00
                    }
                })
                Name (APRT, Package (0x04)
                {
                    Package (0x04)
                    {
                        0xFFFF, 
                        0x00, 
                        0x00, 
                        0x11
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x01, 
                        0x00, 
                        0x12
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x02, 
                        0x00, 
                        0x13
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x03, 
                        0x00, 
                        0x10
                    }
                })
                Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
                {
                    If (\GPIC)
                    {
                        Return (APRT)
                    }
                    Else
                    {
                        Return (LPRT)
                    }
                }

                Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                {
                    Store (Package (0x0C)
                        {
                            "model", 
                            Buffer (0x1E)
                            {
                                "Atheros AR5B97 b/g/n Wireless"
                            }, 

                            "device_type", 
                            Buffer (0x08)
                            {
                                "AirPort"
                            }, 

                            "built-in", 
                            Buffer (One)
                            {
                                 0x00                                           
                            }, 

                            "name", 
                            Buffer (0x10)
                            {
                                "AirPort Extreme"
                            }, 

                            "AAPL,slot-name", 
                            Buffer (0x09)
                            {
                                "Internal"
                            }, 

                            "compatible", 
                            Buffer (0x0B)
                            {
                                "pci168c,30"
                            }
                        }, Local0)
                    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                    Return (Local0)
                }
            }

2. Already have HS Kexts in /Library/Extensions from my previous adventure with AR5BHB112

 

But macOS says no wifi hardware. Please find attached the screenshots of IORegistryExplorer. Is my DSDT modification to add _DSM is correct?

 

Untitled1.thumb.png.0a5028b195681269d35c6b61485d1886.png

 

 

 

 

Untitled2.png

Share this post


Link to post
Share on other sites
Advertisement

You've applied the patch incorrectly by injecting the properties to the PCIe bridge EXP2@1C,1, not to a new hardware device that needed to be defined. As such, the patch is ineffective. You can tell there was no specific device for the card since IOReg shows it listed directly under the PCIe bridge with its PCI ids. You have to inject properties under a declared ACPI device to which they relate; that's how it works.

 

Here's what you need to do under EXP2@1C,1:

            Device (EXP2)
            {
                Name (_ADR, 0x001C0001)  // _ADR: Address
                [...]
                [...]
                [...]
                Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
                {
                    If (\GPIC)
                    {
                        Return (APRT)
                    }
                    Else
                    {
                        Return (LPRT)
                    }
                }

                // Wireless card's properties injection starts here
                // ------------------------------------------------
                Device (ARPT)
                {
                    Name (_ADR, Zero)
                    Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                    {
                        Store (Package (0x0C)
                        {
                            "model",
                            Buffer (0x1E)
                            {
                                "Atheros AR5B97 b/g/n Wireless"
                            },

                            "device_type",
                            Buffer (0x08)
                            {
                                "AirPort"
                            },

                            "built-in",
                            Buffer (One)
                            {
                                 0x00                                           
                            },

                            "name",
                            Buffer (0x10)
                            {
                                "AirPort Extreme"
                            },

                            "AAPL,slot-name",
                            Buffer (0x09)
                            {
                                "Internal"
                            },

                            "compatible",
                            Buffer (0x0B)
                            {
                                "pci168c,30"
                            }
                        }, Local0)
                        DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                        Return (Local0)
                    }
                }
                // -----------------------------------------------
                // Wireless card's properties injection stops here

            }

 

The card's properties will then be injected under this device called ARPT. You'll see it in IOReg will all the card's properties and you should also find the card to be fully operational.

 

 

Edited by Hervé

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

×