Jump to content
InsanelyMac Forum
Shailua

Updated Atheros AR81(31/32/51/52) Driver for 10.7/10.8

Recommended Posts

Hi everybody, I'm a first time poster but I've been lurking for a while. Somewhat recently I bought a GA-Z77X-UD5H motherboard with two built-in ethernet ports: one Intel and one Atheros (AR8151 v2.0 gigabit ethernet, specifically). While the AppleIntelE1000e driver is being actively worked on, I noticed there hadn't been any recent progress I could see on the AtherosL1cEthernet driver from this thread:

http://www.insanelym...s-ar8131ar8132/

and this site:

https://code.google.com/p/iats/

 

Anyway, the driver in question wraps around the Atheros/Attansic L1c Linux kernel driver so I thought I'd try my hand at updating it all to the latest version. I have no previous experience writing kernel/driver code though, so the whole process has been a interesting learning experience. Full credit goes to the great work of the folks in the above two links that worked on this in the first place. I'm still messing with the code, but I figured if I didn't release something publicly now then I'd spend forever procrastinating and worrying that it wouldn't work for anyone else.

 

While everything seems to be working fine on my own particular machine, it may HORRIBLY BREAK yours. I haven't tested it ANYWHERE else. Please please please make sure you back up everything essential if you want to try this driver.

 

I have only tested it in Mountain Lion. The kext is compiled with the Lion SDK so it should hopefully work on there too. I have no idea if 32-bit works. I haven't even considered Snow Leopard; if you need support for that I'd suggest the older driver in the above links. I wasn't keeping track but chances are I've used something in the code that is 10.7+ only.

 

Did I mention this kext will probably cause your machine to panic and do nothing much else? As far as I can tell, all these Atheros ethernet chips are built into motherboards and laptops and don't come as separate cards. If Mac OS X becomes unbootable, the easiest thing to do would be to switch the card off in the BIOS temporarily and then delete the kext.

 

New Stuff:

- Newer Linux code should properly support AR8151 v1.0 and v2.0 as well as AR8152 v1.1/2.0, AR8131 and AR8132. This is the atl1c driver though, not the alx driver. As such, there is no support for AR8161 or AR8162 I'm afraid.

- I added Wake on LAN and Wake on Demand / Bonjour Sleep Proxy stuff. Seems to work fine, but this motherboard of mine works smoothly with UEFI and no custom DSDT stuff. Older BIOS-based machines might have some DSDT-related weirdness.

- If I remember correctly there was a bug with Bonjour/Zeroconf not showing other servers in Finder. I haven't seen it in the new code.

- The code should hopefully be 64-bit safe, even with more than 4GB of memory being used.

- VLAN was sort of working when I checked a while ago, but it might have broken again since then.

- A few minor bits and pieces I've forgotten, probably just Mac OS code related.

 

Installing:

Use your favourite method of adding kexts to /System/Library/Extensions. Personally I prefer doing it manually from the terminal.

NOTE: As of version 1.2.0, I have disabled debugging stuff in the main kext which shrinks things down and makes for quieter logging. For testing or reporting bugs, please use the kext in the "Debug" subdirectory. This will output much more info to /var/log/system.log.

 

Remove any old version:

sudo rm -rf /System/Library/Extensions/AtherosL1cEthernet.kext

 

Copy the new version from wherever you extracted it, such as Downloads:

sudo cp -r /Users/yourusername/Downloads/AtherosL1cEthernet/AtherosL1cEthernet.kext /System/Library/Extensions/

 

Clean out the kernel cache:

sudo rm -rf /System/Library/Caches/com.apple.kext.caches/*

 

Then reboot to be safe.

 

Changelog:

1.2.3 - Bug fixes and more modifications to the link status check code. It should no longer slow down booting when an ethernet cable is not connected. :) The bug fixes weren't anything huge, so feel free to stick with 1.2.2 (or any other version for that matter) if you're happy with it.

 

1.2.2 - Bug fixes and some better link status checking. TSO was disabled in the latest Linux driver code from Atheros for the 8131 and 8132, so it's possible there are hardware bugs. To be safe, I disabled it by default for those cards. To re-enable it you'll have to find the corresponding card entry in Info.plist and set EnableTSO to true. Be sure to clear your kernel cache afterwards if editing the Info.plist in place.

 

1.2.1 - Hopefully fixed a buffer memory allocation bug on non-gigabit adapters. Also added a minor packet receive optimisation.

 

1.2.0 - Added TCP Segmentation Offload (TSO) support for both IPv4 and IPv6, partial checksum offloading for transmitted packets and a bunch of little bug fixes and what I hope are optimisations.

 

1.1.2 - Rewrote some of the promiscous/multicast mode setting code to hopefully make things all clean and proper and maybe help with Bonjour problems. Filtered multicast reception instead of all-multicast reception should in theory make things a bit faster on a busy network with lots of multicast packets flying around the place, too.

 

1.1.1 - Fixed a silly bug in the link status code. It was causing problems with resetting the connection status and DHCP stuff when the cable was disconnected etc. Also fixed up some other random bits and pieces for the 32-bit module.

 

1.1.0 - The somewhat arbitrarily numbered initial release.

 

Downloads:

The zip files are (hopefully) attached to this post. They contain the kext module and the GPL sourcecode. The kext in the "Debug" folder is mostly the same as the regular kext, but prints much more information to the system logs.

 

Latest:

20121110 attachicon.gifAtherosL1cEthernet-1.2.3.zip

MD5 checksum (AtherosL1cEthernet-1.2.3.zip) = 9fb9113a573072e42e35da4e807b310a

 

Previous:

20121103 attachicon.gifAtherosL1cEthernet-1.2.2.zip

MD5 checksum (AtherosL1cEthernet-1.2.2.zip) = ac192399f1c3035e18a5a1e3d590e2f4

 

20121020 attachicon.gifAtherosL1cEthernet-1.2.1.zip

MD5 checksum (AtherosL1cEthernet-1.2.1.zip) = 66ca3c478ed4b4b666c11b5fbc8ae2bd

 

20121019 attachicon.gifAtherosL1cEthernet-1.2.0.zip

WARNING: See posts further down, this one might cause a kernel panic on certain (non-gigabit?) ethernet chips.

MD5 checksum (AtherosL1cEthernet-1.2.0.zip) = 1b13bc115b89736b2d57a24ed3743efd

 

20121008 attachicon.gifAtherosL1cEthernet-1.1.2.zip

MD5 checksum (AtherosL1cEthernet-1.1.2.zip) = c7629574c6aefc97e17fc09a3d4aab98

 

20121003 attachicon.gifAtherosL1cEthernet-1.1.1.zip

MD5 checksum (AtherosL1cEthernet-1.1.1.zip) = 4c78da8a9bfbb02f6e4150802fa896ac

 

20120924 attachicon.gifAtherosL1cEthernet-1.1.0.zip

MD5 checksum (AtherosL1cEthernet-1.1.0.zip) = 7bf3cb1cff665ca0cc3dc23aebf3c286

 

 

As a final caveat, I'm mostly just throwing this driver/code out there and seeing what happens. I can't provide serious help or even guarantee a reply if things don't work for anyone. Enjoy! :)

please update this project for 10.10 and 10.9 thanks 

https://www.sendspace.com/file/9uqgnk i have updated the driver to 10.10 SDK for you and it works really well

Share this post


Link to post
Share on other sites
Advertisement

Initally this driver did not work at all with the error "cannot allocate ring descriptors", (AR8131) I recompiled the AtherosL1cEthernet 1.2.3 with xcode 6.1 gm and fix the gcc to llvm and set to 64bit and osx 10.10 GM candidate and it works now...  doing some load testing...

Share this post


Link to post
Share on other sites

Has anyone experienced an increase in latency with the Atheros AR8161 nic on the Z77-DS3H MB?

I've run this test multiple times, under different conditions (see below) so extremely unlikely the issue is coming from anything other than the computer. 

1. Computer connected to 2 different routers: Computer is running Yosemite with no other apps running. Latency is initially 17-25 msec. After about 5 minutes it jumps to 500-650 msec which not only makes the computer internet slower, but it also appears to affect anything else attached to the router. My Vonage VOIP telephone becomes quite choppy and audio degrades significantly.
2. Computer connected directly to the cable modem. Same result - after about 5 minutes latency jumps to ~500 msec.
3. Vonage modem connected directly to cable modem. No chop and no audio degradation after at least 30 minutes.
4. Dell laptop running Win 7 connected to router without Yosemite computer - no increase in latency over 30 minutes.
5. Dell laptop connected directly to cable modem. Same result as in experiment 4.
6. Dell laptop connected to router and Yosemite running. When latency jumps to ~500 msec, latency also jumps on Dell laptop.

The only thing I haven't tried is disabling the nic on the MB and try another nic. Short of that, does anyone have some ideas on how to resolve this?

 

5 Nov Follow-up

 

Put a $12 Tenda 10/100/1000 Realtek (RTL8169 chipset) in and have had no problems with latency. Hopefully someone will take another look at the Atheros chipset issue.

Share this post


Link to post
Share on other sites

I've been able to run 1.2.3 with el capitan... works pretty well so far.  I had been using a very early version of the driver (1.0.1b9 i believe).. and it was causing all kinds of issues on large file copies, 1.2.3 seems to have been a good idea to update :)

 

my system is an Alienware m11x R1  (ethernet is Atheros AR8132)

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×