mwl8k: get rid of mwl8k_stop() workqueue use
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
2ec610cb6d
commit
d3cea0b85a
@@ -2540,39 +2540,15 @@ static int mwl8k_start(struct ieee80211_hw *hw)
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct mwl8k_stop_worker {
|
|
||||||
struct mwl8k_work_struct header;
|
|
||||||
};
|
|
||||||
|
|
||||||
static int mwl8k_stop_wt(struct work_struct *wt)
|
|
||||||
{
|
|
||||||
struct mwl8k_stop_worker *worker = (struct mwl8k_stop_worker *)wt;
|
|
||||||
struct ieee80211_hw *hw = worker->header.hw;
|
|
||||||
|
|
||||||
return mwl8k_cmd_802_11_radio_disable(hw);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void mwl8k_stop(struct ieee80211_hw *hw)
|
static void mwl8k_stop(struct ieee80211_hw *hw)
|
||||||
{
|
{
|
||||||
int rc;
|
|
||||||
struct mwl8k_stop_worker *worker;
|
|
||||||
struct mwl8k_priv *priv = hw->priv;
|
struct mwl8k_priv *priv = hw->priv;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (priv->vif != NULL)
|
mwl8k_cmd_802_11_radio_disable(hw);
|
||||||
return;
|
|
||||||
|
|
||||||
ieee80211_stop_queues(hw);
|
ieee80211_stop_queues(hw);
|
||||||
|
|
||||||
worker = kzalloc(sizeof(*worker), GFP_KERNEL);
|
|
||||||
if (worker == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
rc = mwl8k_queue_work(hw, &worker->header, mwl8k_stop_wt);
|
|
||||||
kfree(worker);
|
|
||||||
if (rc == -ETIMEDOUT)
|
|
||||||
printk(KERN_ERR "%s() timed out\n", __func__);
|
|
||||||
|
|
||||||
/* Disable interrupts */
|
/* Disable interrupts */
|
||||||
iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK);
|
iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK);
|
||||||
free_irq(priv->pdev->irq, hw);
|
free_irq(priv->pdev->irq, hw);
|
||||||
|
Reference in New Issue
Block a user