Commit 16d56de6 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6655: power.c replace pDevice with priv

Removing camel case.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9a012c42
...@@ -68,40 +68,40 @@ PSvEnablePowerSaving( ...@@ -68,40 +68,40 @@ PSvEnablePowerSaving(
unsigned short wListenInterval unsigned short wListenInterval
) )
{ {
struct vnt_private *pDevice = hDeviceContext; struct vnt_private *priv = hDeviceContext;
u16 wAID = pDevice->current_aid | BIT(14) | BIT(15); u16 wAID = priv->current_aid | BIT(14) | BIT(15);
/* set period of power up before TBTT */ /* set period of power up before TBTT */
VNSvOutPortW(pDevice->PortOffset + MAC_REG_PWBT, C_PWBT); VNSvOutPortW(priv->PortOffset + MAC_REG_PWBT, C_PWBT);
if (pDevice->op_mode != NL80211_IFTYPE_ADHOC) { if (priv->op_mode != NL80211_IFTYPE_ADHOC) {
/* set AID */ /* set AID */
VNSvOutPortW(pDevice->PortOffset + MAC_REG_AIDATIM, wAID); VNSvOutPortW(priv->PortOffset + MAC_REG_AIDATIM, wAID);
} else { } else {
/* set ATIM Window */ /* set ATIM Window */
#if 0 /* TODO atim window */ #if 0 /* TODO atim window */
MACvWriteATIMW(pDevice->PortOffset, pMgmt->wCurrATIMWindow); MACvWriteATIMW(priv->PortOffset, pMgmt->wCurrATIMWindow);
#endif #endif
} }
/* Set AutoSleep */ /* Set AutoSleep */
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCFG, PSCFG_AUTOSLEEP); MACvRegBitsOn(priv->PortOffset, MAC_REG_PSCFG, PSCFG_AUTOSLEEP);
/* Set HWUTSF */ /* Set HWUTSF */
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TFTCTL, TFTCTL_HWUTSF); MACvRegBitsOn(priv->PortOffset, MAC_REG_TFTCTL, TFTCTL_HWUTSF);
if (wListenInterval >= 2) { if (wListenInterval >= 2) {
/* clear always listen beacon */ /* 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 */ /* first time set listen next beacon */
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_LNBCN); MACvRegBitsOn(priv->PortOffset, MAC_REG_PSCTL, PSCTL_LNBCN);
} else { } else {
/* always listen beacon */ /* always listen beacon */
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_ALBCN); MACvRegBitsOn(priv->PortOffset, MAC_REG_PSCTL, PSCTL_ALBCN);
} }
/* enable power saving hw function */ /* enable power saving hw function */
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_PSEN); MACvRegBitsOn(priv->PortOffset, MAC_REG_PSCTL, PSCTL_PSEN);
pDevice->bEnablePSMode = true; priv->bEnablePSMode = true;
pDevice->bPWBitOn = true; priv->bPWBitOn = true;
pr_debug("PS:Power Saving Mode Enable...\n"); pr_debug("PS:Power Saving Mode Enable...\n");
} }
...@@ -120,20 +120,20 @@ PSvDisablePowerSaving( ...@@ -120,20 +120,20 @@ PSvDisablePowerSaving(
void *hDeviceContext void *hDeviceContext
) )
{ {
struct vnt_private *pDevice = hDeviceContext; struct vnt_private *priv = hDeviceContext;
/* disable power saving hw function */ /* disable power saving hw function */
MACbPSWakeup(pDevice->PortOffset); MACbPSWakeup(priv->PortOffset);
/* clear AutoSleep */ /* clear AutoSleep */
MACvRegBitsOff(pDevice->PortOffset, MAC_REG_PSCFG, PSCFG_AUTOSLEEP); MACvRegBitsOff(priv->PortOffset, MAC_REG_PSCFG, PSCFG_AUTOSLEEP);
/* clear HWUTSF */ /* clear HWUTSF */
MACvRegBitsOff(pDevice->PortOffset, MAC_REG_TFTCTL, TFTCTL_HWUTSF); MACvRegBitsOff(priv->PortOffset, MAC_REG_TFTCTL, TFTCTL_HWUTSF);
/* set always listen beacon */ /* 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( ...@@ -152,20 +152,20 @@ PSbIsNextTBTTWakeUp(
void *hDeviceContext void *hDeviceContext
) )
{ {
struct vnt_private *pDevice = hDeviceContext; struct vnt_private *priv = hDeviceContext;
struct ieee80211_hw *hw = pDevice->hw; struct ieee80211_hw *hw = priv->hw;
struct ieee80211_conf *conf = &hw->conf; struct ieee80211_conf *conf = &hw->conf;
bool bWakeUp = false; bool bWakeUp = false;
if (conf->listen_interval > 1) { if (conf->listen_interval > 1) {
if (!pDevice->wake_up_count) if (!priv->wake_up_count)
pDevice->wake_up_count = conf->listen_interval; 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 */ /* Turn on wake up to listen next beacon */
MACvRegBitsOn(pDevice->PortOffset, MACvRegBitsOn(priv->PortOffset,
MAC_REG_PSCTL, PSCTL_LNBCN); MAC_REG_PSCTL, PSCTL_LNBCN);
bWakeUp = true; bWakeUp = true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment