Commit 53b1b3e1 authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by John W. Linville

mwl8k: use the dma state API instead of the pci equivalents

The DMA API is preferred.

No functional change.
Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: default avatarLennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 1c62c72b
...@@ -109,7 +109,7 @@ struct mwl8k_rx_queue { ...@@ -109,7 +109,7 @@ struct mwl8k_rx_queue {
dma_addr_t rxd_dma; dma_addr_t rxd_dma;
struct { struct {
struct sk_buff *skb; struct sk_buff *skb;
DECLARE_PCI_UNMAP_ADDR(dma) DEFINE_DMA_UNMAP_ADDR(dma);
} *buf; } *buf;
}; };
...@@ -963,7 +963,7 @@ static int rxq_refill(struct ieee80211_hw *hw, int index, int limit) ...@@ -963,7 +963,7 @@ static int rxq_refill(struct ieee80211_hw *hw, int index, int limit)
if (rxq->tail == MWL8K_RX_DESCS) if (rxq->tail == MWL8K_RX_DESCS)
rxq->tail = 0; rxq->tail = 0;
rxq->buf[rx].skb = skb; rxq->buf[rx].skb = skb;
pci_unmap_addr_set(&rxq->buf[rx], dma, addr); dma_unmap_addr_set(&rxq->buf[rx], dma, addr);
rxd = rxq->rxd + (rx * priv->rxd_ops->rxd_size); rxd = rxq->rxd + (rx * priv->rxd_ops->rxd_size);
priv->rxd_ops->rxd_refill(rxd, addr, MWL8K_RX_MAXSZ); priv->rxd_ops->rxd_refill(rxd, addr, MWL8K_RX_MAXSZ);
...@@ -984,9 +984,9 @@ static void mwl8k_rxq_deinit(struct ieee80211_hw *hw, int index) ...@@ -984,9 +984,9 @@ static void mwl8k_rxq_deinit(struct ieee80211_hw *hw, int index)
for (i = 0; i < MWL8K_RX_DESCS; i++) { for (i = 0; i < MWL8K_RX_DESCS; i++) {
if (rxq->buf[i].skb != NULL) { if (rxq->buf[i].skb != NULL) {
pci_unmap_single(priv->pdev, pci_unmap_single(priv->pdev,
pci_unmap_addr(&rxq->buf[i], dma), dma_unmap_addr(&rxq->buf[i], dma),
MWL8K_RX_MAXSZ, PCI_DMA_FROMDEVICE); MWL8K_RX_MAXSZ, PCI_DMA_FROMDEVICE);
pci_unmap_addr_set(&rxq->buf[i], dma, 0); dma_unmap_addr_set(&rxq->buf[i], dma, 0);
kfree_skb(rxq->buf[i].skb); kfree_skb(rxq->buf[i].skb);
rxq->buf[i].skb = NULL; rxq->buf[i].skb = NULL;
...@@ -1060,9 +1060,9 @@ static int rxq_process(struct ieee80211_hw *hw, int index, int limit) ...@@ -1060,9 +1060,9 @@ static int rxq_process(struct ieee80211_hw *hw, int index, int limit)
rxq->buf[rxq->head].skb = NULL; rxq->buf[rxq->head].skb = NULL;
pci_unmap_single(priv->pdev, pci_unmap_single(priv->pdev,
pci_unmap_addr(&rxq->buf[rxq->head], dma), dma_unmap_addr(&rxq->buf[rxq->head], dma),
MWL8K_RX_MAXSZ, PCI_DMA_FROMDEVICE); MWL8K_RX_MAXSZ, PCI_DMA_FROMDEVICE);
pci_unmap_addr_set(&rxq->buf[rxq->head], dma, 0); dma_unmap_addr_set(&rxq->buf[rxq->head], dma, 0);
rxq->head++; rxq->head++;
if (rxq->head == MWL8K_RX_DESCS) if (rxq->head == MWL8K_RX_DESCS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment