diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2009-08-17 22:08:01 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-20 11:38:13 -0400 |
commit | ab565790cb5ca3d00db0af9c2a8eb95e16054c29 (patch) | |
tree | e7e70ffff7c407196f43dd02ee32e0ac8237fa91 /drivers | |
parent | e6935ea10485f34b82d16f8dff9aa2bdf32ab4bf (diff) |
mwl8k: remove mwl8k_queue_work()
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 43e5dd19b664..a634b565018f 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -2425,70 +2425,6 @@ static int mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
2425 | return rc; | 2425 | return rc; |
2426 | } | 2426 | } |
2427 | 2427 | ||
2428 | struct mwl8k_work_struct { | ||
2429 | /* Initialized by mwl8k_queue_work(). */ | ||
2430 | struct work_struct wt; | ||
2431 | |||
2432 | /* Required field passed in to mwl8k_queue_work(). */ | ||
2433 | struct ieee80211_hw *hw; | ||
2434 | |||
2435 | /* Required field passed in to mwl8k_queue_work(). */ | ||
2436 | int (*wfunc)(struct work_struct *w); | ||
2437 | |||
2438 | /* Initialized by mwl8k_queue_work(). */ | ||
2439 | struct completion *cmd_wait; | ||
2440 | |||
2441 | /* Result code. */ | ||
2442 | int rc; | ||
2443 | }; | ||
2444 | |||
2445 | static void mwl8k_config_thread(struct work_struct *wt) | ||
2446 | { | ||
2447 | struct mwl8k_work_struct *worker = (struct mwl8k_work_struct *)wt; | ||
2448 | struct ieee80211_hw *hw = worker->hw; | ||
2449 | int rc = 0; | ||
2450 | |||
2451 | rc = mwl8k_fw_lock(hw); | ||
2452 | if (!rc) { | ||
2453 | rc = worker->wfunc(wt); | ||
2454 | mwl8k_fw_unlock(hw); | ||
2455 | } | ||
2456 | |||
2457 | worker->rc = rc; | ||
2458 | complete(worker->cmd_wait); | ||
2459 | } | ||
2460 | |||
2461 | static int mwl8k_queue_work(struct ieee80211_hw *hw, | ||
2462 | struct mwl8k_work_struct *worker, | ||
2463 | int (*wfunc)(struct work_struct *w)) | ||
2464 | { | ||
2465 | struct mwl8k_priv *priv = hw->priv; | ||
2466 | unsigned long timeout = 0; | ||
2467 | int rc = 0; | ||
2468 | |||
2469 | DECLARE_COMPLETION_ONSTACK(cmd_wait); | ||
2470 | |||
2471 | worker->hw = hw; | ||
2472 | worker->cmd_wait = &cmd_wait; | ||
2473 | worker->rc = 1; | ||
2474 | worker->wfunc = wfunc; | ||
2475 | |||
2476 | INIT_WORK(&worker->wt, mwl8k_config_thread); | ||
2477 | queue_work(priv->config_wq, &worker->wt); | ||
2478 | |||
2479 | timeout = wait_for_completion_timeout(&cmd_wait, | ||
2480 | msecs_to_jiffies(10000)); | ||
2481 | |||
2482 | if (timeout) | ||
2483 | rc = worker->rc; | ||
2484 | else { | ||
2485 | cancel_work_sync(&worker->wt); | ||
2486 | rc = -ETIMEDOUT; | ||
2487 | } | ||
2488 | |||
2489 | return rc; | ||
2490 | } | ||
2491 | |||
2492 | static int mwl8k_start(struct ieee80211_hw *hw) | 2428 | static int mwl8k_start(struct ieee80211_hw *hw) |
2493 | { | 2429 | { |
2494 | struct mwl8k_priv *priv = hw->priv; | 2430 | struct mwl8k_priv *priv = hw->priv; |