From patchwork Sun Nov 22 09:07:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 7675771 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9E0CCBF90C for ; Sun, 22 Nov 2015 09:08:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AA71A20662 for ; Sun, 22 Nov 2015 09:08:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B281A20660 for ; Sun, 22 Nov 2015 09:08:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751412AbbKVJIO (ORCPT ); Sun, 22 Nov 2015 04:08:14 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:33347 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751105AbbKVJII (ORCPT ); Sun, 22 Nov 2015 04:08:08 -0500 Received: by wmec201 with SMTP id c201so123234325wme.0 for ; Sun, 22 Nov 2015 01:08:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=0qrlD34e96YJCnZICT7ocpW9RKwiPNZkGxCzrMc14ow=; b=JB0Vy5VyWmSx2AJIy7g7HBsHGb3Vt2IGAgzujI9tf7G+nCy46IjaCufeYbuhSIi1rN G8UjDbQBWRhLcUJIhkLbsGygvEEUHsZAGARW+0KiUXRu2KXKb/K+L8FjkOojiQGI0Ucq JNM1vvgG4sjNzzNLsFdAc0Np53NPrp0jYW0KR5n9wVedsExSdfmga5ndNdmZjE4Y4PII fL8EFMLMBrwIDPBypzSktAbZNOnC6AQLFniSS8wGT5p+Xjv+CImUd0Of+yDeSFrIQ2c+ 6oIF7IC5CzKMLjMSth2OmpVDCYk+t0PaPopy9fP97rrpJ6c1B+tf0O+OfycshSz/Fp6A VMiA== X-Received: by 10.28.136.149 with SMTP id k143mr8466794wmd.57.1448183287031; Sun, 22 Nov 2015 01:08:07 -0800 (PST) Received: from tipsey.3.home (188.31.153.139.threembb.co.uk. [188.31.153.139]) by smtp.gmail.com with ESMTPSA id c13sm7696650wmd.14.2015.11.22.01.08.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 22 Nov 2015 01:08:06 -0800 (PST) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, Malcolm Priestley Subject: [PATCH 1/8] staging: vt6655: channel.c replace pDevice with priv Date: Sun, 22 Nov 2015 09:07:15 +0000 Message-Id: <1448183242-3397-1-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.6.2 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Removing camel case. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6655/channel.c | 58 ++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c index 7a71782..6edccb42 100644 --- a/drivers/staging/vt6655/channel.c +++ b/drivers/staging/vt6655/channel.c @@ -176,62 +176,62 @@ void vnt_init_bands(struct vnt_private *priv) */ bool set_channel(void *pDeviceHandler, struct ieee80211_channel *ch) { - struct vnt_private *pDevice = pDeviceHandler; + struct vnt_private *priv = pDeviceHandler; bool bResult = true; - if (pDevice->byCurrentCh == ch->hw_value) + if (priv->byCurrentCh == ch->hw_value) return bResult; /* Set VGA to max sensitivity */ - if (pDevice->bUpdateBBVGA && - pDevice->byBBVGACurrent != pDevice->abyBBVGA[0]) { - pDevice->byBBVGACurrent = pDevice->abyBBVGA[0]; + if (priv->bUpdateBBVGA && + priv->byBBVGACurrent != priv->abyBBVGA[0]) { + priv->byBBVGACurrent = priv->abyBBVGA[0]; - BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent); + BBvSetVGAGainOffset(priv, priv->byBBVGACurrent); } /* clear NAV */ - MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MACCR, MACCR_CLRNAV); + MACvRegBitsOn(priv->PortOffset, MAC_REG_MACCR, MACCR_CLRNAV); /* TX_PE will reserve 3 us for MAX2829 A mode only, it is for better TX throughput */ - if (pDevice->byRFType == RF_AIROHA7230) - RFbAL7230SelectChannelPostProcess(pDevice, pDevice->byCurrentCh, + if (priv->byRFType == RF_AIROHA7230) + RFbAL7230SelectChannelPostProcess(priv, priv->byCurrentCh, ch->hw_value); - pDevice->byCurrentCh = ch->hw_value; - bResult &= RFbSelectChannel(pDevice, pDevice->byRFType, + priv->byCurrentCh = ch->hw_value; + bResult &= RFbSelectChannel(priv, priv->byRFType, ch->hw_value); /* Init Synthesizer Table */ - if (pDevice->bEnablePSMode) - RFvWriteWakeProgSyn(pDevice, pDevice->byRFType, ch->hw_value); + if (priv->bEnablePSMode) + RFvWriteWakeProgSyn(priv, priv->byRFType, ch->hw_value); - BBvSoftwareReset(pDevice); + BBvSoftwareReset(priv); - if (pDevice->byLocalID > REV_ID_VT3253_B1) { + if (priv->byLocalID > REV_ID_VT3253_B1) { unsigned long flags; - spin_lock_irqsave(&pDevice->lock, flags); + spin_lock_irqsave(&priv->lock, flags); /* set HW default power register */ - MACvSelectPage1(pDevice->PortOffset); - RFbSetPower(pDevice, RATE_1M, pDevice->byCurrentCh); - VNSvOutPortB(pDevice->PortOffset + MAC_REG_PWRCCK, - pDevice->byCurPwr); - RFbSetPower(pDevice, RATE_6M, pDevice->byCurrentCh); - VNSvOutPortB(pDevice->PortOffset + MAC_REG_PWROFDM, - pDevice->byCurPwr); - MACvSelectPage0(pDevice->PortOffset); - - spin_unlock_irqrestore(&pDevice->lock, flags); + MACvSelectPage1(priv->PortOffset); + RFbSetPower(priv, RATE_1M, priv->byCurrentCh); + VNSvOutPortB(priv->PortOffset + MAC_REG_PWRCCK, + priv->byCurPwr); + RFbSetPower(priv, RATE_6M, priv->byCurrentCh); + VNSvOutPortB(priv->PortOffset + MAC_REG_PWROFDM, + priv->byCurPwr); + MACvSelectPage0(priv->PortOffset); + + spin_unlock_irqrestore(&priv->lock, flags); } - if (pDevice->byBBType == BB_TYPE_11B) - RFbSetPower(pDevice, RATE_1M, pDevice->byCurrentCh); + if (priv->byBBType == BB_TYPE_11B) + RFbSetPower(priv, RATE_1M, priv->byCurrentCh); else - RFbSetPower(pDevice, RATE_6M, pDevice->byCurrentCh); + RFbSetPower(priv, RATE_6M, priv->byCurrentCh); return bResult; }