NetGear WG311T Wireless PCI Adapter under Linux

This document outlines how to get the NetGear WG311T wireless PCI adapter to work under Linux.

Environment

Slackware Linux 9.1
NetGear 108Mbps Wireless PCI Adapter (WG311T)

/sbin/lspci output for installed card

00:09.0 Ethernet controller: Unknown device 168c:0013 (rev 01)

Driver Installation

This card uses the Linux madwifi drivers which actually work for most cards that use the Atheros ar5210, ar5211, and ar5212 chipsets . Currently, the drivers are only available via CVS. You can get a hold of the drivers using the following command:

root@mgmt:~#
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/madwifi co madwifi

Building and installing the drivers is very easy. The standard commands will work.

root@mgmt:~# cd madwifi
root@mgmt:~# make
root@mgmt:~# make install

Making it work

Once the drivers are installed, load the drivers in the following order:

root@mgmt:~# /sbin/modprobe wlan
root@mgmt:~# /sbin/modprobe ath_hal
root@mgmt:~# /sbin/modprobe ath_pci

With the drivers loaded, /bin/lsmod should look something like this.

root@mgmt:~# lsmod    
Module                  Size  Used by    Tainted: P 
ath_pci                29784   1
ath_hal               115344   1  [ath_pci]
wlan                   46758   1  [ath_pci]
ide-scsi                9424   0
agpgart                39576   0  (unused)

As you will see below, the madwifi drivers create a new interface to the card in ifconfig named "ath0".

Even without wireless tools installed, I was able to get the card to come up and communicate with an open access point. Using wireless tools is required to connect using WEP or to a specific SSID however.

Using ifconfig, I set the ath0 interface to UP. The card immediately associates to the open access point.

root@mgmt:~# /sbin/ifconfig ath0 up

Now we get an IP address on the network via DHCP.

root@mgmt:~# /sbin/dhcpcd ath0

Below is the interface in ifconfig.

root@mgmt:~# ifconfig
ath0      Link encap:Ethernet  HWaddr 00:09:5B:C5:27:FB 
          inet addr:192.168.1.253  Bcast:192.168.255.255  Mask:255.255.0.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:16030 errors:11316 dropped:0 overruns:0 frame:11316
          TX packets:333 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:199
          RX bytes:1294760 (1.2 Mb)  TX bytes:66518 (64.9 Kb)
          Interrupt:4 Memory:d08be000-d08ce000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

athstats

Additionally, there is a tool called "athstats" in the madwifi/tools directory. It wasn't installed by the installer, so it can be compiled and installed as well. It provides some interesting statistics.

root@mgmt:~# athstats
13 tx management frames
5 long on-chip tx retries
11 tx frames with no ack marked
21677 rx failed 'cuz of bad CRC
138 rx management frames
998444 PHY errors
    995519 OFDM timing
    2925 CCK timing
126 periodic calibrations
7608 rate control checks
rssi of last ack: 49 (+0)
rssi of last recvd frame: 49