When b43 fails to find firmware when loaded, a subsequent unload will
oops due to calling ieee80211_unregister_hw() when the corresponding
register call was never made.

Commit 2d838bb608e2d1f6cb4280e76748cb812dc822e7 fixed the same problem
for b43legacy.

Signed-off-by: Larry Finger <[email protected]>
Tested-by: Markus Kanet <[email protected]>
Cc: Stable <[email protected]> [V3.3.0+ (the patch will need to be 
refactored)]
Cc: Markus Kanet <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
---

This patch is the one refactored for v3.4 to replace the one that failed
to merge. The mainline commit is f89ff6441df06abc2d95f3ef67525923032d6283.

This version also applies to v3.3. It is not needed for any versions older
that 3.3.

Larry
---

 drivers/net/wireless/b43/main.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index e4d6dc2..d6ffd43 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -5430,6 +5430,8 @@ static void b43_ssb_remove(struct ssb_device *sdev)
        cancel_work_sync(&wldev->restart_work);
 
        B43_WARN_ON(!wl);
+       if (!wldev->fw.ucode.data)
+               return;                 /* NULL if firmware never loaded */
        if (wl->current_dev == wldev) {
                /* Restore the queues count before unregistering, because 
firmware detect
                 * might have modified it. Restoring is important, so the 
networking
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to