Wifi/zh-cn

在这篇文章里我们将描述一下wifi无线网卡的设置

安装系统时的WiFi设置
如果在安装Gentoo过程中需要设置WiFi连接，需要提醒一下的是Gentoo最小安装光盘只支持一部分的无线网卡驱动，并且只提供命令(不提供)来设置WPA/WPA2/Enterprise等无线连接.

如果Gentoo最小安装光盘没有包含您需要设置的网卡驱动或者您需要的图形界面来设置，可以选择其他的live CD，例如System Rescue CD. 需要提醒一下的是当使用non-Gentoo live CD的时候可能需要这些特殊步骤.

相关硬件检测

First detect the wifi controllers. or are command-line tools that can be used for this task.

如果是你的wifi能够在Linux LiveCD或者USB连接成功:

则你的驱动能在相应的以 开头的输出信息中找到.

如果你不能在启动盘中连接wifi，则需要保存当前系统所有的硬件信息列表. 该列表能让你后面找到相对应的硬件驱动:

复制以上命令输出的对应的PCIID部分，然后把它粘贴到http://kmuto.jp/debian/hcl/.

对于USB网卡来说，过程也是大致相同的. 首先拿到系统中所有的USB设备信息:

这个命令会生成对应的PCI ID，生产商(manufacturer)，make，模型(model)，还有USB设备对应的系统的芯片组(chipset). 在所有的信息中，可能芯片组(chipset)是最有用的信息. Google搜索一下"linuxwireless.org <对应的chipset>" 通常是最找到对应的USB NIC驱动和固件(firmware)名字的最快方式.

另外，也能用于获取相应的信息:

这个命令会生成所有驱动信息的列表，无论是PCI网卡还是USB网卡.

内核
With the drivers identified, it is time to configure the Linux kernel.

WEXT
The "cfg80211 wireless extensions compatibility" option aka WEXT will support old and.

Device drivers
Next the right set of corresponding kernel options need to be enabled, based on the drivers and hardware detected previously. The recommendation is to build drivers as modules. Also be sure to enable AES cipher support in the kernel if the wireless network uses WPA or WPA2 encryption.

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

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

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

WPA supplicant
If the wireless network is set up with WPA or WPA2, then needs to be used. For more information on configuring wireless networking in Gentoo Linux, please read the Wireless networking chapter in the Gentoo Handbook.

dmesg
Check the output of.

Be sure to replace
 * with the identifier (PCIID) from lspci,
 * with the network interface name and
 * with the name of the.

Troubleshooting

 * Forum thread: wireless lan can't get ip from access point which explains about 169.254.x.x (link local address) being a wrong IP address
 * Forum thread: iwlwifi fails to load after upgrade to 3.17.0
 * Forum thread: Where is my network !?

External resources

 * Wireless network configuration at ArchLinux