From Gentoo Wiki
Jump to: navigation, search
This page contains changes which are not marked for translation.


This article describes the setup of a Wifi network device.

Wifi during installation

If a Wifi connection is needed while installing Gentoo, note that the Gentoo minimal install CD has a limited number of drivers available, and provides only wpa_cli (and not wpa_gui) for configuring for WPA/WPA2/Enterprise connections.

If the minimal install CD does not contain the required drivers or the graphical frontend to wpa_supplicant is preferred, choose a different live CD such as the System Rescue CD. Be aware that some special steps may be required when using a non-Gentoo live CD.

Hardware detection

First detect the Wifi controllers. You can use lspci or lsusb for this task.

If a linux (livecd/usb) is booted that makes a Wifi connection:

root #lspci -k

The driver will be identified at "Kernel driver in use:"

If a linux is booted that does not make a Wifi connection:

root #lspci -n

The driver may be identified by copying the list of PCIID's that the command produces and pasting at http://kmuto.jp/debian/hcl/

user $lsusb

May produce PCI ID, manufacturer, make, model, or chipset. Of these, the chipset may be the most useful information. Googling linuxwireless.org <chipset> is often the shortest way to find a USB NIC driver and firmware name.

root #lshw | grep -i driver

Will produce a list of all drivers whether the device is PCI or USB connected.


IEEE 802.11

[*] Networking support  --->
    [*] Wireless  --->
        <*>   cfg80211 - wireless configuration API
        [ ]     nl80211 testmode command
        [ ]     enable developer warnings
        [ ]     cfg80211 regulatory debugging
        [ ]     cfg80211 certification onus
        [*]     enable powersave by default
        [ ]     cfg80211 DebugFS entries
        [ ]     use statically compiled regulatory rules database
        [ ]     cfg80211 wireless extensions compatibility
        <*>   Generic IEEE 802.11 Networking Stack (mac80211)
        [ ]   PID controller based rate control algorithm
        [*]   Minstrel
        [*]     Minstrel 802.11n support
              Default rate control algorithm (Minstrel)  --->
        [ ]   Enable mac80211 mesh networking (pre-802.11s) support
        -*-   Enable LED triggers
        [ ]   Export mac80211 internals in DebugFS
        [ ]   Trace all mac80211 debug messages
        [ ]   Select mac80211 debugging features  ----       

Minstrel and its 802.11n support is a rate control algorithm[1] should always be activated.[2]


The "cfg80211 wireless extensions compatibility" option aka WEXT[3] will support old wireless-tools & iwconfig and will be needed only for exotic or very old devices.

[*] Networking support  --->
    [*] Wireless  --->
        [*]     cfg80211 wireless extensions compatibility

Device drivers

Dependent on your hardware you need to activate the corresponding kernel options. The recommendation is compiling the drivers as modules. Also be sure to enable AES cipher support in the kernel if the network you are connecting to requires it.

    Device Drivers  --->
    [*] Network device support  --->
        [*] Wireless LAN  --->

            Select the driver for your Wifi network device, e.g.:
            <M> Broadcom 43xx wireless support (mac80211 stack) (b43)
            [M]    Support for 802.11n (N-PHY) devices
            [M]    Support for low-power (LP-PHY) devices
            [M]    Support for HT-PHY (high throughput) devices
            <M> Intel Wireless WiFi Next Gen AGN - Wireless-N/Advanced-N/Ultimate-N (iwlwifi)
            <M>    Intel Wireless WiFi DVM Firmware support                             
            <M>    Intel Wireless WiFi MVM Firmware support
            <M> Intel Wireless WiFi 4965AGN (iwl4965)
            <M> Intel PRO/Wireless 3945ABG/BG Network Connection (iwl3945)
            <M> Ralink driver support  --->
                <M>   Ralink rt27xx/rt28xx/rt30xx (USB) support (rt2800usb)

-*- Cryptographic API --->
    -*- AES cipher algorithms
    -*- AES cipher algorithms (x86_64)
    <*> AES cipher algorithms (AES-NI)

LED support

To enable LED triggers for different packet receive/transmit events, compile the kernel with the following options:

Device Drivers  --->
    [*] LED Support  --->
        <*>   LED Class Support

[*] Networking support  --->
    [*] Wireless  --->
        [*] Enable LED triggers


In addition to the kernel driver, some chipsets also require firmware. If required, locate it on the following list and install it:

root #emerge --ask sys-kernel/linux-firmware
Wifi device Driver Firmware Note
Atheros AR9271 & AR7010 ath9k_htc sys-kernel/linux-firmware
Broadcom 43xx wireless support b43 / b43legacy sys-firmware/b43-firmware aircrack-ng ready, most probably the best choice if your bcm43xx device is supported
Broadcom 43xx wireless support (e.g. 4313) brcmsmac / brcmfmac sys-kernel/linux-firmware no powersave, LED support and other features
Broadcom 43xx wireless support wl net-wireless/broadcom-sta proprietary, no AP or Monitor modes, comparision of bcm43xx drivers
Intel PRO/Wireless 2200BG ipw2200 sys-firmware/ipw2200-firmware
Intel PRO/Wireless 3945ABG/BG iwl3945 sys-kernel/linux-firmware
Intel Wireless WiFi 4965AGN iwl4965 sys-kernel/linux-firmware
Intel Wireless WiFi 5100AGN, 5150AGN, 5300AGN, 5350AGN iwlwifi sys-kernel/linux-firmware
Intel Centrino Wireless-N 1000 iwlwifi sys-firmware/iwl1000-ucode or sys-kernel/linux-firmware
Intel Centrino Ultimate-N 6300, Advanced-N 6200 iwlwifi sys-firmware/iwl6000-ucode or sys-kernel/linux-firmware
Intel Centrino Advanced-N + WiMAX 6250, Wireless-N + WiMAX 6150 iwlwifi sys-firmware/iwl6050-ucode or sys-kernel/linux-firmware
Intel Centrino Advanced-N 6205 iwlwifi sys-firmware/iwl6005-ucode or sys-kernel/linux-firmware
Intel Centrino Advanced-N 6230, Wireless-N 1030, Wireless-N 130 iwlwifi sys-firmware/iwl6030-ucode or sys-kernel/linux-firmware
Intel Centrino Wireless-N 2200, 2230 iwlwifi sys-kernel/linux-firmware
Intel Centrino Wireless-N 100, 105, 135 iwlwifi sys-kernel/linux-firmware
Intel Wireless 3160 iwlwifi sys-firmware/iwl3160-ucode or sys-kernel/linux-firmware Requires kernel parameter Device-Drivers->Network device support->Wireless LAN->Intel Wireless WiFi MVM Firmware support
Intel Wireless 7260 iwlwifi sys-firmware/iwl7260-ucode or sys-kernel/linux-firmware Requires kernel parameter Device-Drivers->Network device support->Wireless LAN->Intel Wireless WiFi MVM Firmware support
Ralink driver support e.g. rt2800usb sys-kernel/linux-firmware

If the driver requires firmware but does not appear on the list, it will be necessary to download it manually and place it in /lib/firmware.


After a reboot with the new kernel or after loading the modules, check that the device is ready using one of following methods:

The name of the device may be different, e.g. eth1 or ath0 or a name as described in Network interface naming if you use {{>=}} sys-fs/udev-200 with default configuration.

Using sys-apps/iproute2:

user $ip addr
3: wlan0:   ...

Using sys-apps/net-tools:

user $ifconfig -a
wlan0     ...
root #ifconfig -v wlan0 up
SIOCSIFFLAGS: Operation not possible due to RF-kill
WARNING: at least one error occurred. (-1)

Using net-wireless/wireless-tools if your driver supports the wireless extensions stack. Non-wireless interfaces will be listed with "no wireless extensions":

root #iwconfig
wlan0     IEEE 802.11abg  ESSID:"..."  
          Mode:Managed  Frequency:2.462 GHz  Access Point: ..:..:..:..:..:..   
          Link Quality=52/70  Signal level=-58 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:434   Missed beacon:0

lo        no wireless extensions.
sit0      no wireless extensions.
eth0      no wireless extensions.
root #iw dev
	Interface wlan0
		ifindex 4
		type managed

If not, check dmesg for errors:

user $dmesg

See also

AC1200 Wireless Adapters

External resources

Forum thread