在Gentoo上安装无线网卡 Iwlwifi

Iwlwifi

From Gentoo Linux Wiki

Jump to: navigation, search

iwlwifi is Intel's open source driver for their newer wireless network adapters (Intel PRO/Wireless 3945ABG/BG and newer). The driver is included in the linux kernel since version 2.6.24.

Contents

[hide]
<script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>

Basis Setup

Kernel Setup

Enable the "mac80211" WLAN stack and crypto options for WEP, WPA and WPA2:

Linux Kernel Configuration:
Networking --->
[*] Networking support
Wireless --->
[*] Improved wireless configuration API
[*] nl80211 new netlink interface support
<*> Generic IEEE 802.11 Networking Stack (mac80211)
[*] Cryptographic API --->
--- Cryptographic API
<*> Cryptographic algorithm manager
<*> SHA1 digest algorithm
<*> SHA224 and SHA256 digest algorithm
<*> ECB support
<*> CBC support
<*> PCBC support
<*> AES cipher algorithms
<*> ARC4 cipher algorithm
<*> Michael MIC keyed digest algorithm

Then, be sure you have activated the option "Prompt for development and/or incomplete code/drivers" in the "General Setup" section of the kernel configuration:

Linux Kernel Configuration:
General Setup --->
[*] Prompt for development and/or incomplete code/drivers

Otherwise you won't be able to access the iwlwifi driver options in the kernel configuration!

Later on, you will also have to install the corresponding microcode file for your iwlwifi network adapter (it is, of course, available in portage). The iwlwifi driver loads this file at startup. To get this working, we need to enable the kernel's firmware_loader infrastructure:

Linux Kernel Configuration:
Device Drivers --->
Generic Driver Options --->
[*] Userspace firmware loading support

IMPORTANT: For the next steps, it is highly recommended to compile the drivers as kernel modules (<M> instead of <*>). This is because the driver needs access to the file system (i.e. /lib/firmware) to load the firmware. If you compile the driver as built-in, it will not be able to load the (essential) firmware since the file systems are mounted *after* the kernel has been loaded.

Stable kernel (2.6.25)

If you have an Intel PRO/Wireless 3945AGB/BG Network Connection adapter, activate the iwl3945 driver:

Linux Kernel Configuration:
Device Drivers --->
[*] Network device support --->
[*] Wireless LAN --->
[*] Wireless LAN (IEEE 802.11)
<M> Intel PRO/Wireless 3945ABG/BG Network Connection
[*] Enable Wireless QoS in iwl3945 driver
[*] Enable Spectrum Measurement in iwl3945 drivers

Or if you have an Intel Wireless WiFi 4965AGN adapter, activate the iwl4965 driver:

Linux Kernel Configuration:
Device Drivers --->
[*] Network device support --->
[*] Wireless LAN --->
[*] Wireless LAN (IEEE 802.11)
<M> Intel Wireless WiFi 4965AGN
[*] Enable Wireless QoS in iwl4965 driver
[*] Enable 802.11n HT features in iwl4965 driver
[*] Enable Spectrum Measurement in iwl4965 driver
[*] Enable Sensitivity Calibration in iwl4965 driver

Unstable kernel (>=2.6.26)

If you have an Intel PRO/Wireless 3945AGB/BG Network Connection adapter, activate the iwl3945 driver:

Linux Kernel Configuration:
Device Drivers --->
[*] Network device support --->
[*] Wireless LAN --->
[*] Wireless LAN (IEEE 802.11)
<*> Intel Wireless Wifi Core
[*] IWLWIFI RF kill support
< > Intel Wireless WiFi 4965AGN
<M> Intel PRO/Wireless 3945ABG/BG Network Connection
[*] Enable Spectrum Measurement in iwl3945 drivers

Or if you have an Intel Wireless WiFi 4965AGN adapter, activate the iwl4965 driver:

Linux Kernel Configuration:
Device Drivers --->
[*] Network device support --->
[*] Wireless LAN --->
[*] Wireless LAN (IEEE 802.11)
<*> Intel Wireless Wifi Core
[*] IWLWIFI RF kill support
<M> Intel Wireless WiFi 4965AGN
[*] Enable 802.11n HT features in iwl4965 driver
[*] Enable Spectrum Measurement in iwl4965 driver
[*] Enable Sensitivity Calibration in iwl4965 driver
< > Intel PRO/Wireless 3945ABG/BG Network Connection

There is also now support for the WLAN LEDs, but be aware, that the LED blinks a lot when there is traffic:

Linux Kernel Configuration:
Device Drivers --->
[*] Network device support --->
[*] Wireless LAN --->
[*] Wireless LAN (IEEE 802.11)
<M> Intel PRO/Wireless 3945ABG/BG Network Connection
[*] Enable LEDS features in iwl3945 driver

Software Setup - Installing the microcode files

As already said above, you have to install the corresponding firmware/microcode for your iwlwifi network device in order to become really useful as a wireless adapter.

Here is a short (and not complete) overview about what the microcode does, taken from the file README.iwlwifi-3945-ucode that is shipped with the microcode package iwl3945-ucode from portage:

Note: Quote: README.iwlwifi-3945-ucode

The file iwlwifi-3945.ucode provided in this package is required to be present on your system in order for the Intel PRO/Wireless 3945ABG/BG Network Connection Adapter driver for Linux (iwlwifi-3945) to be able to operate on your system.

On adapter initialization, and at varying times during the uptime of the adapter, the microcode is loaded into the RAM on the network adapter. The microcode provides the low level MAC features including radio control and high precision timing events (backoff, transmit, etc.) while also providing varying levels of packet filtering which can be used to keep the host from having to handle packets that are not of interest given the current operating mode of the device.

To install the microcode, simply emerge iwl3945-ucode:

emerge -av net-wireless/iwl3945-ucode

or, respectively iwl4965-ucode:

emerge -av net-wireless/iwl4965-ucode

It is also recommended to check the README files of the microcode packages, as they contain other useful information for setting up the device. You can usually find them in /usr/share/doc/iwl3945-ucode-*/ or /usr/share/doc/iwl4965-ucode-*/ respectively, where * is to be replaced with the package version.

For further configuration follow the Gentoo Handbook.

TIP: For easy on-desktop configuration of your wireless adapter, see the NetworkManager HOWTO.

Advanced Topics

There are a few things you can play with through the sysfs interface /sys/bus/pci/drivers/iwl3945/00*/*

Monitor mode

To set your card into monitor mode, you need to patch the driver. See the guide at aircrack-ng.org.

Troubleshooting

  • Switching from ipw3945

If you switched from ipw3945, you should unmerge everything that belonged to ipw3945. Also you may want to clean up your device names. Problems occur here because some drivers refer to your wireless interface as wlan0, some as ethX. You need to reconfigure /etc/udev/rules.d/70-persistent-net or recreate the rules there. You can use udevadm to recreate the rules #udevadm trigger --subsystem-match=net

  • My WLAN LED does not work ?

Support is added since kernel 2.6.26.

  • iwl4965: iwlwifi-4965-1.ucode firmware file req failed: Reason -2

This error indicate a firmware version/filename mismatch. Just rename the file to whatever iwlwifi displays in this case: iwlwifi-4965-1.ucode If this fails, try an alternate version, perhaps net-wireless/iwl4965-ucode-228.57.1.21.

  • Problem with wpa_supplicant and asociation

If the AP SSID is hidden or there multiple SSIDs with the same name, be sure that ap_scan does not exist or is commented out in /etc/wpa_supplicant/wpa_supplicant.conf.

  • Netmount starting too early

Netmount crapped out because the network was not ready. The solution, from this gentoo-user post is to edit /etc/conf.d/rc so that the Wifi is not started by udev, e.g., RC_PLUG_SERVICES="!net.wlan".

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值