LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 10-25-2003, 09:39 PM   #1
isdnip
LQ Newbie
 
Registered: Oct 2003
Posts: 27

Rep: Reputation: 15
Question ADMtek 8211 in Mandrake 9.2?


I've read some of the threads here about the ADMtek 8211 wireless chip, but none address Mandrake 9.2, which just came out last week... I just built a new system with no connectivity except that type of card, and while it works in Windows, the Linux drivers don't seem to work on Mandrake 9.2. (Fortunately, I have a different Mandrake 9.2 system with a working Ethernet-cable modem connection. Both are Athlons.)

The Red Hat 8.0 RPM install, of course, fails because a lot of symbols are wrong. That doesn't surprise me. But trying to run the makefile on 9.2, which I figured would help (once I fetched and installed kernel-sources) gives me a set of errors which somebody else might understand better than I do. I'm not a developer so the errors are a bit over my head. Any ideas? Thanks.

[...ADM8211]$ make all
gcc -D__KERNEL__ -DMODULE -Wall -Wstrict-prototypes -O2 -I/usr/src/linux-2.4/include -fomit-frame-pointer -fno-strict-aliasing -Wno-trigraphs -fno-common -pipe -mpreferred-stack-boundary=2 -march=i386 -c adm8211.c
In file included from /usr/include/linux/prefetch.h:13,
from /usr/include/linux/list.h:6,
from /usr/include/linux/timer.h:4,
from adm8211.c:7:
/usr/include/asm/processor.h:55: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/asm/processor.h:55: error: requested alignment is not a constant
In file included from /usr/include/linux/mm.h:12,
from /usr/include/linux/slab.h:14,
from adm8211.c:10:
/usr/include/linux/mmzone.h:44: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/linux/mmzone.h:44: error: requested alignment is not a constant
In file included from /usr/include/asm/hardirq.h:6,
from /usr/include/linux/interrupt.h:46,
from adm8211.c:11:
/usr/include/linux/irq.h:65: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/linux/irq.h:65: error: requested alignment is not a constant
In file included from /usr/include/linux/interrupt.h:46,
from adm8211.c:11:
/usr/include/asm/hardirq.h:16: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/asm/hardirq.h:16: error: requested alignment is not a constant
In file included from adm8211.c:11:
/usr/include/linux/interrupt.h:129: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/linux/interrupt.h:129: error: requested alignment is not a constant
In file included from adm8211.c:13:
/usr/include/linux/netdevice.h:165: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/linux/netdevice.h:165: error: requested alignment is not a constant
In file included from adm8211.c:13:
/usr/include/linux/netdevice.h:517: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/linux/netdevice.h:517: error: requested alignment is not a constant
In file included from /usr/include/linux/module.h:297,
from adm8211.c:31:
/usr/include/linux/version.h:2:2: #error "======================================================="
/usr/include/linux/version.h:3:2: #error "You should not include /usr/include/{linux,asm}/ header"
/usr/include/linux/version.h:4:2: #error "files directly for the compilation of kernel modules."
/usr/include/linux/version.h:5:2: #error ""
/usr/include/linux/version.h:6:2: #error "glibc now uses kernel header files from a well-defined"
/usr/include/linux/version.h:7:2: #error "working kernel version (as recommended by Linus Torvalds)"
/usr/include/linux/version.h:8:2: #error "These files are glibc internal and may not match the"
/usr/include/linux/version.h:9:2: #error "currently running kernel. They should only be"
/usr/include/linux/version.h:10:2: #error "included via other system header files - user space"
/usr/include/linux/version.h:11:2: #error "programs should not directly include <linux/*.h> or"
/usr/include/linux/version.h:12:2: #error "<asm/*.h> as well."
/usr/include/linux/version.h:13:2: #error ""
/usr/include/linux/version.h:14:2: #error "To build kernel modules please do the following:"
/usr/include/linux/version.h:15:2: #error ""
/usr/include/linux/version.h:16:2: #error " o Have the kernel sources installed"
/usr/include/linux/version.h:17:2: #error ""
/usr/include/linux/version.h:18:2: #error " o Make sure that the symbolic link"
/usr/include/linux/version.h:19:2: #error " /lib/modules/`uname -r`/build exists and points to"
/usr/include/linux/version.h:20:2: #error " the matching kernel source directory"
/usr/include/linux/version.h:21:2: #error ""
/usr/include/linux/version.h:22:2: #error " o Now copy /boot/vmlinuz.version.h to"
/usr/include/linux/version.h:23:2: #error " /lib/modules/`uname -r`/build/include/linux/version.h"
/usr/include/linux/version.h:24:2: #error ""
/usr/include/linux/version.h:25:2: #error " o When compiling, make sure to use the following"
/usr/include/linux/version.h:26:2: #error " compiler option to use the correct include files:"
/usr/include/linux/version.h:27:2: #error ""
/usr/include/linux/version.h:28:2: #error " -I/lib/modules/`uname -r`/build/include"
/usr/include/linux/version.h:29:2: #error ""
/usr/include/linux/version.h:30:2: #error " instead of"
/usr/include/linux/version.h:31:2: #error ""
/usr/include/linux/version.h:32:2: #error " -I/usr/include/linux"
/usr/include/linux/version.h:33:2: #error ""
/usr/include/linux/version.h:34:2: #error " Please adjust the Makefile accordingly."
/usr/include/linux/version.h:35:2: #error "======================================================="
In file included from adm8211.c:31:
/usr/include/linux/module.h:299: error: syntax error before "UTS_RELEASE"
adm8211.c: In function `adm8211_init_one':
adm8211.c:211: warning: implicit declaration of function `pci_request_regions'
adm8211.c: In function `adm8201_remove':
adm8211.c:1080: warning: implicit declaration of function `pci_release_regions'
make: *** [adm8211.o] Error 1
[.. ADM8211]$

*** Now, when I follow the warnings and /* comment out */ all of the includes that are
in the linux and asm header directories, I get even more errors:

dm8201.h:69: error: syntax error before "s32"
adm8201.h:69: warning: no semicolon at end of struct or union
adm8201.h:70: warning: type defaults to `int' in declaration of `length'
adm8201.h:70: warning: data definition has no type or storage class
adm8201.h:71: error: syntax error before "buffer1"
adm8201.h:71: warning: type defaults to `int' in declaration of `buffer1'
adm8201.h:71: warning: type defaults to `int' in declaration of `buffer2'
adm8201.h:71: warning: data definition has no type or storage class
adm8201.h:72: error: syntax error before '}' token
adm8201.h:75: error: syntax error before "s32"
adm8201.h:75: warning: no semicolon at end of struct or union
adm8201.h:76: warning: type defaults to `int' in declaration of `length'
adm8201.h:76: warning: data definition has no type or storage class
adm8201.h:77: error: syntax error before "buffer1"
adm8201.h:77: warning: type defaults to `int' in declaration of `buffer1'
adm8201.h:77: warning: type defaults to `int' in declaration of `buffer2'
adm8201.h:77: warning: data definition has no type or storage class
... etc.

It doesn't matter if I change the -I in the Makefile to include this:
-I/lib/modules/`uname -r`/build/include (in lieu of -I/usr/src/linux-2.4/
include )
 
Old 10-26-2003, 02:13 AM   #2
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
These errors are typical of this source code. It's rather redhat-centric and likes to see the linux source as /usr/src/linux-2.4, which mandrake does not honor. My redhat 9.0 installation however, shows a symlink to the *real* kernel source in /usr/src as linux-2.4. So, create a symlink in /usr/src named "linux-2.4" and point it at the actual kernel source directory.

ps: yes, I saw that you messed with the makefile, the -I option you used was perhaps not the best way to solve this, try to restore the makefile to it's original state (unpacking the tarball again should work) and add the "linux-2.4" symlink instead, it's worked on mandrake, slackware and debian for me that way.

Last edited by akaBeaVis; 10-26-2003 at 02:31 AM.
 
Old 10-26-2003, 11:39 AM   #3
isdnip
LQ Newbie
 
Registered: Oct 2003
Posts: 27

Original Poster
Rep: Reputation: 15
That helps

Thaks for the help!

I made the link and recompiled (having saved the original makefile...). It did compile. I haven't sneakernetted it yet over to the new machine (needs to be via CD; its floppy drive, a recycled old one, doesn't seem to work) to see if it works. However, I do note that the kernel source I downloaded (all 179 MB of it) was for 2.4.22-18, and the running kernel of 9.2 is -10, so it needed insmod -f to load in the "source" machine. (Not a brilliant move of Mandrake to leave the kernel source off the 3-disk download edition!) Which still won't load it because the 8211 is in the "object" machine, but that'll be later.

Linux is just too picky....
 
Old 10-26-2003, 11:53 AM   #4
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
Be aware that when depmod is run with this module installed somewhere in the modutils' path you *will* get unresolved symbols, yet it still works for both a cardbus and a pci card on different distros.
 
Old 10-26-2003, 08:46 PM   #5
isdnip
LQ Newbie
 
Registered: Oct 2003
Posts: 27

Original Poster
Rep: Reputation: 15
Good progress, for sure! But not without glitches, so here are my remaining questions, if you don't mind! Note that they're interrelated.

* I use WEP encryption (64-bit) on the WLAN. So insmod makes the card work and kwifimanager sees it, but kwifimanager's "configure" button doesn't. So I need to manually use iwconfig to set the key. I put iwconfig at the end of rc.local, but it didn't work (see next bullet item).

* insmod -f loads the module, but because of the mismatch in versions somewhere along the line, it won't work without -f, and it won't load at boot time (it shows an error in the bootlog).

* The netscripts shows dhcp, but that's executed during boot, when the card isn't loaded yet (because insmod failed?). So no WEP and no DHCP.

* I could grab a manual address, I suppose. But (this is really dumb) I can't figure out how to tell it -- in a command, not an initialization file that loads at boot, because it doesn't, as noted above -- how to set the DNS server. No DNS, no surf.

So I can manually insmod -f , iwconfig and ping away by ip address, but it's nowhere near usable. I feel like I'm caught in a twisty little maze of passages, all different.

(And then to figure out how to use harddrake to increase the size of the / partition, but that's for another topic!)

Many, many thanks for the help and advice!
 
Old 10-26-2003, 09:09 PM   #6
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
First, I would be interested in seeing all the error messages involved. I don't have to force this module on any machine here although I get the warning about tainting the kernel (various distros/kernels), WEP is not set via dhcp, so it goes in a config file and gets done via scripts normally anyway, we'll get to that.

to grab a dhcp address (and hopefully dns and gateway as well) do this: dhcp eth0, if dhcp is not found try dhclient eth0. Be aware WEP mismatches will block dhcp. Alternately you can configure a manual address:
ifconfig eth0 192.168.1.100 (something valid for your access point's subnet)
route add default gw 192.168.1.1 (access point's ip)
verify the contents of /etc/resolv.conf, should have a line like this at the top:
nameserver 192.168.1.1 (access point's ip)
verify /etc/sysconfig/network, should have at least hostname and gateway set right.

addendum: I should point out that after the above you can immediately try pinging hosts by name, do not reboot, restart network, etc...

Last edited by akaBeaVis; 10-26-2003 at 09:13 PM.
 
Old 10-26-2003, 09:25 PM   #7
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
gotta go change a tire on my daughter's car, be back...

and we're back...

Last edited by akaBeaVis; 10-26-2003 at 10:27 PM.
 
Old 11-01-2003, 12:07 PM   #8
isdnip
LQ Newbie
 
Registered: Oct 2003
Posts: 27

Original Poster
Rep: Reputation: 15
After much difficulty and a few attempts at reinstallation, I am once again trying to get this card running. I built a driver with the right kernel sources, so it no longer needs forcing. But it still doesn't load at boot! I think this is because the driver is "tainted". It also warns about unresolved symbols, as you noted.

If I boot up, manually do

insmod 8211

(or even modprobe it), it works. So obviously the warnings are just that. But then I have to manually do:

iwconfig eth0 enc <hexpassword>
dhcpcd

which is kludgey. So I tried putting those three lines at the end of rc.local. But when I have them there, the boot screen gives the taint warning, and stops (never getting past insmod). It never exits the boot screen. (I have set it to boot to shell, not X, not that it matters.) I have to use the rescue disk to remove the offending lines.

kwifimanager (admittedly compiled for 9.1, not 9.2) runs, and shows the network, but doesn't actually let me set the encryption: It's on the display, but it doesn't actually do the iwconfig when I "apply". Where are these parameters supposed to be stored? Thanks!
 
Old 11-01-2003, 01:12 PM   #9
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
Unless 9.2 has radically changed things from 9.1, the params would be set in /etc/sysconfig/network-scripts/ifcfg-<devicename>, where <devicename> would be eth0, eth1, or perhaps wlan0. The possible vars you can set for wireless in that file are listed near the top of /etc/sysconfig/network-scripts/ifup-wireless
 
Old 11-01-2003, 02:27 PM   #10
isdnip
LQ Newbie
 
Registered: Oct 2003
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks; I'll check that out.

But how do you get the driver module to load at boot, when it has the GNU-religion warning flag?

So far the best idea I've come up with is to put an icon on the desktop that runs a script which does it all, after KDE is up. But that's a kludge; I'd rather have the module load as intended! Thanks....
 
Old 11-01-2003, 02:50 PM   #11
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
I'd be surprised if the taint warning is what is actually stopping the module load at boot it doesn't do that on my machines, dmesg should reveal what the error is, or scanning your /var/log/messages backwards, from the end, just after a boot would also show the error.
 
Old 11-01-2003, 06:54 PM   #12
isdnip
LQ Newbie
 
Registered: Oct 2003
Posts: 27

Original Poster
Rep: Reputation: 15
Oddly enough, the most recent boot (from which I'm posting this) had no error. But it did't load 8211 -- I still had to insmod it. The log shows the sequence that happened when I manually inserted it, but no failures from the boot sequence -- it's like it's not there. Do I have to manually insert it into a list of modules to load? I seem to recall such a thing -- would I need to add it to /etc/modules or /etc/modules.conf ?

I also notes thata /etc/sysconfig/network-scripts/ifcfg-eth0 is set up for Ethernet (well, duh), while the parameters I want are wireless ones, in ifup-wireless, whose parameters aren't the ones in ifcfg-eth0, and the fact that this modules inserts itself as eth0 rather than wireless is, well, confusing! I wonder if that's causing trouble.
 
Old 11-01-2003, 06:59 PM   #13
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
Is this a non-removable device (PCI card) or a removable one (CardBus card)? If it's the former (PCI) then you'll need an "alias eth0 8211" line in /etc/modules.conf, if it's the latter (CardBus) then the hotplug system (if depmod has been run) will load the module for it.

the ifcfg-<devicename> "scripts" in /etc/sysconfig/network-scripts do little more than set environment (bash) vars for other script's consumption, you can/should set the vars outlined in /etc/sysconfig/network-scripts/ifup-wireless in your ifcfg-<devicename> file, the wireless params will be consumed if the iwconfig call returns successful, which it will. In summary, add things like MODE=managed, CHANNEL=1, KEY=xxxx-xxxx-xx to your /etc/sysconfig/network-scripts/ifcfg-<devicename> file, they'll be passed to iwconfig eventually.
 
Old 11-01-2003, 09:39 PM   #14
isdnip
LQ Newbie
 
Registered: Oct 2003
Posts: 27

Original Poster
Rep: Reputation: 15
AHA! It's a non-removable PCI card. But it does seem to invoke hotplug. I can't check the logs right now (that machine's offline while its young owner sleeps!) but I did notice some strange stuff going on in the log when I loaded it. I'll try the alias line in modules.conf next.

Thanks for the tip on iwconfig; I'll set the parameters in ifcfg-eth0, and trust that it reaches iwconfig.

Slight editorial comment: This is the sort of stuff that makes setting up Linux hard. But to be honest, the Windows XP driver isn't much better -- even though it's a PCI card, the card MUST be out of the box during the install or it won't bind. So I had to yank the PCI card, install the driver, and then reinstall the card before Windows could use it. I suppose most wireless cards are cardbus, not PCI, but you'd think the makers would get it straight....
 
Old 11-01-2003, 09:57 PM   #15
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
I'm gonna doubt the hotplug system is getting involved in the setup of a pci-slot card, to see if this is true, do a "grep pci.agent /var/log/messages" and see what turns up (I'm thinking nothing), /sbin/hotplug would call that script if it encountered a pci card. You can also try "grep net.agent /var/log/messages" to see if somehow that hotplug agent got called, again, I doubt it.

I have an admtek pci card in my not-so-young (she's 20) daughter's machine which dual boots win98 and slackware 9.0, it's a trendware card and has been a bit quirky, namely, it needs the iwconfig calls in a specific order or it refuses to connect, so let me know what happens and I'll post the script I'm using to start it.

In response to your "slight editorial", I heartily agree and was incensed at the difficulty involved in linux+wireless, I own 6 different cards that all (eventually) work with various linux distros, yet none were an "out-of-the-box" experience. We can blame linux's market share for the lack of drivers on the cd that comes in the box, when the market share increases, so will the support. Until then, we all help each other...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with admtek drivers 8211 wifi Sarcastro Linux - Hardware 0 05-18-2004 09:55 AM
Mandrake 9.2 / admtek 8211 - ESSID found but cannot ping on ad-hoc network steventux Linux - Wireless Networking 3 03-11-2004 11:07 AM
SMC2602W (ADMTek 8211) problems donniejones18 Linux - Wireless Networking 0 02-08-2004 11:37 AM
3com 3crshpw796 with admtek 8211 chip wernerholt Linux - Wireless Networking 0 12-30-2003 08:15 AM
HELP!! ADMTek 8211 and Red Hat 9.0 Crawfy Linux - Networking 0 08-12-2003 04:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 07:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration