summaryrefslogtreecommitdiff
path: root/drivers/staging/vt6655
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2014-10-29 17:43:50 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-29 20:31:30 (GMT)
commite99d357c6f87c8ab0c118150e533443be8e4988b (patch)
treeb6de6da4d852b6943e9bac16d300d895d798d6c2 /drivers/staging/vt6655
parentb956374239481f62014bfb27f7ecb0f804e5029b (diff)
downloadlinux-e99d357c6f87c8ab0c118150e533443be8e4988b.tar.xz
staging: vt6655: mac80211 conversion: enable power saving
Convert PSvEnablePowerSaving and PSvEnablePowerSaving Remove mgmt->wCurrAID and use pDevice->current_aid We nolonger send the PSbSendNullPacket. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655')
-rw-r--r--drivers/staging/vt6655/power.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/staging/vt6655/power.c b/drivers/staging/vt6655/power.c
index 08241b9..fe33bb2 100644
--- a/drivers/staging/vt6655/power.c
+++ b/drivers/staging/vt6655/power.c
@@ -73,8 +73,7 @@ PSvEnablePowerSaving(
)
{
struct vnt_private *pDevice = hDeviceContext;
- PSMgmtObject pMgmt = pDevice->pMgmt;
- unsigned short wAID = pMgmt->wCurrAID | BIT14 | BIT15;
+ u16 wAID = pDevice->current_aid | BIT(14) | BIT(15);
// set period of power up before TBTT
VNSvOutPortW(pDevice->PortOffset + MAC_REG_PWBT, C_PWBT);
@@ -83,7 +82,9 @@ PSvEnablePowerSaving(
VNSvOutPortW(pDevice->PortOffset + MAC_REG_AIDATIM, wAID);
} else {
// set ATIM Window
+#if 0 /* TODO atim window */
MACvWriteATIMW(pDevice->PortOffset, pMgmt->wCurrATIMWindow);
+#endif
}
// Set AutoSleep
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCFG, PSCFG_AUTOSLEEP);
@@ -95,22 +96,15 @@ PSvEnablePowerSaving(
MACvRegBitsOff(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_ALBCN);
// first time set listen next beacon
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_LNBCN);
- pMgmt->wCountToWakeUp = wListenInterval;
} else {
// always listen beacon
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_ALBCN);
- pMgmt->wCountToWakeUp = 0;
}
// enable power saving hw function
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_PSEN);
pDevice->bEnablePSMode = true;
- /* We don't send null pkt in ad hoc mode since beacon will handle this. */
- if (pDevice->op_mode != NL80211_IFTYPE_ADHOC &&
- pDevice->op_mode == NL80211_IFTYPE_STATION)
- PSbSendNullPacket(pDevice);
-
pDevice->bPWBitOn = true;
pr_debug("PS:Power Saving Mode Enable...\n");
}
@@ -143,9 +137,6 @@ PSvDisablePowerSaving(
pDevice->bEnablePSMode = false;
- if (pDevice->op_mode == NL80211_IFTYPE_STATION)
- PSbSendNullPacket(pDevice);
-
pDevice->bPWBitOn = false;
}