On Sun, 2012-01-22 at 04:32 +0100, Stefan Lippers-Hollmann wrote:
> Hi
>
> On Sunday 22 January 2012, Ben Hutchings wrote:
> > Currently cfg80211 fails to create a "phy80211" symlink in sysfs from
> > the net device to the wiphy device. The latter needs to be registered
> > first.
> >
> > Compile-tested only.
> >
> > Reported-by: Cesare Leonardi <celeonar@gmail.com>
> > Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> > ---
> > drivers/net/wireless/ipw2x00/ipw2200.c | 23 ++++++++++++-----------
> > 1 files changed, 12 insertions(+), 11 deletions(-)
>
> I've tested this patch on my ipw2200 (inside an Acer TravelMate 292LMi).
> While the original
[...]
> is almost cosmetic, without any apparent ill-effects, applying that
> patch to kernel 3.2.1 (not exactly Debian's - e.g. I need acerhk/
> dritek to disable rfkill for that card, but it should be close enough)
> results in this trace:
>
> [ 5.708938] libipw: 802.11 data/management/control stack, git-1.1.13
> [ 5.708942] libipw: Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>
> […]
> [ 5.785178] ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 1.2.2kmprq
> [ 5.785184] ipw2200: Copyright(c) 2003-2006 Intel Corporation
> [ 5.785323] ipw2200 0000:02:02.0: power state changed by ACPI to D0
> [ 5.785330] ipw2200 0000:02:02.0: power state changed by ACPI to D0
> [ 5.785344] ipw2200 0000:02:02.0: PCI INT A -> Link[LNKC] -> GSI 10 (level, low) -> IRQ 10
> [ 5.785370] ipw2200: Detected Intel PRO/Wireless 2200BG Network Connection
> [ 5.785416] ------------[ cut here ]------------
> [ 5.785435] WARNING: at /tmp/buildd/linux-aptosid-3.2/debian/build/source_i386_none/net/wireless/core.c:562 wiphy_register+0x45/0x38d [cfg80211]()
[...]
Which is:
if (!have_band) {
WARN_ON(1);
return -EINVAL;
}
and have_band is set if any element of wiphy->bands[] is non-NULL.
ipw_wdev_init() clearly does initialise wiphy->bands... except that it
seems to depend on the regulatory area having been determined already,
which I suppose must be done during the callback from netdev
registration (ipw_net_init()). Judging by the comment about this in
ipw2100.c, it's probably important that initialisation is done in this
order.
So maybe cfg80211 should instead tolerate registration in this order?
Ben.
--
Ben Hutchings
Knowledge is power. France is bacon.
Attachment:
signature.asc
Description: This is a digitally signed message part