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>
This commit is contained in:
parent
d5e308457e
commit
3779752d76
@ -195,9 +195,6 @@ struct mwl8k_priv {
|
||||
|
||||
/* Tasklet to reclaim TX descriptors and buffers after tx */
|
||||
struct tasklet_struct tx_reclaim_task;
|
||||
|
||||
/* Work thread to serialize configuration requests */
|
||||
struct workqueue_struct *config_wq;
|
||||
};
|
||||
|
||||
/* Per interface specific private data */
|
||||
@ -881,9 +878,11 @@ mwl8k_capture_bssid(struct mwl8k_priv *priv, struct ieee80211_hdr *wh)
|
||||
!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 mwl8k_priv *priv = hw->priv;
|
||||
|
||||
priv->capture_beacon = false;
|
||||
memset(priv->capture_bssid, 0, ETH_ALEN);
|
||||
|
||||
@ -894,8 +893,7 @@ static inline void mwl8k_save_beacon(struct mwl8k_priv *priv,
|
||||
*/
|
||||
priv->beacon_skb = skb_copy(skb, GFP_ATOMIC);
|
||||
if (priv->beacon_skb != NULL)
|
||||
queue_work(priv->config_wq,
|
||||
&priv->finalize_join_worker);
|
||||
ieee80211_queue_work(hw, &priv->finalize_join_worker);
|
||||
}
|
||||
|
||||
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.
|
||||
*/
|
||||
if (mwl8k_capture_bssid(priv, wh))
|
||||
mwl8k_save_beacon(priv, skb);
|
||||
mwl8k_save_beacon(hw, skb);
|
||||
|
||||
memset(&status, 0, sizeof(status));
|
||||
status.mactime = 0;
|
||||
@ -2504,9 +2502,6 @@ static void mwl8k_stop(struct ieee80211_hw *hw)
|
||||
/* Stop tx reclaim tasklet */
|
||||
tasklet_disable(&priv->tx_reclaim_task);
|
||||
|
||||
/* Stop config thread */
|
||||
flush_workqueue(priv->config_wq);
|
||||
|
||||
/* Return all skbs to mac80211 */
|
||||
for (i = 0; i < MWL8K_TX_QUEUES; i++)
|
||||
mwl8k_txq_reclaim(hw, i, 1);
|
||||
@ -2920,11 +2915,6 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
|
||||
mwl8k_tx_reclaim_handler, (unsigned long)hw);
|
||||
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 */
|
||||
priv->cookie = pci_alloc_consistent(priv->pdev, 4, &priv->cookie_dma);
|
||||
if (priv->cookie == NULL)
|
||||
@ -3047,9 +3037,6 @@ err_iounmap:
|
||||
if (priv->regs != NULL)
|
||||
pci_iounmap(pdev, priv->regs);
|
||||
|
||||
if (priv->config_wq != NULL)
|
||||
destroy_workqueue(priv->config_wq);
|
||||
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
ieee80211_free_hw(hw);
|
||||
|
||||
@ -3082,9 +3069,6 @@ static void __devexit mwl8k_remove(struct pci_dev *pdev)
|
||||
/* Remove tx reclaim tasklet */
|
||||
tasklet_kill(&priv->tx_reclaim_task);
|
||||
|
||||
/* Stop config thread */
|
||||
destroy_workqueue(priv->config_wq);
|
||||
|
||||
/* Stop hardware */
|
||||
mwl8k_hw_reset(priv);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user