diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2009-08-03 21:58:47 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-07 19:09:30 +0200 |
commit | 37055bd455b31b8220c35a1ede9c6aceb791cc88 (patch) | |
tree | 878573cda336195e64c88ae3331a563ef5ccfbfe /drivers/net/wireless/mwl8k.c | |
parent | mwl8k: add various missing GET_HW_SPEC endian conversions (diff) | |
download | linux-37055bd455b31b8220c35a1ede9c6aceb791cc88.tar.xz linux-37055bd455b31b8220c35a1ede9c6aceb791cc88.zip |
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>
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 9643aa4751c9..25423c05aff1 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c @@ -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; } |