Gentoo Wiki


Merge-arrows.gifIt has been suggested that this article be Merged into one article with MadWifi.    (Discuss)



The Netgear WG511T is a PC-Card(former PCMCIA) 802.11g WLAN adapter. It is fully supported by Linux.

This guide will use wpa_supplicant, which is only necessary if you intend to connect to WPA networks. As wpa_supplicant supports non-WPA networks, too, you might install it even if you do not use WPA.

This guide contains instructions for the Netgear WG511T cards which use the Atheros chipset. This guide will not work for the WG511 or WG511v2 cards which use a Prism chipset and require a different driver.

Temporary Warning

As of version 0.4.6, madwifi support in the wpa_supplicant package has been disabled due to bugginess. You will need to use version 0.4.5 (emerge =net-wireless/wpa_supplicant-0.4.5). Make sure you have +madwifi in your /etc/make.conf.


To install the madwifi driver and wpa_supplicant, type in as root:

emerge -av net-wireless/madwifi-ng net-wireless/wpa_supplicant

Type Yes if you want to emerge the packages it shows.



You may spread your configuration between this file and /etc/conf.d/wireless.

It should look like:

modules=( "dhcp" "wpa_supplicant" )

# Configuration of your wired stuff (might differ a lot)
config_eth0=( "dhcp" )
dhcpcd_eth0="-t 10"

# wgt511
config_ath0=( "dhcp" )
dhcpcd_ath0="-t 30"

Advanced configuration items can be found in /etc/conf.d/net.example.


Use your prefered editor to edit /etc/wpa_supplicant.conf. Look at /etc/wpa_supplicant.conf.example if you need a more detailed configuration (like advanced WPA or WEP).

# Where to create a socket for the control of the wpa_supplicant process

# Which group is allowed to configure wpa_supplicant?
# In this example, this is only root. You may want to create a wlan group (or use another privileged group like wheel)

# Let wpa_supplicant manage the task of scanning

# Here we start with the network list
# Prototype:
# network={
#     ssid="myssid"
#     (other stuff)
# }

# A WPA network with pre-shared keys (WPA-PSK)
    # If you use a passphrase, have a look at the wpa_passphrase program which came with wpa_supplicant

# An open network

If you do not want every user to read your secret wireless keys, type the following:

chmod 700 /etc/wpa_supplicant.conf

Automatic startup

Link /etc/init.d/net.ath0 to /etc/init.d/net.lo:

ln -s /etc/init.d/net.lo /etc/init.d/net.ath0

Autostart the wireless device:

rc-update add net.ath0 default


Now type in

/etc/init.d/net.ath0 start

Wait a few seconds and start using your wireless LAN!

Startup accelarator (optional)

When you start your computer without any WLAN in range, you may want to send wpa_supplicant into background - otherwise it will pause your system's startup by the time (in seconds) you set in wpa_timeout_ath0 in /etc/conf.d/net.

Unfortunately, the current stable /etc/init.d/net.lo does not provide backgrounding functionalities.

To switch permanently to the "unstable" baselayout package, edit /etc/portage/package.keywords and add the following line:

sys-apps/baselayout ~x86

Now update baselayout using

emerge -u sys-apps/baselayout

Use your prefered editor to edit /etc/init.d/net.ath0 (this is - if you followed this guide - the net.lo) and replace the line


with - as you might have guessed -


Warning: This enables backgrounding for all devices. If you experience problems with other network devices, you should remove the net.ath0 symlink, copy the net.lo file to net.ath0 and revert net.lo (replace background="${background:-yes}" with background="${background:-no}").

See also

Retrieved from ""

Last modified: Sun, 24 Aug 2008 09:08:00 +0000 Hits: 15,331