From patchwork Tue Apr 23 20:33:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Michael_B=C3=BCsch?= X-Patchwork-Id: 2480071 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id B90133FCA5 for ; Tue, 23 Apr 2013 20:34:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754803Ab3DWUeT (ORCPT ); Tue, 23 Apr 2013 16:34:19 -0400 Received: from bues.ch ([80.190.117.144]:52132 "EHLO bues.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754224Ab3DWUeS (ORCPT ); Tue, 23 Apr 2013 16:34:18 -0400 Received: by bues.ch with esmtpsa (Exim 4.72) (envelope-from ) id 1UUjuj-0001e3-BJ; Tue, 23 Apr 2013 22:34:10 +0200 Date: Tue, 23 Apr 2013 22:33:47 +0200 From: Michael =?UTF-8?B?QsO8c2No?= To: linville@tuxdriver.com Cc: Thommy Jakobsson , linux-wireless@vger.kernel.org, b43-dev@lists.infradead.org, Larry.Finger@lwfinger.net Subject: [PATCH] b43: rename stop-index DMA op Message-ID: <20130423223347.4007fc5f@milhouse> In-Reply-To: References: X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Rename the stop-index-write DMA operation to set_rx_stop_slot(). Signed-off-by: Michael Buesch --- This patch depends on: "B43: Handle DMA RX descriptor underrun" Index: wireless-testing/drivers/net/wireless/b43/dma.c =================================================================== --- wireless-testing.orig/drivers/net/wireless/b43/dma.c 2013-04-23 21:50:47.655004059 +0200 +++ wireless-testing/drivers/net/wireless/b43/dma.c 2013-04-23 21:51:24.132064549 +0200 @@ -156,9 +156,9 @@ return (val / sizeof(struct b43_dmadesc32)); } -static void op32_set_current_rxslot(struct b43_dmaring *ring, int slot) +static void op32_set_rx_stop_slot(struct b43_dmaring *ring, int slot) { - b43_dma_write(ring, B43_DMA32_RXINDEX, + b43_dma_write(ring, B43_DMA32_RXSTOPINDEX, (u32) (slot * sizeof(struct b43_dmadesc32))); } @@ -169,7 +169,7 @@ .tx_suspend = op32_tx_suspend, .tx_resume = op32_tx_resume, .get_current_rxslot = op32_get_current_rxslot, - .set_current_rxslot = op32_set_current_rxslot, + .set_rx_stop_slot = op32_set_rx_stop_slot, }; /* 64bit DMA ops. */ @@ -251,9 +251,9 @@ return (val / sizeof(struct b43_dmadesc64)); } -static void op64_set_current_rxslot(struct b43_dmaring *ring, int slot) +static void op64_set_rx_stop_slot(struct b43_dmaring *ring, int slot) { - b43_dma_write(ring, B43_DMA64_RXINDEX, + b43_dma_write(ring, B43_DMA64_RXSTOPINDEX, (u32) (slot * sizeof(struct b43_dmadesc64))); } @@ -264,7 +264,7 @@ .tx_suspend = op64_tx_suspend, .tx_resume = op64_tx_resume, .get_current_rxslot = op64_get_current_rxslot, - .set_current_rxslot = op64_set_current_rxslot, + .set_rx_stop_slot = op64_set_rx_stop_slot, }; static inline int free_slots(struct b43_dmaring *ring) @@ -743,7 +743,7 @@ b43_dma_write(ring, B43_DMA64_RXCTL, value); b43_dma_write(ring, B43_DMA64_RXRINGLO, addrlo); b43_dma_write(ring, B43_DMA64_RXRINGHI, addrhi); - b43_dma_write(ring, B43_DMA64_RXINDEX, ring->nr_slots * + b43_dma_write(ring, B43_DMA64_RXSTOPINDEX, ring->nr_slots * sizeof(struct b43_dmadesc64)); } else { u32 ringbase = (u32) (ring->dmabase); @@ -758,7 +758,7 @@ value |= B43_DMA32_RXPARITYDISABLE; b43_dma_write(ring, B43_DMA32_RXCTL, value); b43_dma_write(ring, B43_DMA32_RXRING, addrlo); - b43_dma_write(ring, B43_DMA32_RXINDEX, ring->nr_slots * + b43_dma_write(ring, B43_DMA32_RXSTOPINDEX, ring->nr_slots * sizeof(struct b43_dmadesc32)); } } @@ -1749,7 +1749,7 @@ */ current_slot = ring->ops->get_current_rxslot(ring); previous_slot = prev_slot(ring, current_slot); - ring->ops->set_current_rxslot(ring, previous_slot); + ring->ops->set_rx_stop_slot(ring, previous_slot); } void b43_dma_rx(struct b43_dmaring *ring) @@ -1768,7 +1768,7 @@ update_max_used_slots(ring, ++used_slots); } wmb(); - ops->set_current_rxslot(ring, slot); + ops->set_rx_stop_slot(ring, slot); ring->current_slot = slot; } Index: wireless-testing/drivers/net/wireless/b43/dma.h =================================================================== --- wireless-testing.orig/drivers/net/wireless/b43/dma.h 2013-04-23 21:50:47.655004059 +0200 +++ wireless-testing/drivers/net/wireless/b43/dma.h 2013-04-23 21:50:47.635003479 +0200 @@ -49,7 +49,7 @@ #define B43_DMA32_RXADDREXT_MASK 0x00030000 #define B43_DMA32_RXADDREXT_SHIFT 16 #define B43_DMA32_RXRING 0x14 -#define B43_DMA32_RXINDEX 0x18 +#define B43_DMA32_RXSTOPINDEX 0x18 #define B43_DMA32_RXSTATUS 0x1C #define B43_DMA32_RXDPTR 0x00000FFF #define B43_DMA32_RXSTATE 0x0000F000 @@ -117,7 +117,7 @@ #define B43_DMA64_RXPARITYDISABLE 0x00000800 #define B43_DMA64_RXADDREXT_MASK 0x00030000 #define B43_DMA64_RXADDREXT_SHIFT 16 -#define B43_DMA64_RXINDEX 0x24 +#define B43_DMA64_RXSTOPINDEX 0x24 #define B43_DMA64_RXRINGLO 0x28 #define B43_DMA64_RXRINGHI 0x2C #define B43_DMA64_RXSTATUS 0x30 @@ -207,7 +207,7 @@ void (*tx_suspend) (struct b43_dmaring * ring); void (*tx_resume) (struct b43_dmaring * ring); int (*get_current_rxslot) (struct b43_dmaring * ring); - void (*set_current_rxslot) (struct b43_dmaring * ring, int slot); + void (*set_rx_stop_slot) (struct b43_dmaring * ring, int slot); }; enum b43_dmatype {