Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290560
b: refs/heads/master
c: f3df133
h: refs/heads/master
v: v3
  • Loading branch information
Ido Yariv authored and Luciano Coelho committed Feb 15, 2012
1 parent fb5cd08 commit 589899c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 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: 9e0dc890ce23e2b28ce906bb8f466ca66f420911
refs/heads/master: f3df1331f25f782e838a3ecb72cec86b539ac02f
18 changes: 5 additions & 13 deletions trunk/drivers/net/wireless/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1391,13 +1391,15 @@ int wl1271_plt_start(struct wl1271 *wl)
return ret;
}

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

wl1271_notice("power down");

mutex_lock(&wl->mutex);
if (wl->state != WL1271_STATE_PLT) {
mutex_unlock(&wl->mutex);
wl1271_error("cannot power down because not in PLT "
"state: %d", wl->state);
ret = -EBUSY;
Expand All @@ -1410,25 +1412,15 @@ static int __wl1271_plt_stop(struct wl1271 *wl)
wl->rx_counter = 0;

mutex_unlock(&wl->mutex);

wl1271_disable_interrupts(wl);
wl1271_flush_deferred_work(wl);
cancel_work_sync(&wl->netstack_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;
}

static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
{
struct wl1271 *wl = hw->priv;
Expand Down Expand Up @@ -4881,7 +4873,7 @@ static int wl1271_register_hw(struct wl1271 *wl)
static void wl1271_unregister_hw(struct wl1271 *wl)
{
if (wl->state == WL1271_STATE_PLT)
__wl1271_plt_stop(wl);
wl1271_plt_stop(wl);

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

0 comments on commit 589899c

Please sign in to comment.