aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwl8k.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2009-07-17 01:24:15 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-20 11:38:10 -0400
commit733d3067d3fb168fbbd008cb0ebf5ad2027030f3 (patch)
treeb58ade2822e89a2dbef8ddf6beb12d984da8c4da /drivers/net/wireless/mwl8k.c
parent3a980d0a505161b99fc936827cb28ec8eb853284 (diff)
mwl8k: get rid of mwl8k_set_rts_threshold() 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.c42
1 files changed, 3 insertions, 39 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index d5a46a917cf..3129c577388 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -1970,7 +1970,7 @@ struct mwl8k_cmd_rts_threshold {
1970} __attribute__((packed)); 1970} __attribute__((packed));
1971 1971
1972static int mwl8k_rts_threshold(struct ieee80211_hw *hw, 1972static int mwl8k_rts_threshold(struct ieee80211_hw *hw,
1973 u16 action, u16 *threshold) 1973 u16 action, u16 threshold)
1974{ 1974{
1975 struct mwl8k_cmd_rts_threshold *cmd; 1975 struct mwl8k_cmd_rts_threshold *cmd;
1976 int rc; 1976 int rc;
@@ -1982,7 +1982,7 @@ static int mwl8k_rts_threshold(struct ieee80211_hw *hw,
1982 cmd->header.code = cpu_to_le16(MWL8K_CMD_RTS_THRESHOLD); 1982 cmd->header.code = cpu_to_le16(MWL8K_CMD_RTS_THRESHOLD);
1983 cmd->header.length = cpu_to_le16(sizeof(*cmd)); 1983 cmd->header.length = cpu_to_le16(sizeof(*cmd));
1984 cmd->action = cpu_to_le16(action); 1984 cmd->action = cpu_to_le16(action);
1985 cmd->threshold = cpu_to_le16(*threshold); 1985 cmd->threshold = cpu_to_le16(threshold);
1986 1986
1987 rc = mwl8k_post_cmd(hw, &cmd->header); 1987 rc = mwl8k_post_cmd(hw, &cmd->header);
1988 kfree(cmd); 1988 kfree(cmd);
@@ -2809,45 +2809,9 @@ static void mwl8k_configure_filter(struct ieee80211_hw *hw,
2809 mwl8k_queue_work(hw, &worker->header, mwl8k_configure_filter_wt); 2809 mwl8k_queue_work(hw, &worker->header, mwl8k_configure_filter_wt);
2810} 2810}
2811 2811
2812struct mwl8k_set_rts_threshold_worker {
2813 struct mwl8k_work_struct header;
2814 u32 value;
2815};
2816
2817static int mwl8k_set_rts_threshold_wt(struct work_struct *wt)
2818{
2819 struct mwl8k_set_rts_threshold_worker *worker =
2820 (struct mwl8k_set_rts_threshold_worker *)wt;
2821
2822 struct ieee80211_hw *hw = worker->header.hw;
2823 u16 threshold = (u16)(worker->value);
2824 int rc;
2825
2826 rc = mwl8k_rts_threshold(hw, MWL8K_CMD_SET, &threshold);
2827
2828 return rc;
2829}
2830
2831static int mwl8k_set_rts_threshold(struct ieee80211_hw *hw, u32 value) 2812static int mwl8k_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
2832{ 2813{
2833 int rc; 2814 return mwl8k_rts_threshold(hw, MWL8K_CMD_SET, value);
2834 struct mwl8k_set_rts_threshold_worker *worker;
2835
2836 worker = kzalloc(sizeof(*worker), GFP_KERNEL);
2837 if (worker == NULL)
2838 return -ENOMEM;
2839
2840 worker->value = value;
2841
2842 rc = mwl8k_queue_work(hw, &worker->header, mwl8k_set_rts_threshold_wt);
2843 kfree(worker);
2844
2845 if (rc == -ETIMEDOUT) {
2846 printk(KERN_ERR "%s() timed out\n", __func__);
2847 rc = -EINVAL;
2848 }
2849
2850 return rc;
2851} 2815}
2852 2816
2853struct mwl8k_conf_tx_worker { 2817struct mwl8k_conf_tx_worker {