[PLUG] Of Modules and Men

Terry Griffin griffint at pobox.com
Sat Apr 17 11:07:02 UTC 2004


On Saturday 17 April 2004 10:41 am, Rich Shepard wrote:
>   I'm curious about this: in /etc/modules.conf there is an alias:
> 	alias wlan0 prism2_cs.o
> but lsmod shows the driver as Prism54 and ifconfig -a (or iwconfig) shows
> the interface as eth1. Why the discrepancies?
>
>   On a similar note, now that I resolved the problem(s) making and
> installing hostap_cs.o, is there a relatively simple way to swap between
> the two interfaces? Might there be advantages in doing so?
>

By default the module name (shown by lsmod) is the same as the the module's
file name (without the .o) but the device driver may override the default
during its initialization and specify some other name.

Likewise, network device drivers get to decide during their initialization
what the base interface name should be. I have this vague recollection of a
feature for forcing a particular interface name on a device driver, but
I can't recall how or even if the feature really exists. Obviously the setting
in /etc/modules.conf isn't it.

What the driver absolutely can't do is choose the interface number. The
kernel does that. So if eth0 already exists and the new driver wants to
be eth-something, then it will get eth1.

Terry





More information about the PLUG mailing list