]> Linux and Atheros AR8131 🌐:aligrant.com

Linux and Atheros AR8131

Alastair Grant | Sun 31 Jul 2011

My home-server has a nasty habit of failing to POST - after a power-cut (and the UPS running out of juice) the usual flicking of power switches in strange patterns didn't convince it to boot.

I tend to use my desktop internals as pass-me-down parts for my server when I upgrade it. But even though my desktop is 3 years old, the money involved in making an upgrade worth-while was too high (although I did use my shopping trip as an excuse to buy an extra 6GB for the desktop). So instead I hunted down the cheapest Sandy Bridge parts I could find - as latest technology is a must when buying new, but top-of-the-range is not so important for serving up files. I opted for a MSI H61M-P21 (B3) mATX board, which has a H61 chipset so supports a GPU-on-CPU setup, and a healthy dollop of RAM.

Having Linux on my server is a bonus, as it's fairly resistant to being dumped onto new hardware and just getting on with it. But complex RAID drives often get in the way. Nope, mdraid wins again and it all booted fine - apart from the network card.

The built-in gigabit NIC reports itself as:

02:00.0 Ethernet controller: Atheros Communications Device 1083 (rev c0)
Model: "Attansic Ethernet controller"
Vendor: pci 0x1969 "Attansic Technology Corp."
Device: pci 0x1083
SubVendor: pci 0x1462 "Micro-Star International Co., Ltd."
SubDevice: pci 0x7680

The only information I had was the rather useful:

Unable to configure the network card because the kernel device (eth0, wlan0) is not present. This is mostly caused by missing firmware (for wlan devices).

Turns out, in the Linux world, the word "firmware" is used for drivers (where I always thought firmware was something that was written onto a ROM.

A little research lead me to the chipset of the NIC being an "Atheros AR8131", part of the Atheros AR813x family, or Atheros AR81 family (depending on where you look). Linux drivers for many of the Atheros cards are bundled with the kernel, apart from this one. Follow the dozens of links from around the Internet to the driver download got me nowhere as Atheros has recently been bought by Qualcomm and their web-site has vanished. It's still available via the Internet Archive, but not the download.

So for your viewing pleasure, I've mirrored it temporarily:

Installation seemed to be a fairly normal affair, you have to have your kernel sources (so bugger knows what happens if your kernel updates automatically), and do the usual sort of:

gzip -d AR81Family-linux-v1.0.1.14.tar.gz
tar xf AR81Family-linux-v1.0.1.14.tar
cd src
make install

Alas, on my kernel (2.6.37) I was thrown an error:
Makefile:105: *** Linux kernel source not configured - missing autoconf.h. Stop.

Super! This time I have to thank the openSUSE IRC community for helping me dig out the relevant fix by a very helpful Ubuntu community member.

Again, as the Ubuntu forums are far from reliable and also require signing-up to download files, I've mirrored the patch provided. I hope the author doesn't mind (the driver is GPL):

Installation is fairly simple too, pop it into the src directory for the driver, and run the command:

patch -p1 < AR81Family-linux-v1-

Then you can do the installation process as above (if you've already try that, run make clean first).

I hope this helps somebody else - it'll probably help me in a few months when I need to reapply it...


Breaking from the voyeuristic norms of the Internet, any comments can be made in private by contacting me.