You are not logged in.
the correct hardware address can only be found once the firmware has been loaded during an ifconfig interface up
as you udev starts first this is then kinda tricky - any ideas?
Offline
udev has hardware mask rules. I believe it gets it from somewhere other than ifconfig.
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
which begs the question: where is that?
Offline
I'm sure the firmware is loaded before an ifconfig interface up.
Offline
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
I'm sure the firmware is loaded before an ifconfig interface up.
I'm almost certain it is not because i do not get any lights on the card until the first ifconfig up command - i could be wrong tho!
Offline
Check your dmesg log. Usually it will make a message when it loads the firmware.
Offline
it does - when i run the first ifconfig up command
Offline
it does - when i run the first ifconfig up command
That's...... wierd.
Offline
yup!
Offline
What kind of card is this (more info!) ?
How do you set it up during boot (using rc.conf,...) ?
Can you find any info about it under /sys ?
If this is PCI card you can identify it and write udev rule using pci id for example (man udev). MAC is not the only thing you can use in an udev rule.
Offline
iphitus wrote:I'm sure the firmware is loaded before an ifconfig interface up.
I'm almost certain it is not because i do not get any lights on the card until the first ifconfig up command - i could be wrong tho!
woah... ummm mine lights up when I insmod/rmmod ... is it time to scour ifconfig source code? (doing it now... one sec)
edit
oddly enough ifconfig doesn't do much... it gets a FD for the interface and makes some ioctl calls on it... no firmware loading, use set's an "interface up" flag...
could be the module itself doing it, what's the module? I can check the source for that one...
Offline
Firmware might be loaded by hotplug's firmware.agent.
Offline
Firmware might be loaded by hotplug's firmware.agent.
but I think dibble is saying he can load the module and wait for a whole day and no light, then type "ifconfig blark0 up" and the light comes on (implying firmware load)... if that's correct, then hotplug wouldn't have anything to do with it
Offline
Why not ? If this generates some hotplug event like plugging cam or something... But we need more info about dibble's config.
Offline
Anyway, if we figure out the whole process we could use udev to do it all in a few rules (using RUN maybe?).
Offline
Why not ? If this generates some hotplug event like plugging cam or something... But we need more info about dibble's config.
because ioctls don't regenerate events through udev - the device must already exist... udev doesn't do anything after that point (what would be the point in, say, udev picking up a "DMA turned on" event on a disk drive?)
Offline
I'll take a crack at this riddle.
Given you don't run hotplug and your module is not listed in your modules array in rc.conf,
and you have it aliased in modprobe.conf,
wouldn't that mean that the module is loaded the first time you try and access that interface?
The same thing occurs with any module that is aliased in modprobe.conf and not previously loaded, correct?
Hobbes : Shouldn't we read the instructions?
Calvin : Do I look like a sissy?
Offline
lanrat wrote:Firmware might be loaded by hotplug's firmware.agent.
but I think dibble is saying he can load the module and wait for a whole day and no light, then type "ifconfig blark0 up" and the light comes on (implying firmware load)... if that's correct, then hotplug wouldn't have anything to do with it
That's exactly it - i do think it is probably hotplug doing it tho but i don't know how. The firmware for the card is stored in /lib/firmware which is where the Arch hotplug pkg looks so that seems like strong evidence. In addition to this I do not load the module from rc.conf but it appears in lsmod.
I'm not using hotplug by the way.
I posted a load of info here originally about the problem:
http://bbs.archlinux.org/viewtopic.php? … highlight=
That contains a lot of config info.
Let me know what else you need
It's setup to start under my own custom wifi initscripts.
Offline
I'll take a crack at this riddle.
Given you don't run hotplug and your module is not listed in your modules array in rc.conf,
and you have it aliased in modprobe.conf,
wouldn't that mean that the module is loaded the first time you try and access that interface?The same thing occurs with any module that is aliased in modprobe.conf and not previously loaded, correct?
you may have something here - dibble, are you sure you're modprobing the module before hand? or are you just using "ifconfig <> up" and having *that* load the module?
Offline
it's not aliased in modprobe.conf or listed in rc.conf - i can add it to rc.conf and see if that helps tho!
Offline
That's a good idea :-)
It shouldn't matter that udev is loaded first. It just loads the rules. The real problem is how to identify this card. Is it visible under /sys ? (/sys/class/pcmcia/... ?).
BTW Which kernel are you using ?
http://kerneltrap.org/mailarchive/1/message/68282/flat
EDIT: What is your current udev rule for renaming this card?
Offline
I have no udev rule yet
The real problem is how to identify this card. Is it visible under /sys ? (/sys/class/pcmcia/... ?).
Not that I can see
Offline
Udev doesnt handle networking devices.
Everyone is running hotplug now via udev. Do a pgrep hotplug and you will see that its running.
iphitus
Offline
Yes, currently you're probably running firmware.agent via udev's hotplug rule (which is good).
It should be possible to convert all hotplug scripts to udev rules but the main problem is to rename the network interface based on some info from /sys or hotplug enviroment variables (if I understand you correctly).
Why don't you just try writing an udev rule like in this example?. Of course you need to first have the wireless card running.
It's important where you put the rule. If it's in your custom rules file named for example 00.udev.rules then it will be run before hotplug script and it's possible that it will not work.
In this case create a second file (if you don't want to modify standard rules) named for example x0.udev.rules and put this rule in there.
I don't have any experience with pcmcia wireless cards so I don't know if there are any rules in standard file that also have NAME filed and are related to pcmcia devices. Only one rule for a given device can have NAME field (every second rule is ignored).
BTW I hope you read the link I posted (about a possible bug in some kernel versions that doesn't allow renaming network interfaces via udev). If there is no bug I'm almost sure renaming your device via udev is possible. Writing udev rules is somethimes very tricky and time consuming though :-)
Offline