diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2009-08-17 22:06:20 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-20 11:38:12 -0400 |
commit | e6935ea10485f34b82d16f8dff9aa2bdf32ab4bf (patch) | |
tree | df8a0a4efe26a7c99fc7fab0963a4e34ce86beb7 /drivers | |
parent | 954ef509cc7d795ccd69fa2e01539297e9a003a0 (diff) |
mwl8k: get rid of mwl8k_configure_filter() workqueue use
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 | 65 |
1 files changed, 20 insertions, 45 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 29712bd95afe..43e5dd19b664 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -2747,26 +2747,23 @@ static u64 mwl8k_prepare_multicast(struct ieee80211_hw *hw, | |||
2747 | return (unsigned long)cmd; | 2747 | return (unsigned long)cmd; |
2748 | } | 2748 | } |
2749 | 2749 | ||
2750 | struct mwl8k_configure_filter_worker { | 2750 | static void mwl8k_configure_filter(struct ieee80211_hw *hw, |
2751 | struct mwl8k_work_struct header; | 2751 | unsigned int changed_flags, |
2752 | unsigned int changed_flags; | 2752 | unsigned int *total_flags, |
2753 | unsigned int total_flags; | 2753 | u64 multicast) |
2754 | { | ||
2755 | struct mwl8k_priv *priv = hw->priv; | ||
2754 | struct mwl8k_cmd_pkt *multicast_adr_cmd; | 2756 | struct mwl8k_cmd_pkt *multicast_adr_cmd; |
2755 | }; | ||
2756 | 2757 | ||
2757 | #define MWL8K_SUPPORTED_IF_FLAGS FIF_BCN_PRBRESP_PROMISC | 2758 | /* Clear unsupported feature flags */ |
2759 | *total_flags &= FIF_BCN_PRBRESP_PROMISC; | ||
2758 | 2760 | ||
2759 | static int mwl8k_configure_filter_wt(struct work_struct *wt) | 2761 | if (mwl8k_fw_lock(hw)) |
2760 | { | 2762 | return; |
2761 | struct mwl8k_configure_filter_worker *worker = | ||
2762 | (struct mwl8k_configure_filter_worker *)wt; | ||
2763 | struct ieee80211_hw *hw = worker->header.hw; | ||
2764 | struct mwl8k_priv *priv = hw->priv; | ||
2765 | int rc = 0; | ||
2766 | 2763 | ||
2767 | if (worker->changed_flags & FIF_BCN_PRBRESP_PROMISC) { | 2764 | if (changed_flags & FIF_BCN_PRBRESP_PROMISC) { |
2768 | if (worker->total_flags & FIF_BCN_PRBRESP_PROMISC) | 2765 | if (*total_flags & FIF_BCN_PRBRESP_PROMISC) |
2769 | rc = mwl8k_cmd_set_pre_scan(hw); | 2766 | mwl8k_cmd_set_pre_scan(hw); |
2770 | else { | 2767 | else { |
2771 | u8 *bssid; | 2768 | u8 *bssid; |
2772 | 2769 | ||
@@ -2774,39 +2771,17 @@ static int mwl8k_configure_filter_wt(struct work_struct *wt) | |||
2774 | if (priv->vif != NULL) | 2771 | if (priv->vif != NULL) |
2775 | bssid = MWL8K_VIF(priv->vif)->bssid; | 2772 | bssid = MWL8K_VIF(priv->vif)->bssid; |
2776 | 2773 | ||
2777 | rc = mwl8k_cmd_set_post_scan(hw, bssid); | 2774 | mwl8k_cmd_set_post_scan(hw, bssid); |
2778 | } | 2775 | } |
2779 | } | 2776 | } |
2780 | 2777 | ||
2781 | if (!rc && worker->multicast_adr_cmd != NULL) | 2778 | multicast_adr_cmd = (void *)(unsigned long)multicast; |
2782 | rc = mwl8k_post_cmd(hw, worker->multicast_adr_cmd); | 2779 | if (multicast_adr_cmd != NULL) { |
2783 | kfree(worker->multicast_adr_cmd); | 2780 | mwl8k_post_cmd(hw, multicast_adr_cmd); |
2784 | 2781 | kfree(multicast_adr_cmd); | |
2785 | return rc; | 2782 | } |
2786 | } | ||
2787 | |||
2788 | static void mwl8k_configure_filter(struct ieee80211_hw *hw, | ||
2789 | unsigned int changed_flags, | ||
2790 | unsigned int *total_flags, | ||
2791 | u64 multicast) | ||
2792 | { | ||
2793 | struct mwl8k_configure_filter_worker *worker; | ||
2794 | |||
2795 | /* Clear unsupported feature flags */ | ||
2796 | *total_flags &= MWL8K_SUPPORTED_IF_FLAGS; | ||
2797 | |||
2798 | if (!(changed_flags & MWL8K_SUPPORTED_IF_FLAGS)) | ||
2799 | return; | ||
2800 | |||
2801 | worker = kzalloc(sizeof(*worker), GFP_ATOMIC); | ||
2802 | if (worker == NULL) | ||
2803 | return; | ||
2804 | |||
2805 | worker->changed_flags = changed_flags; | ||
2806 | worker->total_flags = *total_flags; | ||
2807 | worker->multicast_adr_cmd = (void *)(unsigned long)multicast; | ||
2808 | 2783 | ||
2809 | mwl8k_queue_work(hw, &worker->header, mwl8k_configure_filter_wt); | 2784 | mwl8k_fw_unlock(hw); |
2810 | } | 2785 | } |
2811 | 2786 | ||
2812 | static int mwl8k_set_rts_threshold(struct ieee80211_hw *hw, u32 value) | 2787 | static int mwl8k_set_rts_threshold(struct ieee80211_hw *hw, u32 value) |