mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-15 13:15:57 +00:00
mwl8k: do not free unrequested irq
When the mwl8k driver attempts and fails to switch from sta to ap firmware (or vice-versa) in the mwl8k_add_interface routine, the mwl8k_stop routine will be called. This routine must not attempt to free the irq if it was not requested. Signed-off-by: Brian Cavagnolo <brian@cozybit.com> Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
2845fd858c
commit
bf3ca7f752
@ -137,6 +137,7 @@ struct mwl8k_tx_queue {
|
|||||||
struct mwl8k_priv {
|
struct mwl8k_priv {
|
||||||
struct ieee80211_hw *hw;
|
struct ieee80211_hw *hw;
|
||||||
struct pci_dev *pdev;
|
struct pci_dev *pdev;
|
||||||
|
int irq;
|
||||||
|
|
||||||
struct mwl8k_device_info *device_info;
|
struct mwl8k_device_info *device_info;
|
||||||
|
|
||||||
@ -3761,9 +3762,11 @@ static int mwl8k_start(struct ieee80211_hw *hw)
|
|||||||
rc = request_irq(priv->pdev->irq, mwl8k_interrupt,
|
rc = request_irq(priv->pdev->irq, mwl8k_interrupt,
|
||||||
IRQF_SHARED, MWL8K_NAME, hw);
|
IRQF_SHARED, MWL8K_NAME, hw);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
|
priv->irq = -1;
|
||||||
wiphy_err(hw->wiphy, "failed to register IRQ handler\n");
|
wiphy_err(hw->wiphy, "failed to register IRQ handler\n");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
priv->irq = priv->pdev->irq;
|
||||||
|
|
||||||
/* Enable TX reclaim and RX tasklets. */
|
/* Enable TX reclaim and RX tasklets. */
|
||||||
tasklet_enable(&priv->poll_tx_task);
|
tasklet_enable(&priv->poll_tx_task);
|
||||||
@ -3800,6 +3803,7 @@ static int mwl8k_start(struct ieee80211_hw *hw)
|
|||||||
if (rc) {
|
if (rc) {
|
||||||
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);
|
||||||
|
priv->irq = -1;
|
||||||
tasklet_disable(&priv->poll_tx_task);
|
tasklet_disable(&priv->poll_tx_task);
|
||||||
tasklet_disable(&priv->poll_rx_task);
|
tasklet_disable(&priv->poll_rx_task);
|
||||||
}
|
}
|
||||||
@ -3818,7 +3822,10 @@ static void mwl8k_stop(struct ieee80211_hw *hw)
|
|||||||
|
|
||||||
/* 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);
|
if (priv->irq != -1) {
|
||||||
|
free_irq(priv->pdev->irq, hw);
|
||||||
|
priv->irq = -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Stop finalize join worker */
|
/* Stop finalize join worker */
|
||||||
cancel_work_sync(&priv->finalize_join_worker);
|
cancel_work_sync(&priv->finalize_join_worker);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user