diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2009-07-17 01:26:27 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-20 11:38:12 -0400 |
commit | 954ef509cc7d795ccd69fa2e01539297e9a003a0 (patch) | |
tree | 4ade5b40ad6dd224a065f88e1637d244c4788a39 /drivers/net/wireless/mwl8k.c | |
parent | 3e4f542cfbf5a60f2295b2de9a31bdd14beb7b4a (diff) |
mwl8k: get rid of mwl8k_get_stats() workqueue use
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 5ce2d362e07..29712bd95af 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -2852,42 +2852,14 @@ static int mwl8k_get_tx_stats(struct ieee80211_hw *hw, | |||
2852 | sizeof(struct ieee80211_tx_queue_stats)); | 2852 | sizeof(struct ieee80211_tx_queue_stats)); |
2853 | } | 2853 | } |
2854 | spin_unlock_bh(&priv->tx_lock); | 2854 | spin_unlock_bh(&priv->tx_lock); |
2855 | return 0; | ||
2856 | } | ||
2857 | |||
2858 | struct mwl8k_get_stats_worker { | ||
2859 | struct mwl8k_work_struct header; | ||
2860 | struct ieee80211_low_level_stats *stats; | ||
2861 | }; | ||
2862 | 2855 | ||
2863 | static int mwl8k_get_stats_wt(struct work_struct *wt) | 2856 | return 0; |
2864 | { | ||
2865 | struct mwl8k_get_stats_worker *worker = | ||
2866 | (struct mwl8k_get_stats_worker *)wt; | ||
2867 | |||
2868 | return mwl8k_cmd_802_11_get_stat(worker->header.hw, worker->stats); | ||
2869 | } | 2857 | } |
2870 | 2858 | ||
2871 | static int mwl8k_get_stats(struct ieee80211_hw *hw, | 2859 | static int mwl8k_get_stats(struct ieee80211_hw *hw, |
2872 | struct ieee80211_low_level_stats *stats) | 2860 | struct ieee80211_low_level_stats *stats) |
2873 | { | 2861 | { |
2874 | int rc; | 2862 | return mwl8k_cmd_802_11_get_stat(hw, stats); |
2875 | struct mwl8k_get_stats_worker *worker; | ||
2876 | |||
2877 | worker = kzalloc(sizeof(*worker), GFP_KERNEL); | ||
2878 | if (worker == NULL) | ||
2879 | return -ENOMEM; | ||
2880 | |||
2881 | worker->stats = stats; | ||
2882 | rc = mwl8k_queue_work(hw, &worker->header, mwl8k_get_stats_wt); | ||
2883 | |||
2884 | kfree(worker); | ||
2885 | if (rc == -ETIMEDOUT) { | ||
2886 | printk(KERN_ERR "%s() timed out\n", __func__); | ||
2887 | rc = -EINVAL; | ||
2888 | } | ||
2889 | |||
2890 | return rc; | ||
2891 | } | 2863 | } |
2892 | 2864 | ||
2893 | static const struct ieee80211_ops mwl8k_ops = { | 2865 | static const struct ieee80211_ops mwl8k_ops = { |