Results 1 to 10 of 14
I have a small problem with my laptop ethernet set up: I have two possible configurations, one with a wireless usb adapter for use at home and one with pcmcia ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-10-2003 #1Just Joined!
- Join Date
- May 2003
- Location
- UK-Heart of Cheshire
- Posts
- 31
Ethernet card set up conflicts
I have a small problem with my laptop ethernet set up: I have two possible configurations, one with a wireless usb adapter for use at home and one with pcmcia card for work. These are configured in two files if-th0, and if-eth1. I also have aliases set up in modules.conf to autoload.
Now the problem. If I set the wireless card as eth0 and the lan card set as eth1. When I load at work the system give errors along the lines of incorrect MAC address and cannot change the name of the eth1 to eth0 etc. I then have to configure the card manually. If I swap the setting round I then get the same problem at home, only worse because it then does not load the module correctly. I know (some of?) the programs that are used ifup and if-wireless, but do not have enough knowledge to re programme these.
What I want to know is there a way of checking which card is loaded and then only configuring that device. I know that ifup use the -f to check for valid files but is there a check on hardware and devices, that couls be used.
As I said this is more of a nuisance than a major problem as I could always configure manually every time.
Did any of that make sense?
- 05-10-2003 #2Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
It makes perfect sense. That's one of the major problems in Linux's networking code, as I see. For almost all NIC driver modules, it's not possible to set the interface's name. It always chooses eth + the first available number. The worst thing is that it's really easy for the driver module to set the interface's name, so I don't really get it why they don't allow it. Only a few modules allow it. If one of your modules supports it (check with modinfo -p), then set that card to be eth1, and all should be solved.
If that isn't possible, I can only make some suggestions. I would create a new network initialization script, that checks with cardctl/lspci/lsusb which NIC is currently being used, and then configure that one properly.
- 05-10-2003 #3Just Joined!
- Join Date
- May 2003
- Location
- UK-Heart of Cheshire
- Posts
- 31
I thought about that ie if tulip is loaded set x file to be the if-eth0 file else if the wirless is present use that else null etc.
Now I have my soundcard working(another story) this could be my next big challenge
Can you give a bit more around the interafce name part and how you would do that. I could do it for the wireless driver since I have the module source code and have to compile it anyway to use it. (not part of the Kernel) Would just need the info of which file to mod and how.
Can you check which devices are load in a bash shell?
- 05-11-2003 #4Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
Well, I can't really help you patch your driver without knowing which one it is. Can you post an URL?
Of course you can check what modules are loaded from the shell. How else would the kernel hackers do it? Either use lsmod, or cat /proc/modules.
- 05-12-2003 #5Just Joined!
- Join Date
- May 2003
- Location
- UK-Heart of Cheshire
- Posts
- 31
The driver is an ATMEL found http://atmelwlandriver.sourceforge.net/ though I cannot access this site at the moment.
Is there any specific file that has the module info stored in or is this just a developers choice?
- 05-12-2003 #6Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
The module info is stored in the module file itself. modinfo is a program which retrieves it. -p is an option to modinfo that makes it display what paramaters the module accepts.
Which version of the driver are you using?
- 05-12-2003 #7Just Joined!
- Join Date
- May 2003
- Location
- UK-Heart of Cheshire
- Posts
- 31
The latest one on that site. I only downloaded it about a month ago. I think (can't check at the mo) it was dated december last year. When I have the version will post
- 05-12-2003 #8Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
Look in src/usb/vnetusba.c in the driver's source code. Search for a line containing init_etherdev. It should look like this:
Change it to this:Code:if (!(Adapter->net = init_etherdev(NULL, 0))) {
If you do that, the interface with that device will be called wlan0 instead of eth?. That way, there will be no name conflicts.Code:if (!(Adapter->net = init_netdev(NULL, 0, "wlan%d", ether_setup))) {
- 05-13-2003 #9Just Joined!
- Join Date
- May 2003
- Location
- UK-Heart of Cheshire
- Posts
- 31
I will try that and let you know how I get on.
Need to learn a bit of c me thinks
- 05-15-2003 #10Just Joined!
- Join Date
- May 2003
- Location
- UK-Heart of Cheshire
- Posts
- 31
Did not work. Gave unresolved symbol errors


Reply With Quote
