[PATCH] airo: fix a race causing initialization failures
authorMichal Schmidt <mschmidt@redhat.com>
Fri, 29 Jun 2007 13:33:41 +0000 (15:33 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 10 Jul 2007 18:11:29 +0000 (14:11 -0400)
commit1138c37b66c16a5c7b49389ae566a4d73d60c2aa
tree5434975d31386b85220ab0b6767e44f55b41f01a
parent1c2b7db8c8c4212761fcb5190a4122afd5e02d58
[PATCH] airo: fix a race causing initialization failures

Matteo Croce reported Aironet initialization failures. They were caused by
a race in airo. airo finds a free interface name, then initializes the card
and finally registers the interface. Another device may get the same name
in the meantime.
The reason airo gets its name early is to use it in informative printks and
to name the resources it requests. The printks will be just fine without
the interface name and the resources can use the driver's name - that's
what other network drivers do anyway.
One of the talkative functions is setup_card(). It is called once before
registration and can be called later again. Let's have an empty dev->name
during the first call, so it doesn't print the ugly "airo(eth%d)" message.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/airo.c