个人工具

UbuntuHelp:WifiDocs/Driver/Madwifi

来自Ubuntu中文

跳转至: 导航, 搜索

<<Include(Tag/NeedsExpansion)>>

Driver Information

  • Driver Name: Madwifi
  • Module Name: ath_pci
  • Supports: PCI Devices with Atheros chipsets

{i} There will be usb support in a future release.

Support Channels

WEP info

  • When using a shared key, the driver must be modified with this command for it to work sudo iwpriv authmode 2

WPA info

Ubuntu Release Specific Info

Ubuntu 8.10 (Intrepid)

  • The built-in drivers/modules (ath5k) are in linux-backports-modules-intrepid package. More information on debugging problems on its installation can be found here:

UbuntuHelp:WifiDocs/Driver/Atheros

Ubuntu 8.04 (Hardy)

  • The drivers are in the restricted modules package; also see the madwifi-tools package.

sudo apt-get install linux-restricted-modules madwifi-tools

Ubuntu 7.10 (Gutsy)

  • The Madwifi driver has so far only been updated to include a few bug fixes.

Ubuntu 7.04 (Feisty)

  • The wlanconfig tool is now available from the universe repository in the madwifi-tools package.

Ubuntu 6.10 (Edgy)

  • The version of Madwifi included in Ubuntu 6.10 was switched to madwifi-ng. So these devices will just work out of the box. Simply install and configure in the Networking control panel.
  • The wlanconfig tool is not present in Ubuntu 6.10, but there is a backport package from 7.04 available.

Ubuntu 6.06 (Dapper)

  • The version of Madwifi included with Ubuntu 6.06 is madwifi-old. This was considered to be more stable than the new madwifi-ng at the time of release.
  • If you need WPA support then you will need to specify the Madwifi driver interface with wpa_supplicant.

Ubuntu 5.10 (Breezy)

  • Madwifi is part of the breezy release (madwifi-old v .9.6.0). It is inside of the package linux-restricted-modules-{kerenl v}
  • If a card is inserted and recognized during install then linux-restricted-modules-{kernel v} will be installed.

Ubuntu Server Edition

See Router/Madwifi for details: do not follow the instructions on how to set the driver up in "master" mode by default.

Compile Newer Driver

<!> See [[UbuntuHelp:[relspec|notes sections]]] below to add comments and corrections about compiling

Madwifi-ng Compile

This howto will install the latest svn snapshot of the madwifi-ng driver for pci devices based on the atheros chipset. The difference between this and the other howtos on madwifi (that I've seen at time of writing this) are the others will update to the latest madwifi-old module and this installs madwifi-ng. The newer features found in the -ng version can be found here. This update is not necessary unless:

  1. Your pci device is not working with current version that comes with breezy.
  2. Or you can use if you removed restricted modules to use latest nvidia/fglrx drivers and want to try the new -ng driver.
  3. You build a custom kernel but note these instructions do not include steps to properly make and install when using custom kernel. You will just have to make sure you have correct headers and gcc compiler for the kernel you're using.
  4. Or you just want to try and use the latest driver. It may improve performance or fix an unknown bug or add a feature you've been waiting for.

{i} Note: madwifi does not currently support USB devices with the atheros chipset and the roadmap shows it will be sometime before USB support is built into the driver(version 2.0). You can watch progress at www.madwifi-project.org /!\ Warning: The atheros driver that comes with Breezy is part of the restricted-modules package. This will need to be removed before you can install the latest driver. All modules in this package will be removed and may affect areas such as your graphics driver. If you need to use a module in this package then you will also have to recompile and install that module also. There are howtos on the latest nvidia and fglrx in the breezy tips and tricks section of the form. Here are the modules in the restricted-module package

  Currently the following modules are included:
  - madwifi (Atheros)
  - fglrx (ATI)
  - nvidia
  - fcdsl, fcdsl2, fcdslsl, fcdslslusb, fcdslusb, fcdslusb2, fcdslusba,
  fcpci, fcpcmcia, fcpcmcia_cs, fcusb, fxusb (AVM ISDN)
  - ltmodem (Winmodem)
  

Preparation

You will need a working internet connection to complete this howto. Basic knowledge of moving around in the terminal is required. Remove the following package if installed:

 
  sudo apt-get remove --purge linux-restricted-modules-`uname -r`
  

<!> See [[UbuntuHelp:[relspc|release specific]]] notes below for required packages to complete build and install.

Download

You can follow the instructions on MADWiFi if the following method is obsolete.

  cd /usr/src
  
  sudo svn checkout http://svn.madwifi-project.org/trunk madwifi-ng

  The above URL seems to have been changed, so try the following instead. 
  sudo svn checkout http://svn.madwifi-project.org/madwifi/trunk madwifi-ng
  

move into the directory that was created

  cd /usr/src/madwifi-ng
  

Build

Make sure you are using the same version of gcc to build your MADWiFi driver. If you are using Breezy, you probably should use gcc 3.4.5. A quick way to check the gcc version is

  gcc --version
  

Before you start the command make, a small edit has to be done to a file so driver will make.

  gksudo gedit Makefile.inc
  

towards the bottom is a line line that needs to be modified.

  '''COPTS+= -Werror'''
  

change this line and remove the -Werror part so line now looks like this.

  '''COPTS+='''
  

{i} This will not affect driver in anyway, it's just something in the way ubuntu built the kernel for breezy which will prevent installing the driver. Now

  sudo make
  

There will be some warnings but you can ignore those. Look for any errors as these will need to be addressed before moving on to next step.

Install

  sudo make install
  

You may get this warning

  WARNING:
  It seems that there are modules left from previous MadWifi installations.
  You should consider removing them before you continue, or else you might
  experience problems during operation. Remove old modules?
  
  [l]ist, [r]emove, [i]gnore or e[x]it (l,r,i,[x]) ?
  

You should remove with option r If all goes well your last few lines should look like this.

  (export MODULEPATH=/lib/modules/2.6.15-8-686/net; depmod -ae)
  echo "KERNELRELEASE=2.6.15-8-686" > ./install.log
  echo "DESTDIR=" >> ./install.log
  

Insert module

  sudo modprobe ath_pci
  

Create the interface

With the new -ng module things work differently. An interface has to be created.

  wlanconfig ath0 create wlandev wifi0 wlanmode sta
  

You should now have the latest madwifi driver working. Just configure your network and connect. If it does not then try to restart your network

  sudo /etc/init.d/networking restart
  

or reboot

Uninstall

If you want to uninstall this module just move back to the directory where you built it:

  cd /usr/src/madwifi-ng
  

and

  sudo make uninstall
  

You can discuss problems in this forum thread for Breezy release. Or you can search for help on the madwifi site <<Anchor(relspec)>>

Compile -ng release-specific notes

Breezy Badger (5.10)

  • Required packages needed to complete compilation
  • build-essential
  • sharutil
  • gcc-3.4
  • subversion
User Notes

Dapper (6.06)

  • Required packages needed to complete compilation
  • build-essential
  • subversion
  • sharutil
User Notes

Edgy Eft (6.10)

  • Required packages needed to complete compilation
  • build-essential
  • subversion
  • libssl-dev
User Notes

Feisty Fawn (7.04)

  • Required packages needed to complete compilation
  • build-essential
  • subversion
  • libssl-dev
User Notes

Gutsy Gibbon (7.10)

  • Required packages needed to complete compilation
  • build-essential
  • subversion
  • libssl-dev
User Notes

Hardy Heron (8.04)

  • Required packages needed to complete compilation
  • build-essential
  • subversion
  • libssl-dev
User Notes
  • 'Open source Atheros drivers "ath5k and ath9k" must be blacklisted for madwifi-ng to work. The following must be done as ROOT only'

echo "" >> /etc/modprobe.d/blacklist echo "#Remove To Install MadWIFI Drivers" >> /etc/modprobe.d/blacklist echo "blacklist ath9k" >> /etc/modprobe.d/blacklist echo "blacklist ath5k" >> /etc/modprobe.d/blacklist

Intrepid Ibex (8.10)

  • Required packages needed to complete compilation
  • build-essential
  • subversion
  • libssl-dev
User Notes
  • 'Open source Atheros drivers "ath5k and ath9k" must be blacklisted for madwifi-ng to work. The following must be done as ROOT only'

echo "" >> /etc/modprobe.d/blacklist echo "#Remove To Install MadWIFI Drivers" >> /etc/modprobe.d/blacklist echo "blacklist ath9k" >> /etc/modprobe.d/blacklist echo "blacklist ath5k" >> /etc/modprobe.d/blacklist

Jaunty Jackalope (9.04)

  • Required packages needed to complete compilation
  • build-essential
  • subversion
  • libssl-dev
User Notes
  • 'Open source Atheros drivers "ath5k and ath9k" must be blacklisted for madwifi-ng to work. The following must be done as ROOT only'

echo "" >> /etc/modprobe.d/blacklist echo "#Remove To Install MadWIFI Drivers" >> /etc/modprobe.d/blacklist echo "blacklist ath9k" >> /etc/modprobe.d/blacklist echo "blacklist ath5k" >> /etc/modprobe.d/blacklist