mwl8k: call pci_unmap_single() before accessing command structure again
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
4ff6432ea6
commit
37055bd455
@@ -1593,6 +1593,9 @@ static int mwl8k_post_cmd(struct ieee80211_hw *hw, struct mwl8k_cmd_pkt *cmd)
|
|||||||
timeout = wait_for_completion_timeout(&cmd_wait,
|
timeout = wait_for_completion_timeout(&cmd_wait,
|
||||||
msecs_to_jiffies(MWL8K_CMD_TIMEOUT_MS));
|
msecs_to_jiffies(MWL8K_CMD_TIMEOUT_MS));
|
||||||
|
|
||||||
|
pci_unmap_single(priv->pdev, dma_addr, dma_size,
|
||||||
|
PCI_DMA_BIDIRECTIONAL);
|
||||||
|
|
||||||
result = &cmd->result;
|
result = &cmd->result;
|
||||||
if (!timeout) {
|
if (!timeout) {
|
||||||
spin_lock_irq(&priv->fw_lock);
|
spin_lock_irq(&priv->fw_lock);
|
||||||
@@ -1612,8 +1615,6 @@ static int mwl8k_post_cmd(struct ieee80211_hw *hw, struct mwl8k_cmd_pkt *cmd)
|
|||||||
*result);
|
*result);
|
||||||
}
|
}
|
||||||
|
|
||||||
pci_unmap_single(priv->pdev, dma_addr, dma_size,
|
|
||||||
PCI_DMA_BIDIRECTIONAL);
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user