From patchwork Sun Nov 22 09:07:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 7675791 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B46829F1C2 for ; Sun, 22 Nov 2015 09:08:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BD03620660 for ; Sun, 22 Nov 2015 09:08:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E54920668 for ; Sun, 22 Nov 2015 09:08:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751624AbbKVJI2 (ORCPT ); Sun, 22 Nov 2015 04:08:28 -0500 Received: from mail-wm0-f54.google.com ([74.125.82.54]:33378 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751318AbbKVJIM (ORCPT ); Sun, 22 Nov 2015 04:08:12 -0500 Received: by wmec201 with SMTP id c201so123235576wme.0 for ; Sun, 22 Nov 2015 01:08:11 -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:in-reply-to:references; bh=PPlmoXIbk/Ruk8pHbgwkJ58YM2D2m4GQDwrW8oNlf08=; b=XUvzkTxZ07pTFrwCfrVCmZ4+0W9HxyLtmHgq0xUTlgUO1+FnmvqEebEwJPuF5Cxs7Q Pp5isL6beL4IfzNZDyjTzJhBFWcAaKgXaboMQvUGXOubAtTCw7dGByXL5LyHrYEcpWIS hEYizq1efQyBwr4/oeKQLGpb0vO+e2oMenJgwCybOhqHr1lmdgV+Aq73YoIvK39K6cJN 0XcuKzq4pOu4rJzmZpczr1WR9gXXQ7HUnePFPyxXp0lXu0og0ED3PAdWGQ4otALU+diI PFrslrSlbY1+Ie8LTejKsH6Vg3L4fJWrI4HCr/z8o+wHEHCBU00rhJPxihQMVITcdUe0 LdAA== X-Received: by 10.194.78.162 with SMTP id c2mr28959295wjx.112.1448183291105; Sun, 22 Nov 2015 01:08:11 -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.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 22 Nov 2015 01:08:10 -0800 (PST) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, Malcolm Priestley Subject: [PATCH 5/8] staging: vt6655: power.c replace pDevice with priv Date: Sun, 22 Nov 2015 09:07:19 +0000 Message-Id: <1448183242-3397-5-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1448183242-3397-1-git-send-email-tvboxspy@gmail.com> References: <1448183242-3397-1-git-send-email-tvboxspy@gmail.com> 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/power.c | 56 +++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/drivers/staging/vt6655/power.c b/drivers/staging/vt6655/power.c index 06e6b9d..e58afbd 100644 --- a/drivers/staging/vt6655/power.c +++ b/drivers/staging/vt6655/power.c @@ -68,40 +68,40 @@ PSvEnablePowerSaving( unsigned short wListenInterval ) { - struct vnt_private *pDevice = hDeviceContext; - u16 wAID = pDevice->current_aid | BIT(14) | BIT(15); + struct vnt_private *priv = hDeviceContext; + u16 wAID = priv->current_aid | BIT(14) | BIT(15); /* set period of power up before TBTT */ - VNSvOutPortW(pDevice->PortOffset + MAC_REG_PWBT, C_PWBT); - if (pDevice->op_mode != NL80211_IFTYPE_ADHOC) { + VNSvOutPortW(priv->PortOffset + MAC_REG_PWBT, C_PWBT); + if (priv->op_mode != NL80211_IFTYPE_ADHOC) { /* set AID */ - VNSvOutPortW(pDevice->PortOffset + MAC_REG_AIDATIM, wAID); + VNSvOutPortW(priv->PortOffset + MAC_REG_AIDATIM, wAID); } else { /* set ATIM Window */ #if 0 /* TODO atim window */ - MACvWriteATIMW(pDevice->PortOffset, pMgmt->wCurrATIMWindow); + MACvWriteATIMW(priv->PortOffset, pMgmt->wCurrATIMWindow); #endif } /* Set AutoSleep */ - MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCFG, PSCFG_AUTOSLEEP); + MACvRegBitsOn(priv->PortOffset, MAC_REG_PSCFG, PSCFG_AUTOSLEEP); /* Set HWUTSF */ - MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TFTCTL, TFTCTL_HWUTSF); + MACvRegBitsOn(priv->PortOffset, MAC_REG_TFTCTL, TFTCTL_HWUTSF); if (wListenInterval >= 2) { /* clear always listen beacon */ - MACvRegBitsOff(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_ALBCN); + MACvRegBitsOff(priv->PortOffset, MAC_REG_PSCTL, PSCTL_ALBCN); /* first time set listen next beacon */ - MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_LNBCN); + MACvRegBitsOn(priv->PortOffset, MAC_REG_PSCTL, PSCTL_LNBCN); } else { /* always listen beacon */ - MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_ALBCN); + MACvRegBitsOn(priv->PortOffset, MAC_REG_PSCTL, PSCTL_ALBCN); } /* enable power saving hw function */ - MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_PSEN); - pDevice->bEnablePSMode = true; + MACvRegBitsOn(priv->PortOffset, MAC_REG_PSCTL, PSCTL_PSEN); + priv->bEnablePSMode = true; - pDevice->bPWBitOn = true; + priv->bPWBitOn = true; pr_debug("PS:Power Saving Mode Enable...\n"); } @@ -120,20 +120,20 @@ PSvDisablePowerSaving( void *hDeviceContext ) { - struct vnt_private *pDevice = hDeviceContext; + struct vnt_private *priv = hDeviceContext; /* disable power saving hw function */ - MACbPSWakeup(pDevice->PortOffset); + MACbPSWakeup(priv->PortOffset); /* clear AutoSleep */ - MACvRegBitsOff(pDevice->PortOffset, MAC_REG_PSCFG, PSCFG_AUTOSLEEP); + MACvRegBitsOff(priv->PortOffset, MAC_REG_PSCFG, PSCFG_AUTOSLEEP); /* clear HWUTSF */ - MACvRegBitsOff(pDevice->PortOffset, MAC_REG_TFTCTL, TFTCTL_HWUTSF); + MACvRegBitsOff(priv->PortOffset, MAC_REG_TFTCTL, TFTCTL_HWUTSF); /* set always listen beacon */ - MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_ALBCN); + MACvRegBitsOn(priv->PortOffset, MAC_REG_PSCTL, PSCTL_ALBCN); - pDevice->bEnablePSMode = false; + priv->bEnablePSMode = false; - pDevice->bPWBitOn = false; + priv->bPWBitOn = false; } @@ -152,20 +152,20 @@ PSbIsNextTBTTWakeUp( void *hDeviceContext ) { - struct vnt_private *pDevice = hDeviceContext; - struct ieee80211_hw *hw = pDevice->hw; + struct vnt_private *priv = hDeviceContext; + struct ieee80211_hw *hw = priv->hw; struct ieee80211_conf *conf = &hw->conf; bool bWakeUp = false; if (conf->listen_interval > 1) { - if (!pDevice->wake_up_count) - pDevice->wake_up_count = conf->listen_interval; + if (!priv->wake_up_count) + priv->wake_up_count = conf->listen_interval; - --pDevice->wake_up_count; + --priv->wake_up_count; - if (pDevice->wake_up_count == 1) { + if (priv->wake_up_count == 1) { /* Turn on wake up to listen next beacon */ - MACvRegBitsOn(pDevice->PortOffset, + MACvRegBitsOn(priv->PortOffset, MAC_REG_PSCTL, PSCTL_LNBCN); bWakeUp = true; }