LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (http://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Madwifi doesn't like to work, problem might start at emerge. (http://www.linuxquestions.org/questions/linux-wireless-networking-41/madwifi-doesnt-like-to-work-problem-might-start-at-emerge-679865/)

Masumi 10-29-2008 05:59 PM

[SOLVED]Madwifi does not work with gentoo kernel 2.6.25-r8
 
hey guys/girls

I have a problem, probly small, maybe be known and that i've overlooked.
However I've been googling about it since last saturday and give up hope.

I have a Atheros Wifi card on my laptop and I'm using gentoo 2.6.25 kernel.
For the Atheros card it is best to use madwifi-ng, even if there is a kernel support for the device.

I've been emerging and adjusting, unmerge, emerge adjust, unmerge all a whole long time just to try every bit but still fails.

Once I emerge i get redicilious amount of warnings like;
WARNING: "ath_hal_getwirelessmodes" [/var/tmp/portage/net-wireless/madwifi-ng-0.9.4/work/madwifi-0.9.4/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_find_txnode" [/var/tmp/portage/net-wireless/madwifi-ng-0.9.4/work/madwifi-0.9.4/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_getrssi" [/var/tmp/portage/net-wireless/madwifi-ng-0.9.4/work/madwifi-0.9.4/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_chan2mode" [/var/tmp/portage/net-wireless/madwifi-ng-0.9.4/work/madwifi-0.9.4/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_crypto_encap" [/var/tmp/portage/net-wireless/madwifi-ng-0.9.4/work/madwifi-0.9.4/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_dturbo_switch" [/var/tmp/portage/net-wireless/madwifi-ng-0.9.4/work/madwifi-0.9.4/ath/ath_pci.ko] undefined!
WARNING: "ath_hal_init_channels" [/var/tmp/portage/net-wireless/madwifi-ng-0.9.4/work/madwifi-0.9.4/ath/ath_pci.ko] undefined!
WARNING: "ieee80211_state_name" [/var/tmp/portage/net-wireless/madwifi-ng-0.9.4/work/madwifi-0.9.4/ath/ath_pci.ko] undefined!

Even that emerge wont exit with an error, but will just say ok it's installed

after Modprobe I get:

Cursed ~ # modprobe ath_pci
WARNING: Error inserting wlan (/lib/modules/2.6.25-gentoo-r8/net/wlan.ko): Unknown symbol in module, or unknown parameter (see dmesg)
FATAL: Error inserting ath_pci (/lib/modules/2.6.25-gentoo-r8/net/ath_pci.ko): Unknown symbol in module, or unknown parameter (see dmesg)
Cursed ~ # dmesg

(cutted up to the first error message about this)
wlan: Unknown symbol request_module
wlan: Unknown symbol wireless_send_event
ath_pci: Unknown symbol ieee80211_check_mic
ath_pci: Unknown symbol ieee80211_encap
ath_pci: Unknown symbol ieee80211_input


and goes on.
Most common it would be with ... disagrees with version or version mismatch.
Mostly this is due to a wrong option in the kernel.
However, this option is not enabled in my kernel.

I've been on madwifi's irc but I think most of the people are sleeping. because hardly anyone replied, there was one person who replyed but he said it has to do with wrong versions between ath_pci and ath_hal.
However, there has been only 1 version at all the time, which is 0.9.4 of madwifi.

lateron I've tried the SVN version, as advice from madwifi, also with that one I get the same problem, not with the compiling but only when modprobe.
All the details are located at:
http://pastebin.com/m612f4c4b

and my kernel config is:
http://pastebin.com/m64dccf95

some other, might be, useful information:

Cursed ~ # uname -a
Linux Cursed 2.6.25-gentoo-r8 #1 SMP Sat Oct 25 19:59:09 CEST 2008 i686 Intel(R) Pentium(R) Dual CPU T2370 @ 1.73GHz GenuineIntel GNU/Linux

Cursed ~ # lspci | grep Ethernet
02:00.0 Ethernet controller: Marvell Technology Group Ltd. Device 4353 (rev 15)
06:00.0 Ethernet controller: Atheros Communications, Inc. AR5006EG 802.11 b/g Wireless PCI Express Adapter (rev 01)

Cursed ~ # emerge --info
Portage 2.1.4.5 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r8 i686)
=================================================================
System uname: 2.6.25-gentoo-r8 i686 Intel(R) Pentium(R) Dual CPU T2370 @ 1.73GHz
Timestamp of tree: Tue, 28 Oct 2008 21:35:01 +0000
app-shells/bash: 3.2_p33
dev-lang/python: 2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox: 1.2.18.1-r2
sys-devel/autoconf: 2.13, 2.61-r2
sys-devel/automake: 1.7.9-r1, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils: 2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool: 1.5.26
virtual/os-headers: 2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i486-pc-linux-gnu"
CFLAGS="-O2 -mtune=i686 -pipe"
CHOST="i486-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -mtune=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl alsa berkdb bzip2 cli cracklib crypt cups dri fortran gdbm gpm gtk iconv ipv6 isdnlog madwifi midi mp3 mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl ssl sysfs tcpd unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


Note on pastebin: any edits that will be made are not from me, just incase someone makes a correction.

Hope you can help me out with this stressy problem.

Thanks

Bluesplayer89 10-30-2008 03:53 PM

I'm experiencing the exact same thing, been busy for 3 days trying to fix it and it still does not work. Also with kernel-2.6.25-r8, everything worked fine with kernel 2.6.25-r7.

I've read that this has something to do with not using the right kernel settings. I do not understand, since I think I really set the right kernel settings. I've recompiled my kernel for like 30 times and all settings should be good, I suppose. Reason I'm not for sure is since the gentoo wiki site is down:( Can you imagine!

I'm not using the version that's in the portage tree, but I used a patched one for the Atheros AR5007EG that's in my laptop.

I'm trying later this evening again to get it to work again.
First think I'll do is mask the 2.6.25-r8 since my 2.6.25-r7 kernel and reemerge the 2.6.25-r7 kernel. Maybe they've changed something that messed things up.

Quakeboy02 10-30-2008 04:06 PM

From your kernel config on pastebin:
[code]
#
# Wireless
#
# CONFIG_CFG80211 is not set
CONFIG_WIRELESS_EXT=y
# CONFIG_MAC80211 is not set
# CONFIG_IEEE80211 is not set

You'll need a different kernel.

Bluesplayer89 10-30-2008 04:52 PM

Those settings are set in my kernel. And the problem appears to be the ieee80211 module.

when I do "modprobe ieee80211"
FATAL: Error inserting ieee80211 /lib/modules/2.6.25-gentoo-r8/kernel/net/ieee80211/ieee80211.ko: Unknown symbol in module, or unknown parameter (see dmesg)

dmesg shows:
ieee80211_crypt: registered algorithm 'NULL'
iee80211: Unknown symbol request_module

Higher up in dmesg, when the system was booting it shows this:
wlan: Unknown symbol request_module

and then:

ath_pci: Unknown symbol ieee80211_check_mic
ath_pci: Unknown symbol ieee80211_encap
...
...
...
and so on..

I built the madwifi driver, in my opinion had all the kernel settings right. the madwifi driver was supposed to install the wlan_module.

Masumi 10-30-2008 05:05 PM

@Quakeboy02: As far as I searched, there was no bugs with madwifi and using the 2.6.25-r7 kernel.
And most annoying thing is, the newer kernels are masked thru emerge. I'll have a try with a kernel from kernel.org.

@ Bluesplayer89 and also to the others:

A weird point

from requirements on madwifi.org

Quote:

Wireless Extensions support in kernel
* v14+ required, v17+ recommended; option CONFIG_NET_RADIO (kernel 2.6.22 and later: CONFIG_WLAN_80211)
you need CONfIG_WLAN_80211 enabled..
(checked here because I tought it wasn't in my config last check but it is, and enabled too.)


but if you look at the userdocuments kernelconfig, on madwifi, it only say this:

Quote:

* Loadable module support -> Module versioning support: disabled
* Device Drivers -> Network device support -> Wireless LAN (non-hamradio) -> Wireless LAN drivers (non-hamradio) & Wireless Extensions: enabled (before 2.6.22)

* Networking -> Wireless -> Wireless extensions: enabled (2.6.22 and later)
* Cryptographic options -> Cryptographic API: enabled
* Cryptographic options -> Cryptographic API -> HMAC support: enabled
* Cryptographic options -> Cryptographic API -> AES cipher algorithm: enabled (optional, needed for WPA/WPA2 with CCMP)
but in here nothing is said about that option "CONFIG_WLAN_80211".
(can anyone clear me up on this?)

also, for you Bluesplayer89, the newer version (0.9.4) should not have ieee80211 enabled since it comes within madwifi (it's sort of pointless to have it enabled.)

Quote:

Note: beginning with kernel 2.6.22 two "Generic IEEE 802.11 Networking Stack" options are available. Neither of them is needed for MadWifi.
Oye,
Quote:

First think I'll do is mask the 2.6.25-r8 since my 2.6.25-r7 kernel and reemerge the 2.6.25-r7 kernel. Maybe they've changed something that messed things up.
Code:

emerge -C gentoo-sources
emerge --oneshot =sys-kernel/gentoo-sources-2.6.25-r7

no need for masking it :)

with Kind regards,
Masumi


update @ 23:41 (dutch time hehe); was thinking about the --oneshot option, which will not record the package to the world list, at one side it would be better at other side aswell as not (which is that it wont be updated at world update)

compiling kernel 2.6.25-r7
wish me goodluck

Bluesplayer89 10-30-2008 05:40 PM

I do remember that I had set that in the past.
I'd forgotten about these options, thnx a lot Masumi!:

* Networking -> Wireless -> Wireless extensions: enabled (2.6.22 and later)
* Cryptographic options -> Cryptographic API: enabled
* Cryptographic options -> Cryptographic API -> HMAC support: enabled
* Cryptographic options -> Cryptographic API -> AES cipher algorithm: enabled (optional, needed for WPA/WPA2 with CCMP)


however it still gives the ath_pci: unknown symbol errors when loading.
I recompiled kernel with those settings and copied the boot image to /boot.

Maybe it's trying to make use of the ieee80211 thing that I've enabled in the kernel. Maybe worth a try disabling those options. But before it worked with them enabled, but that was kernel 2.6.25-r7

I had followed this guide for installing the drivers
http://www.aircrack-ng.org/doku.php?id=madwifi-ng

Quakeboy02 10-30-2008 05:43 PM

My mistake, then. Sorry about that. Here is a list of the current (0.9.4) requirements, but it just may depend on which version of madwifi you have.

From: http://madwifi.org/wiki/Requirements
Code:

Kernel
    * Linux Kernel 2.4.23+ and 2.6.x series
          o Others may work, but are unsupported; also, beware if using the very latest release candidate (RC#) kernel as it may not yet be supported
    * Kernel Source and Headers of running kernel
    * No module versioning support
          o option CONFIG_MODVERSIONS
    * Wireless Extensions support in kernel
          o v14+ required, v17+ recommended; option CONFIG_NET_RADIO (kernel 2.6.22 and later: CONFIG_WLAN_80211)
    * Sysctl support in kernel
          o option CONFIG_SYSCTL
    * Crypto API support in kernel
          o option CONFIG_CRYPTO
    * HMAC support
          o option CONFIG_CRYPTO_HMAC
    * AES support (for WPA networks)
          o option CONFIG_CRYPTO_AES

Madwifi has gone through a number of changes lately: to keep up with changing kernel interfaces, to eliminate the need for HAL, and to develop ATH5K and ATH9K. I've been able to migrate to ATH5K.

Bluesplayer89 10-30-2008 06:03 PM

@QakeboyThe ATH5k version is for the Atheros AR5007EG nog a good driver.
It does work, but range is completely limited, which makes it useless.
(at least for my situaton).

I have all those options enabled in the kernel, don't know really what more to do except for going back to 2.6.25-r7, because that once worked.

Masumi 10-30-2008 06:06 PM

Quote:

Originally Posted by Quakeboy02 (Post 3326616)
My mistake, then. Sorry about that. Here is a list of the current (0.9.4) requirements, but it just
may depend on which version of madwifi you have.

It can happen Quakeboy02, after all we're human, not computers.

I'm trying with downgrading back to the older kernel version, hoping it works, if it does, then there is indeed something with the kernel.

It's currently running but not completely right 2 compiles later.. hmm, a chance I noticed, it builds kernel fully, instead of with 2.26.5-r8, that one builded up very fast, shouldn't complain yet! first let's see and try.


update: 0:30 dutch time -.
Kernel downgrade going to take abit more time.
Just noticed it keeps using /lib/modules/2.6.25-r8 which is the "older" kernel.
I have to figure out how to set it back to /lib/modules/2.6.25-r7.
It will take abit more time, since I never downgraded :) sorry for keeping you all waiting.

Bluesplayer89 10-30-2008 06:41 PM

update: 0:30 dutch time -.
You dutch?! I am
I'd do:

emerge -C gentoo-sources
emerge --oneshot =sys-kernel/gentoo-sources-2.6.25-r7
cd /usr/src/linux
make menuconfig (set right settings!)
make && make modules_install
cp /arch/i386/boot/bzImage /boot/kernel-2.6.25-gentoo-r7

and maybe then:
module-rebuild populate
module-rebuild rebuild

maybe also ?
revdep-rebuild

You do need to modify /boot/grub.conf and change
kernel-2.6.25-gentoo-r8 to ~-r7

But anyway, you might now this already.

Masumi 10-30-2008 07:00 PM

Quote:

Originally Posted by Bluesplayer89 (Post 3326676)
update: 0:30 dutch time -.
You dutch?! I am
I'd do:

emerge -C gentoo-sources
emerge --oneshot =sys-kernel/gentoo-sources-2.6.25-r7
cd /usr/src/linux
make menuconfig (set right settings!)
make && make modules_install
cp /arch/i386/boot/bzImage /boot/kernel-2.6.25-gentoo-r7

and maybe then:
module-rebuild populate
module-rebuild rebuild

maybe also ?
revdep-rebuild

You do need to modify /boot/grub.conf and change
kernel-2.6.25-gentoo-r8 to ~-r7

But anyway, you might now this already.

Yes, you too? that's cool!
I do not have to change my grub :)
added 2 options one as oldkernel and one with currentkernel
every compile i just backup the last using to /boot/oldkernel and then i copy bzImage to /boot/kernel

now u where talking about rebuilding, need to do that, forgot about it. Thanks.

well going to bed after this, getting late, and I have to work tomorrow.

So we'll see tomorrow.

Masumi 10-31-2008 04:09 AM

Sorry for the double post but it's the next day :)

been trying this morning before I went to work, too bad I had to figure out that uname -a still refers to 2.6.25-gentoo-r8.

That means it still tries to get the modules running from /lib/modules/2.6.25-gentoo-r8/

So I have to figure out how to change this.
I never had this problem before aswell so it will only take longer.
However feel free to post where I have to search then it will be faster to fix it.
Sadly I can't try right now because I kept my laptop at home.

Also I have a feeling it will not work, but it is worth a try.

Bluesplayer89 10-31-2008 06:47 AM

Hi Masumi,

I got it fixed with kernel 2.6.25-r7, it seems that there is a bug in the 2.6.25-r8 kernel, which makes the madwifi not work.

A thing I had to do, was:
cd /usr/src/
ls -ls
then you'll see that there is a link linux-> kernel-2.6.25-gentoo-r8
remove de link or do a mv to a different filename.
then:
ln -symbolic -T kernel-2.6.25-gentoo-r7 linux

send me a pm with your msn if you like, then we can help each other out with problems.

regards,
Leander

Masumi 10-31-2008 07:11 AM

Yes, I already noticed about /usr/src/linux symbolic link, that one is removed.
I've been reading up after that post and most common is that the "old" kernel still gets booted.

I might wipe out all the current kernels when I get home and retry.

This is what I've currently done:
Code:

emerge -C gentoo-sources
emerge --oneshot =sys-kernel/gentoo-sources-2.6.25-r7
cd /usr/src
rm linux
ln -sfn linux-2.6.25-gentoo-r7 linux
cd linux
make && make modules_install
module_rebuild populate
module_rebuild rebuild
revdep-rebuild
cp /boot/kernel /boot/oldkernel
cp arch/x86/boot/bzImage /boot/kernel

In this order.

I'll try to chroot into my fs with my install cd and retry to compile from there.

Install CD used, chrooted, Downgrade successful
rebooted into the new old kernel, emerged madwifi again and modprobe ath_pci
no errors!
uhm well it is clear it has something to do with the 2.6.25-r8 kernel why the ath_pci is failing.

Even if I get no errors, I also do not have an ath0: device.
So still no Wlan connection, but the modules are loaded, as listed with lsmod.

If you ever get this problem, it might be a good thing, to think about a downgrade.
However old problem solved, new problem comes, I'll keep you up to dated with this new error.
Just incase for people out there who has the same problem. (aswell before the downgrade as the new problem after downgrade.)

I've searched abit arround trying to fix this problem but without any results to working.

madwifi emerge works like a charm
modules gets loaded as it should, also lsmod confirms it runs

but no ath0 no wifi0 nothing, compiled from sources aswell same state.
there was something about the RFswitch but with backtrack it runs with madwifi.
What am I missing? anyone can give me a hint where to look at? anything is welcome.

Masumi 11-01-2008 05:36 AM

Ok everything got solved :)

I had to upgrade the madwifi-hal from their website and now it is running like a charm.
However it still will knockback to errors on 2.6.25-r8 so I'll keep it on ~r7.

Thanks for your help, Bluesplayer89


All times are GMT -5. The time now is 05:25 PM.