提交 37055bd4 编写于 作者: L Lennert Buytenhek 提交者: John W. Linville

mwl8k: call pci_unmap_single() before accessing command structure again

Signed-off-by: NLennert Buytenhek <buytenh@marvell.com>
Acked-by: NNicolas Pitre <nico@marvell.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 4ff6432e
......@@ -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,
msecs_to_jiffies(MWL8K_CMD_TIMEOUT_MS));
pci_unmap_single(priv->pdev, dma_addr, dma_size,
PCI_DMA_BIDIRECTIONAL);
result = &cmd->result;
if (!timeout) {
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);
}
pci_unmap_single(priv->pdev, dma_addr, dma_size,
PCI_DMA_BIDIRECTIONAL);
return rc;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册