--- On Sat, 30/1/10, Dani Gutiérrez <jdani...@gmail.com> wrote:
> isn't that much of a hack - the ifconfig is fairly
> standard for manually starting a network interface - if you
> go manual, you have to do ifconfig/iwconfig/iwlist all the
> ifconfig is a very usual command. But in this thread
> I've learned that is ifconfig who, in some usb cards,
> loads the firmware needed.
You have got the cause and effect and reasons the wrong way round.
That's just a detail in the design of the driver. Given that that the hardware
needs some extra static data to function (whatever that is - it could be actual
executable code for the little processor or just data table to enforce local
wireless transmission regulations based on what the AP says which country it is
in), one has the choice of loading it at module load time or just before that
static data is needed - before the device is operational. The latter is usually
preferred, because kernel memory is never paged-out and so it takes up real
memory (never go into swap) and one wants to delay that as far as possible.
So for most in-kernel drivers (not necessarily usb, nor wireless) that needs
"firmware" (just a name for a non-changing data struture), the alternatives are
to load them at kernel module-loading time (when modprobe'd/insmod'ed) or at
"first-use" time (for network drivers, when ifconfig up); for things like
removable storage, etc, you can have the choice of unloading the firemware when
the external usb drive is unplugged, for example.
It is not ifconfig causing firmware to be loaded - it is just that if firmware
is required for a particular driver, you have to to load it some time between
when the kernel module is loaded/initialised and when the data is actually
needed; it is preferred to design your driver code to delay that as much as
possible, because extra data structure uses kernel memory. So you do it *as
late as possible*, and that's when 'ifconfig up' is executed.
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
Zd1211-devs mailing list - http://zd1211.wiki.sourceforge.net/