Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236898
b: refs/heads/master
c: 4ae3fa8
h: refs/heads/master
v: v3
  • Loading branch information
Juuso Oikarinen authored and Luciano Coelho committed Jan 24, 2011
1 parent 40b9138 commit 2305a09
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1d4801f2689dc2618fdb5e83d4cb7743747491ed
refs/heads/master: 4ae3fa87854862d1724bf8f2f1e1b9b088fa53d7
20 changes: 15 additions & 5 deletions trunk/drivers/net/wireless/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -917,12 +917,10 @@ int wl1271_plt_start(struct wl1271 *wl)
return ret;
}

int wl1271_plt_stop(struct wl1271 *wl)
int __wl1271_plt_stop(struct wl1271 *wl)
{
int ret = 0;

mutex_lock(&wl->mutex);

wl1271_notice("power down");

if (wl->state != WL1271_STATE_PLT) {
Expand All @@ -938,12 +936,21 @@ int wl1271_plt_stop(struct wl1271 *wl)
wl->state = WL1271_STATE_OFF;
wl->rx_counter = 0;

out:
mutex_unlock(&wl->mutex);

cancel_work_sync(&wl->irq_work);
cancel_work_sync(&wl->recovery_work);
mutex_lock(&wl->mutex);
out:
return ret;
}

int wl1271_plt_stop(struct wl1271 *wl)
{
int ret;

mutex_lock(&wl->mutex);
ret = __wl1271_plt_stop(wl);
mutex_unlock(&wl->mutex);
return ret;
}

Expand Down Expand Up @@ -3109,6 +3116,9 @@ EXPORT_SYMBOL_GPL(wl1271_register_hw);

void wl1271_unregister_hw(struct wl1271 *wl)
{
if (wl->state == WL1271_STATE_PLT)
__wl1271_plt_stop(wl);

unregister_netdevice_notifier(&wl1271_dev_notifier);
ieee80211_unregister_hw(wl->hw);
wl->mac80211_registered = false;
Expand Down

0 comments on commit 2305a09

Please sign in to comment.