On Friday 27 April 2007 17:37, Jiri Benc wrote: > has anyone an idea what's going on here? > > How to reproduce: > 1. modprobe bcm43xx_mac80211 > 2. plug in my cardbus bcm4318 card > (note that if I swap these two steps, the oops doesn't occur) > > By adding debug printks, I located the place where the null dereference > happens. Please note that I have Michael Wu's latest patches applied. > It's in > name = wiphy_dev(local->hw.wiphy)->driver->name; > and wiphy_dev(local->hw.wiphy) is NULL. > I've attached a patch. I don't have the hardware so I don't know if it'll work, but it seems right to me. Thanks, -Michael Wu
ssb: ensure ssb_device has dev set before registering From: Michael Wu <flamingice@xxxxxxxxxxxx> ssb_devices_register sets sdev->dev after the device is registered. This moves it before device_register so it can be used during probe if an appropriate driver is found during device_register. Signed-off-by: Michael Wu <flamingice@xxxxxxxxxxxx> --- drivers/ssb/main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index 682aa5c..c8afd1b 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c @@ -364,6 +364,7 @@ static int ssb_devices_register(struct ssb_bus *bus) dev->release = ssb_release_dev; dev->bus = &ssb_bustype; + sdev->dev = dev; snprintf(dev->bus_id, sizeof(dev->bus_id), "ssb%d:%d", bus->busnumber, dev_idx); @@ -391,7 +392,6 @@ static int ssb_devices_register(struct ssb_bus *bus) kfree(devwrap); goto error; } - sdev->dev = dev; dev_idx++; }
Attachment:
pgpFKLZ2BbVf9.pgp
Description: PGP signature