Using Atheros-based Wifi Card in openSUSE 10.3

After upgrading my system to openSUSE 10.3, my wifi card (atheros-based) is no longer able to work. The kernel doesn’t recognize it anymore. In my previous openSUSE 10.1, it works flawlessly run out of the box. [Updated : I just found out that in openSUSE 10.1, I have done the same thing.]

Having been thinkering a while and asking a friend, I ask Uncle Google and I found out that the default openSUSE 10.3 kernel comes without Atheros driver (madwifi) for the kernel. Here is the explanation (from http://en.opensuse.org/Atheros_madwifi) :

“In SUSE Linux the madwifi driver for Atheros wireless cards is not included in
the distribution as its HAL module is only available as binary.”

I downloaded the madwifi kernel package from http://madwifi.org/suse/10.3, but unfortunately my kernel is different with the kernel used by madwifi package. I have to do it the hard-way by compiling the madwifi from source.

Get the latest madwifi driver from http://www.madwifi.org, after that extract the package. At the time of this blog writing, the latest version is 0.9.3.3 :

$ tar xvjpf madwifi-0.9.3.3.tar.bz2
$ cd madwifi-0.9.3.3/

Build the kernel module :

$ make
Checking requirements… ok.
Checking kernel configuration… ok.
make -C /lib/modules/2.6.22.5-31-default/build SUBDIRS=/home/tedi/madwifi-0.9.3.3 modules
make[1]: Entering directory `/usr/src/linux-2.6.22.5-31-obj/i386/default’
make -C ../../../linux-2.6.22.5-31 O=../linux-2.6.22.5-31-obj/i386/default modules
CC [M] /home/tedi/madwifi-0.9.3.3/ath/if_ath.o
CC [M] /home/tedi/madwifi-0.9.3.3/ath/if_ath_pci.o
LD [M] /home/tedi/madwifi-0.9.3.3/ath/ath_pci.o
CC [M] /home/tedi/madwifi-0.9.3.3/ath_hal/ah_os.o
HOSTCC /home/tedi/madwifi-0.9.3.3/ath_hal/uudecode
UUDECODE /home/tedi/madwifi-0.9.3.3/ath_hal/i386-elf.hal.o
LD [M] /home/tedi/madwifi-0.9.3.3/ath_hal/ath_hal.o

make[1]: Leaving directory `/usr/src/linux-2.6.22.5-31-obj/i386/default’
make -C ./tools all || exit 1
make[1]: Entering directory `/home/tedi/madwifi-0.9.3.3/tools’
gcc -o athstats -g -O2 -Wall -I. -I../hal -I.. -I../ath athstats.c
gcc -o 80211stats -g -O2 -Wall -I. -I../hal -I.. 80211stats.c
gcc -o athkey -g -O2 -Wall -I. -I../hal -I.. athkey.c
gcc -o athchans -g -O2 -Wall -I. -I../hal -I.. athchans.c
gcc -o athctrl -g -O2 -Wall -I. -I../hal -I.. athctrl.c
gcc -o athdebug -g -O2 -Wall -I. -I../hal -I.. athdebug.c
gcc -o 80211debug -g -O2 -Wall -I. -I../hal -I.. 80211debug.c
gcc -o wlanconfig -g -O2 -Wall -I. -I../hal -I.. wlanconfig.c
make[1]: Leaving directory `/home/tedi/madwifi-0.9.3.3/tools’

If there is no error, install the kernel module :

# make install
sh scripts/find-madwifi-modules.sh 2.6.22.5-31-default
for i in ./ath ./ath_hal ./ath_rate ./net80211; do \
make -C $i install || exit 1; \
done

install -d /usr/local/man/man8
install -m 0644 man/*.8 /usr/local/man/man8
make[1]: Leaving directory `/home/tedi/madwifi-0.9.3.3/tools’

After that, I check whether the modules have been installed to my system. Your location may be different, please check your kernel version first :

# ll /lib/modules/2.6.22.5-31-default/net/
total 700
-rwxr-xr-x 1 root root 212762 2007-11-04 17:04 ath_hal.ko
-rwxr-xr-x 1 root root 107768 2007-11-04 17:04 ath_pci.ko
-rwxr-xr-x 1 root root 13571 2007-11-04 17:04 ath_rate_amrr.ko
-rwxr-xr-x 1 root root 12838 2007-11-04 17:04 ath_rate_onoe.ko
-rwxr-xr-x 1 root root 18773 2007-11-04 17:04 ath_rate_sample.ko
-rwxr-xr-x 1 root root 10360 2007-11-04 17:04 wlan_acl.ko
-rwxr-xr-x 1 root root 13927 2007-11-04 17:04 wlan_ccmp.ko
-rwxr-xr-x 1 root root 219237 2007-11-04 17:04 wlan.ko
-rwxr-xr-x 1 root root 11608 2007-11-04 17:04 wlan_scan_ap.ko
-rwxr-xr-x 1 root root 19503 2007-11-04 17:04 wlan_scan_sta.ko
-rwxr-xr-x 1 root root 18314 2007-11-04 17:04 wlan_tkip.ko
-rwxr-xr-x 1 root root 12615 2007-11-04 17:04 wlan_wep.ko
-rwxr-xr-x 1 root root 7141 2007-11-04 17:04 wlan_xauth.ko

Then I load the atheros module by issuing the following command :

# modprobe ath_pci

If the module loaded successfully, you will see the following output from dmesg :

ath_hal: 0.9.18.0 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
wlan: 0.8.4.2 (0.9.3.3)
ath_pci: 0.9.4.5 (0.9.3.3)
PCI: Enabling device 0000:05:00.0 (0000 -> 0002)
ACPI: PCI Interrupt 0000:05:00.0[A] -> Link [C0C4] -> GSI 10 (level, low) -> IRQ 10
ath_rate_sample: 1.2 (0.9.3.3)
wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: turboG rates: 6Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: H/W encryption support: WEP AES AES_CCM TKIP
wifi0: mac 7.9 phy 4.5 radio 5.6
wifi0: Use hw queue 1 for WME_AC_BE traffic
wifi0: Use hw queue 0 for WME_AC_BK traffic
wifi0: Use hw queue 2 for WME_AC_VI traffic
wifi0: Use hw queue 3 for WME_AC_VO traffic
wifi0: Use hw queue 8 for CAB traffic
wifi0: Use hw queue 9 for beacons
wifi0: Atheros 5212: mem=0x44000000, irq=10

Then you can use YaST2 to configure your wireless card

One thought on “Using Atheros-based Wifi Card in openSUSE 10.3

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s