提交 3779752d 编写于 作者: L Lennert Buytenhek 提交者: John W. Linville

mwl8k: use the mac80211-provided workqueue instead of creating our own

Signed-off-by: NLennert Buytenhek <buytenh@marvell.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 d5e30845
...@@ -195,9 +195,6 @@ struct mwl8k_priv { ...@@ -195,9 +195,6 @@ struct mwl8k_priv {
/* Tasklet to reclaim TX descriptors and buffers after tx */ /* Tasklet to reclaim TX descriptors and buffers after tx */
struct tasklet_struct tx_reclaim_task; struct tasklet_struct tx_reclaim_task;
/* Work thread to serialize configuration requests */
struct workqueue_struct *config_wq;
}; };
/* Per interface specific private data */ /* Per interface specific private data */
...@@ -881,9 +878,11 @@ mwl8k_capture_bssid(struct mwl8k_priv *priv, struct ieee80211_hdr *wh) ...@@ -881,9 +878,11 @@ mwl8k_capture_bssid(struct mwl8k_priv *priv, struct ieee80211_hdr *wh)
!compare_ether_addr(wh->addr3, priv->capture_bssid); !compare_ether_addr(wh->addr3, priv->capture_bssid);
} }
static inline void mwl8k_save_beacon(struct mwl8k_priv *priv, static inline void mwl8k_save_beacon(struct ieee80211_hw *hw,
struct sk_buff *skb) struct sk_buff *skb)
{ {
struct mwl8k_priv *priv = hw->priv;
priv->capture_beacon = false; priv->capture_beacon = false;
memset(priv->capture_bssid, 0, ETH_ALEN); memset(priv->capture_bssid, 0, ETH_ALEN);
...@@ -894,8 +893,7 @@ static inline void mwl8k_save_beacon(struct mwl8k_priv *priv, ...@@ -894,8 +893,7 @@ static inline void mwl8k_save_beacon(struct mwl8k_priv *priv,
*/ */
priv->beacon_skb = skb_copy(skb, GFP_ATOMIC); priv->beacon_skb = skb_copy(skb, GFP_ATOMIC);
if (priv->beacon_skb != NULL) if (priv->beacon_skb != NULL)
queue_work(priv->config_wq, ieee80211_queue_work(hw, &priv->finalize_join_worker);
&priv->finalize_join_worker);
} }
static int rxq_process(struct ieee80211_hw *hw, int index, int limit) static 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,7 +938,7 @@ static int rxq_process(struct ieee80211_hw *hw, int index, int limit)
* send a FINALIZE_JOIN command to the firmware. * send a FINALIZE_JOIN command to the firmware.
*/ */
if (mwl8k_capture_bssid(priv, wh)) if (mwl8k_capture_bssid(priv, wh))
mwl8k_save_beacon(priv, skb); mwl8k_save_beacon(hw, skb);
memset(&status, 0, sizeof(status)); memset(&status, 0, sizeof(status));
status.mactime = 0; status.mactime = 0;
...@@ -2504,9 +2502,6 @@ static void mwl8k_stop(struct ieee80211_hw *hw) ...@@ -2504,9 +2502,6 @@ static void mwl8k_stop(struct ieee80211_hw *hw)
/* Stop tx reclaim tasklet */ /* Stop tx reclaim tasklet */
tasklet_disable(&priv->tx_reclaim_task); tasklet_disable(&priv->tx_reclaim_task);
/* Stop config thread */
flush_workqueue(priv->config_wq);
/* Return all skbs to mac80211 */ /* Return all skbs to mac80211 */
for (i = 0; i < MWL8K_TX_QUEUES; i++) for (i = 0; i < MWL8K_TX_QUEUES; i++)
mwl8k_txq_reclaim(hw, i, 1); mwl8k_txq_reclaim(hw, i, 1);
...@@ -2920,11 +2915,6 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev, ...@@ -2920,11 +2915,6 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
mwl8k_tx_reclaim_handler, (unsigned long)hw); mwl8k_tx_reclaim_handler, (unsigned long)hw);
tasklet_disable(&priv->tx_reclaim_task); tasklet_disable(&priv->tx_reclaim_task);
/* Config workthread */
priv->config_wq = create_singlethread_workqueue("mwl8k_config");
if (priv->config_wq == NULL)
goto err_iounmap;
/* Power management cookie */ /* Power management cookie */
priv->cookie = pci_alloc_consistent(priv->pdev, 4, &priv->cookie_dma); priv->cookie = pci_alloc_consistent(priv->pdev, 4, &priv->cookie_dma);
if (priv->cookie == NULL) if (priv->cookie == NULL)
...@@ -3047,9 +3037,6 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev, ...@@ -3047,9 +3037,6 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
if (priv->regs != NULL) if (priv->regs != NULL)
pci_iounmap(pdev, priv->regs); pci_iounmap(pdev, priv->regs);
if (priv->config_wq != NULL)
destroy_workqueue(priv->config_wq);
pci_set_drvdata(pdev, NULL); pci_set_drvdata(pdev, NULL);
ieee80211_free_hw(hw); ieee80211_free_hw(hw);
...@@ -3082,9 +3069,6 @@ static void __devexit mwl8k_remove(struct pci_dev *pdev) ...@@ -3082,9 +3069,6 @@ static void __devexit mwl8k_remove(struct pci_dev *pdev)
/* Remove tx reclaim tasklet */ /* Remove tx reclaim tasklet */
tasklet_kill(&priv->tx_reclaim_task); tasklet_kill(&priv->tx_reclaim_task);
/* Stop config thread */
destroy_workqueue(priv->config_wq);
/* Stop hardware */ /* Stop hardware */
mwl8k_hw_reset(priv); mwl8k_hw_reset(priv);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册