aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/b43/main.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index b8e77751065a..6c3d9ea0a9f8 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4271,7 +4271,9 @@ static void b43_chip_reset(struct work_struct *work)
4271 goto out; 4271 goto out;
4272 } 4272 }
4273 } 4273 }
4274 out: 4274out:
4275 if (err)
4276 wl->current_dev = NULL; /* Failed to init the dev. */
4275 mutex_unlock(&wl->mutex); 4277 mutex_unlock(&wl->mutex);
4276 if (err) 4278 if (err)
4277 b43err(wl, "Controller restart FAILED\n"); 4279 b43err(wl, "Controller restart FAILED\n");
@@ -4412,9 +4414,11 @@ static void b43_one_core_detach(struct ssb_device *dev)
4412 struct b43_wldev *wldev; 4414 struct b43_wldev *wldev;
4413 struct b43_wl *wl; 4415 struct b43_wl *wl;
4414 4416
4417 /* Do not cancel ieee80211-workqueue based work here.
4418 * See comment in b43_remove(). */
4419
4415 wldev = ssb_get_drvdata(dev); 4420 wldev = ssb_get_drvdata(dev);
4416 wl = wldev->wl; 4421 wl = wldev->wl;
4417 cancel_work_sync(&wldev->restart_work);
4418 b43_debugfs_remove_device(wldev); 4422 b43_debugfs_remove_device(wldev);
4419 b43_wireless_core_detach(wldev); 4423 b43_wireless_core_detach(wldev);
4420 list_del(&wldev->list); 4424 list_del(&wldev->list);
@@ -4599,6 +4603,10 @@ static void b43_remove(struct ssb_device *dev)
4599 struct b43_wl *wl = ssb_get_devtypedata(dev); 4603 struct b43_wl *wl = ssb_get_devtypedata(dev);
4600 struct b43_wldev *wldev = ssb_get_drvdata(dev); 4604 struct b43_wldev *wldev = ssb_get_drvdata(dev);
4601 4605
4606 /* We must cancel any work here before unregistering from ieee80211,
4607 * as the ieee80211 unreg will destroy the workqueue. */
4608 cancel_work_sync(&wldev->restart_work);
4609
4602 B43_WARN_ON(!wl); 4610 B43_WARN_ON(!wl);
4603 if (wl->current_dev == wldev) 4611 if (wl->current_dev == wldev)
4604 ieee80211_unregister_hw(wl->hw); 4612 ieee80211_unregister_hw(wl->hw);