linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mwl8k: use the dma state API instead of the pci equivalents
@ 2010-04-02  4:10 FUJITA Tomonori
  2010-04-02  4:18 ` Lennert Buytenhek
  2010-04-06 21:02 ` John W. Linville
  0 siblings, 2 replies; 4+ messages in thread
From: FUJITA Tomonori @ 2010-04-02  4:10 UTC (permalink / raw)
  To: linux-wireless; +Cc: buytenh

The DMA API is preferred.

No functional change.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
 drivers/net/wireless/mwl8k.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index ac65e13..fe3c0e0 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -108,7 +108,7 @@ struct mwl8k_rx_queue {
 	dma_addr_t rxd_dma;
 	struct {
 		struct sk_buff *skb;
-		DECLARE_PCI_UNMAP_ADDR(dma)
+		DEFINE_DMA_UNMAP_ADDR(dma);
 	} *buf;
 };
 
@@ -964,7 +964,7 @@ static int rxq_refill(struct ieee80211_hw *hw, int index, int limit)
 		if (rxq->tail == MWL8K_RX_DESCS)
 			rxq->tail = 0;
 		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);
 		priv->rxd_ops->rxd_refill(rxd, addr, MWL8K_RX_MAXSZ);
@@ -985,9 +985,9 @@ static void mwl8k_rxq_deinit(struct ieee80211_hw *hw, int index)
 	for (i = 0; i < MWL8K_RX_DESCS; i++) {
 		if (rxq->buf[i].skb != NULL) {
 			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);
-			pci_unmap_addr_set(&rxq->buf[i], dma, 0);
+			dma_unmap_addr_set(&rxq->buf[i], dma, 0);
 
 			kfree_skb(rxq->buf[i].skb);
 			rxq->buf[i].skb = NULL;
@@ -1061,9 +1061,9 @@ static int rxq_process(struct ieee80211_hw *hw, int index, int limit)
 		rxq->buf[rxq->head].skb = NULL;
 
 		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);
-		pci_unmap_addr_set(&rxq->buf[rxq->head], dma, 0);
+		dma_unmap_addr_set(&rxq->buf[rxq->head], dma, 0);
 
 		rxq->head++;
 		if (rxq->head == MWL8K_RX_DESCS)
-- 
1.7.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mwl8k: use the dma state API instead of the pci equivalents
  2010-04-02  4:10 [PATCH] mwl8k: use the dma state API instead of the pci equivalents FUJITA Tomonori
@ 2010-04-02  4:18 ` Lennert Buytenhek
  2010-04-06 21:02 ` John W. Linville
  1 sibling, 0 replies; 4+ messages in thread
From: Lennert Buytenhek @ 2010-04-02  4:18 UTC (permalink / raw)
  To: FUJITA Tomonori; +Cc: linux-wireless

On Fri, Apr 02, 2010 at 01:10:38PM +0900, FUJITA Tomonori wrote:

> The DMA API is preferred.
> 
> No functional change.
> 
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>

Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mwl8k: use the dma state API instead of the pci equivalents
  2010-04-02  4:10 [PATCH] mwl8k: use the dma state API instead of the pci equivalents FUJITA Tomonori
  2010-04-02  4:18 ` Lennert Buytenhek
@ 2010-04-06 21:02 ` John W. Linville
  2010-04-07  0:34   ` FUJITA Tomonori
  1 sibling, 1 reply; 4+ messages in thread
From: John W. Linville @ 2010-04-06 21:02 UTC (permalink / raw)
  To: FUJITA Tomonori; +Cc: linux-wireless, buytenh

On Fri, Apr 02, 2010 at 01:10:38PM +0900, FUJITA Tomonori wrote:
> The DMA API is preferred.
> 
> No functional change.
> 
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>

Again, what tree is this against?  mwl8k fails to build after this patch.

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mwl8k: use the dma state API instead of the pci equivalents
  2010-04-06 21:02 ` John W. Linville
@ 2010-04-07  0:34   ` FUJITA Tomonori
  0 siblings, 0 replies; 4+ messages in thread
From: FUJITA Tomonori @ 2010-04-07  0:34 UTC (permalink / raw)
  To: linville; +Cc: fujita.tomonori, linux-wireless, buytenh

On Tue, 6 Apr 2010 17:02:28 -0400
"John W. Linville" <linville@tuxdriver.com> wrote:

> On Fri, Apr 02, 2010 at 01:10:38PM +0900, FUJITA Tomonori wrote:
> > The DMA API is preferred.
> > 
> > No functional change.
> > 
> > Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> 
> Again, what tree is this against?  mwl8k fails to build after this patch.

Oops, sorry. It was against net-next. I've just got wireless-next and
found that it doesn't have the DMA state API yet, which was introduced
on 2.6.34-rc2. When do you plan to update your tree? I'll work on both
patches again later on.

Thanks,

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-04-07  0:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-02  4:10 [PATCH] mwl8k: use the dma state API instead of the pci equivalents FUJITA Tomonori
2010-04-02  4:18 ` Lennert Buytenhek
2010-04-06 21:02 ` John W. Linville
2010-04-07  0:34   ` FUJITA Tomonori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).