aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwl8k.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2009-10-22 14:19:45 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-11-04 18:44:44 -0500
commit3779752d764b86077375510b1fd13d8fb2c7c3a5 (patch)
treea961e23cf5f28879c0d46680615c939f4704a334 /drivers/net/wireless/mwl8k.c
parentd5e308457e8e9b4988fbd69d38c30782125b3f65 (diff)
mwl8k: use the mac80211-provided workqueue instead of creating our own
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.c28
1 files changed, 6 insertions, 22 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 0b4fa14aa176..77985e9a13a2 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -195,9 +195,6 @@ struct mwl8k_priv {
195 195
196 /* Tasklet to reclaim TX descriptors and buffers after tx */ 196 /* Tasklet to reclaim TX descriptors and buffers after tx */
197 struct tasklet_struct tx_reclaim_task; 197 struct tasklet_struct tx_reclaim_task;
198
199 /* Work thread to serialize configuration requests */
200 struct workqueue_struct *config_wq;
201}; 198};
202 199
203/* Per interface specific private data */ 200/* Per interface specific private data */
@@ -881,9 +878,11 @@ mwl8k_capture_bssid(struct mwl8k_priv *priv, struct ieee80211_hdr *wh)
881 !compare_ether_addr(wh->addr3, priv->capture_bssid); 878 !compare_ether_addr(wh->addr3, priv->capture_bssid);
882} 879}
883 880
884static inline void mwl8k_save_beacon(struct mwl8k_priv *priv, 881static inline void mwl8k_save_beacon(struct ieee80211_hw *hw,
885 struct sk_buff *skb) 882 struct sk_buff *skb)
886{ 883{
884 struct mwl8k_priv *priv = hw->priv;
885
887 priv->capture_beacon = false; 886 priv->capture_beacon = false;
888 memset(priv->capture_bssid, 0, ETH_ALEN); 887 memset(priv->capture_bssid, 0, ETH_ALEN);
889 888
@@ -894,8 +893,7 @@ static inline void mwl8k_save_beacon(struct mwl8k_priv *priv,
894 */ 893 */
895 priv->beacon_skb = skb_copy(skb, GFP_ATOMIC); 894 priv->beacon_skb = skb_copy(skb, GFP_ATOMIC);
896 if (priv->beacon_skb != NULL) 895 if (priv->beacon_skb != NULL)
897 queue_work(priv->config_wq, 896 ieee80211_queue_work(hw, &priv->finalize_join_worker);
898 &priv->finalize_join_worker);
899} 897}
900 898
901static int rxq_process(struct ieee80211_hw *hw, int index, int limit) 899static int rxq_process(struct ieee80211_hw *hw, int index, int limit)
@@ -940,7 +938,7 @@ static int rxq_process(struct ieee80211_hw *hw, int index, int limit)
940 * send a FINALIZE_JOIN command to the firmware. 938 * send a FINALIZE_JOIN command to the firmware.
941 */ 939 */
942 if (mwl8k_capture_bssid(priv, wh)) 940 if (mwl8k_capture_bssid(priv, wh))
943 mwl8k_save_beacon(priv, skb); 941 mwl8k_save_beacon(hw, skb);
944 942
945 memset(&status, 0, sizeof(status)); 943 memset(&status, 0, sizeof(status));
946 status.mactime = 0; 944 status.mactime = 0;
@@ -2504,9 +2502,6 @@ static void mwl8k_stop(struct ieee80211_hw *hw)
2504 /* Stop tx reclaim tasklet */ 2502 /* Stop tx reclaim tasklet */
2505 tasklet_disable(&priv->tx_reclaim_task); 2503 tasklet_disable(&priv->tx_reclaim_task);
2506 2504
2507 /* Stop config thread */
2508 flush_workqueue(priv->config_wq);
2509
2510 /* Return all skbs to mac80211 */ 2505 /* Return all skbs to mac80211 */
2511 for (i = 0; i < MWL8K_TX_QUEUES; i++) 2506 for (i = 0; i < MWL8K_TX_QUEUES; i++)
2512 mwl8k_txq_reclaim(hw, i, 1); 2507 mwl8k_txq_reclaim(hw, i, 1);
@@ -2920,11 +2915,6 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
2920 mwl8k_tx_reclaim_handler, (unsigned long)hw); 2915 mwl8k_tx_reclaim_handler, (unsigned long)hw);
2921 tasklet_disable(&priv->tx_reclaim_task); 2916 tasklet_disable(&priv->tx_reclaim_task);
2922 2917
2923 /* Config workthread */
2924 priv->config_wq = create_singlethread_workqueue("mwl8k_config");
2925 if (priv->config_wq == NULL)
2926 goto err_iounmap;
2927
2928 /* Power management cookie */ 2918 /* Power management cookie */
2929 priv->cookie = pci_alloc_consistent(priv->pdev, 4, &priv->cookie_dma); 2919 priv->cookie = pci_alloc_consistent(priv->pdev, 4, &priv->cookie_dma);
2930 if (priv->cookie == NULL) 2920 if (priv->cookie == NULL)
@@ -3047,9 +3037,6 @@ err_iounmap:
3047 if (priv->regs != NULL) 3037 if (priv->regs != NULL)
3048 pci_iounmap(pdev, priv->regs); 3038 pci_iounmap(pdev, priv->regs);
3049 3039
3050 if (priv->config_wq != NULL)
3051 destroy_workqueue(priv->config_wq);
3052
3053 pci_set_drvdata(pdev, NULL); 3040 pci_set_drvdata(pdev, NULL);
3054 ieee80211_free_hw(hw); 3041 ieee80211_free_hw(hw);
3055 3042
@@ -3082,9 +3069,6 @@ static void __devexit mwl8k_remove(struct pci_dev *pdev)
3082 /* Remove tx reclaim tasklet */ 3069 /* Remove tx reclaim tasklet */
3083 tasklet_kill(&priv->tx_reclaim_task); 3070 tasklet_kill(&priv->tx_reclaim_task);
3084 3071
3085 /* Stop config thread */
3086 destroy_workqueue(priv->config_wq);
3087
3088 /* Stop hardware */ 3072 /* Stop hardware */
3089 mwl8k_hw_reset(priv); 3073 mwl8k_hw_reset(priv);
3090 3074