Atheros madwifi

From openSUSE

In openSUSE, the MadWiFi driver for Atheros wireless cards are not included in the distribution as its HAL module is only available as proprietary. However, it is still possible to use this driver.

Pre--Installation--

First, discover what cards or wireless devices are supported. I recommend this very informative page: http://linux-wless.passys.nl/query_alles.php


Contents

Installation

You can use any (but only one) of the following installation methods, depending on your preferences. First , establish a wired connection ! get a cable plug in to a router /DSL or Cable modem some where and get connected.

Using YaST (All versions)

MadWifi requires two packages to be installed. The first one can be obtained with 1-Click-Install:

For 11.1 the madwifi package must also be fetched directly from the MadWifi project, see below.

The second package to install is a set of kernel modules (drivers), available directly from the MadWifi project. They can be installed from their repository by adding it as an installation source in YaST:

  • Open the YaST Control Center
  • Select Software Repositories
  • Click Add and select Specify URL...
  • Enter one of the following into the URL field, depending on your version:
Image:susemini.png
Version:
11.1
http://madwifi-project.org/suse/11.1
Image:susemini.png
Version:
11.0
http://madwifi-project.org/suse/11.0
Image:susemini.png
Version:
10.3
http://madwifi-project.org/suse/10.3
  • Click OK. YaST will now download the package information.
  • When it's done, click on Finish.

To actually install the kernel modules package:

  • Select Software Management in the YaST Control Center
  • Search for madwifi, and you should see a list of packages appear. It is a large list. (xen, PAE, debug, etc. pick the default)
  • Install (or update, if necessary) madwifi and madwifi-kmp-<your kernel Version Number>.
  • Click on Accept and wait for the packages to be downloaded and installed. ( if you see dependency fails [on v10.3 you will] then click solve during the update, and accept)

Suse 11 shows by default the first module and the pae modules green checked. Accept these and it will load error free.

To find out which one of the madwifi-kmp-* packages you need, you can open up a terminal and type in
uname -r
You should now see something like: 2.6.16.21-0.13-<kernel version#>


Finally, open up a terminal window, and just run:

Loads the module: modprobe ath_pci

Lets you see the module: modprobe -l | grep ath


and the card should have been detected. Click on the NetworkManager icon in the system tray and configure your wireless network or Kinternet icon for Suse 11 .Assuming that you are running DHCP this should be all you have to do! Some versions of Suse will not have the icon in tray. so do a search "knetworkmanager" and then open and run this utility and configure your wifi device. (eg:v10.3)"Please try both KNetwork_Manager and Kinternet" Do not forget to disconnect the wired connection (disable) established above or you will have a conflict with DHCP and common network masks. Under Kinternet, right click + settings+various, and roll the eth0 to ath0.

When configuring the madwifi module be sure to enable kinternet. do this in yast..networksetting general tab. Under Suse 11 , kinternet works extemely well. Try it!

Note: in the openSUSE 11.0 there may be a conflict with built Atheros module ath5k, which seems is not functional yet, but prevents using madwifi's driver. Resolution is to add this module, to the blacklist. To do this add the line blacklist ath5k to the file /etc/modprobe.d/blacklist and reboot.
Note: when you are using WEP with kinternet (traditional ifup method), set the variable
WIRELESS_AP='off'
in the ifcfg-ath0 file.
Note: for the ath_pci and ath_hal to work for the AR242x, you have to reboot.

Using Zypper (Command line)

  zypper -v ar http://madwifi-project.org/suse/`python -c "import platform;print platform.dist()[1]"` madwifi
  zypper install madwifi madwifi-kmp-`uname -r | awk -F- '{print $3}'`

Open up a terminal window, and just run:

  modprobe ath_pci

and the card should have been detected. Click on the NetworkManager icon in the system tray and configure your wireless network. Assuming that you are running DHCP this should be all you have to do!

Using the Smart Package Manager

  smart channel --add madwifi type=rpm-md \
  baseurl=http://madwifi-project.org/suse/`python -c "import platform;print platform.dist()[1]"`
  smart update madwifi
  smart install madwifi madwifi-kmp-`uname -r | awk -F- '{print $3}'`

Open up a terminal window, and just run:

  modprobe ath_pci

and the card should have been detected. Click on the NetworkManager icon in the system tray and configure your wireless network. Assuming that you are running DHCP ?, this should be all you have to do!

Compiling it yourself using the sources

  1. Make sure you have installed the kernel-source and the C++ compiler. If not, please install them using YaST.
  2. Download the current drivers from this location [1].
  3. Unpack the archive in a temporary folder.
  4. Open up a terminal window.
  5. Switch to the temporary folder, and type in:
    make
  6. Now compile it:
    make install
  7. You can load the kernel modules using:
    modprobe ath_pci

You can also use the ndiswrapper to install your driver if this doesn't work.

Power Management

To ensure that wireless works after suspending to disk or to RAM:

  • Create (or open) a file named config in the /etc/pm/config.d directory
  • Add the following line:
    SUSPEND_MODULES="ath_pci"

If the steps described above don't work, you may try adding the following file to the power management script directory. In openSUSE 10.3 and 11.0, it's in the /etc/pm/sleep.d directory, and in openSUSE 10.2, it's in the /etc/pm/power. You can call it 60madwifi. You'll also need to make it executable. It's run by root, so be careful about adding things to it.

#!/bin/bash
case $1 in
    hibernate|suspend)
        /sbin/rmmod ath_pci ath_rate_sample ath_hal
        ;;
    thaw|resume)
        /sbin/modprobe ath_hal
        /sbin/modprobe ath_rate_sample
        /sbin/modprobe ath_pci
        ;;
    *)  echo "madwifi power management script called incorrectly."
        ;;
esac

WiFi LEDs blinking

Enable WiFi LEDs blinking

Passed QA check: Fsundermeyer 14:31, 16 June 2009 (UTC)