LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-26-2009, 09:32 PM   #1
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,027

Rep: Reputation: 69
What determines what value my wireless interface gets...


I've always had my wireless interface be ath0. Works great and all. Then I bought another wireless interface to fit in the pc express slot on my toshiba laptop. Ever since I booted up with that pc express wireless interface, my old ath0 has now become ath4 and the pc express wireless interface is ath2. How do I change my original wireless interface back to ath0 from ath4? What config file deals with that?
 
Old 03-27-2009, 02:24 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
The device node is determined (partly) by the driver.
What's wrong with ath4 and 2? Your post seems to be saying that something stopped working.
 
Old 03-27-2009, 10:34 AM   #3
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,027

Original Poster
Rep: Reputation: 69
Nothing wrong with it, I just want to understand why it went from ath0 to ath4? Is it possible to change it back to ath0? I just like typing ath0 instead of ath4, flows better hehe.
 
Old 03-27-2009, 10:55 AM   #4
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
udev rules most likely..

Code:
it-lenny:/etc/udev/rules.d$ cat 70-persistent-net.rules 

# This file was automatically generated by the /lib/udev/write_net_rules
# program, probably run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
# MAC addresses must be written in lowercase.

# PCI device 0x14e4:0x170c (b44)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:1a:a0:08:67:08", NAME="eth0"
http://wiki.debian.org/udev

http://reactivated.net/writing_udev_rules.html

Last edited by farslayer; 03-27-2009 at 10:56 AM.
 
Old 03-27-2009, 08:50 PM   #5
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
The udev rules change with the card and the drivers.
I'm guessing your original card was onboard? As the only aetheros wireless nic, it got ath0 - when you added the pcie card, you had two and the setup had to reconfigure.

Hand-wavey explanation follows:

You'd expect a new one to arrive at ath1.

But the situation can be more complicated than that. If adding a pcie interface card changed the way the bios represented the onboard unit to the kernel (changing where it is on the bus for eg) then the kernel, and udev, will register two new cards instead of one.

ath0 is already taken.

BIOS usually puts pci(e) cards ahead of the on board cards on the reasonable assumption that if you have a duplicate, you want the new one to replace the old one.

ath1 would be the next place - but we see it didn't - perhaps the driver prefers odd-number interfaces (maybe the odd-numbers share an interrupt that the driver uses? We used to get this with COM ports.)

Anyway, this would put the available devices as 0, 2, 4 etc. 0 is taken. The next ones are 2 and 4, which you got.

When you install the driver (+ card) the system writes udev rules to cover the configuration. Usually following the persistent-net-generator.rules as mentioned. But not always.


This is guesswork though - without knowing the bios and the driver in more detail I cannot tell what is really going on. But it's often something like what I've said above - and it should give you an idea how complex the OS has become.

It is probably OK to change one interface back to 0 by editing the udev file - though it will be interesting to see the effects. But if you just want to use the new card, it may work better to disable the old one in bios.

If you really want to know the details, you'll want to ask on the driver mailing list.

Last edited by Simon Bridge; 03-27-2009 at 08:51 PM.
 
Old 04-09-2009, 08:02 PM   #6
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,027

Original Poster
Rep: Reputation: 69
Indeed. Thanks a lot guys. I simply edited

/etc/udev/rules.d/70-permanent-net.rules and revised it so that the mac address of my old wifi card is back to ath0. I put the new pci express wifi card as ath1. It's great.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
what determines the amount of time to fork? abolishtheun Programming 6 01-30-2009 10:25 PM
Program that determines which files/directories are taking up the most space kaplan71 Linux - Software 1 02-09-2006 08:21 AM
how win determines free disk space PlatinumRik Linux - Software 1 11-08-2005 04:31 AM
Time determines home page jrdioko Linux - Software 8 09-08-2005 10:26 AM
what determines your website title? dr_zayus69 LQ Suggestions & Feedback 5 07-16-2005 10:49 AM


All times are GMT -5. The time now is 04:28 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration