From patchwork Mon Jul 11 00:52:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 962842 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6B0rUO6002702 for ; Mon, 11 Jul 2011 00:53:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753755Ab1GKAxK (ORCPT ); Sun, 10 Jul 2011 20:53:10 -0400 Received: from rere.qmqm.pl ([89.167.52.164]:43667 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753174Ab1GKAwu (ORCPT ); Sun, 10 Jul 2011 20:52:50 -0400 Received: by rere.qmqm.pl (Postfix, from userid 1000) id 4CBB613A72; Mon, 11 Jul 2011 02:52:49 +0200 (CEST) Message-Id: In-Reply-To: References: From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Subject: [PATCH v2 08/46] net/wireless: b43: fix DMA direction for RX buffers MIME-Version: 1.0 To: netdev@vger.kernel.org Cc: Stefano Brivio , linux-wireless@vger.kernel.org Date: Mon, 11 Jul 2011 02:52:47 +0200 (CEST) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 11 Jul 2011 00:53:30 +0000 (UTC) Signed-off-by: Micha? Miros?aw --- drivers/net/wireless/b43/dma.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c index 7a09a46..15b11f0 100644 --- a/drivers/net/wireless/b43/dma.c +++ b/drivers/net/wireless/b43/dma.c @@ -336,8 +336,9 @@ static inline dmaaddr = dma_map_single(ring->dev->dev->dma_dev, buf, len, DMA_TO_DEVICE); } else { + /* DMA_BIDIRECTIONAL because of b43_poison_rx_buffer() */ dmaaddr = dma_map_single(ring->dev->dev->dma_dev, - buf, len, DMA_FROM_DEVICE); + buf, len, DMA_BIDIRECTIONAL); } return dmaaddr; @@ -352,7 +353,7 @@ static inline addr, len, DMA_TO_DEVICE); } else { dma_unmap_single(ring->dev->dev->dma_dev, - addr, len, DMA_FROM_DEVICE); + addr, len, DMA_BIDIRECTIONAL); } } @@ -362,7 +363,7 @@ static inline { B43_WARN_ON(ring->tx); dma_sync_single_for_cpu(ring->dev->dev->dma_dev, - addr, len, DMA_FROM_DEVICE); + addr, len, DMA_BIDIRECTIONAL); } static inline @@ -371,7 +372,7 @@ static inline { B43_WARN_ON(ring->tx); dma_sync_single_for_device(ring->dev->dev->dma_dev, - addr, len, DMA_FROM_DEVICE); + addr, len, DMA_BIDIRECTIONAL); } static inline