summaryrefslogtreecommitdiff
path: root/drivers/staging/vt6656/power.c
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2014-06-25 21:14:29 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-26 20:21:19 -0400
commitbbdf1bd4d85ba641eeff57ba46eec3bc4af5d322 (patch)
treecfce9c48af10cb41376b4448db4addba0b4e34d1 /drivers/staging/vt6656/power.c
parentee61fde2074fbcc7575e52206aba67853e0e56cc (diff)
staging: vt6656: mac80211 conversion: enable power saving
Convert vnt_enable_power_saving and vnt_disable_power_saving Remove mgmt->wCurrAID and use priv->current_aid We nolonger send the PSbSendNullPacket from vnt_enable_power_saving Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656/power.c')
-rw-r--r--drivers/staging/vt6656/power.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/drivers/staging/vt6656/power.c b/drivers/staging/vt6656/power.c
index cc281922b30c..6c34d365b93e 100644
--- a/drivers/staging/vt6656/power.c
+++ b/drivers/staging/vt6656/power.c
@@ -60,8 +60,7 @@ static int msglevel = MSG_LEVEL_INFO;
void vnt_enable_power_saving(struct vnt_private *priv, u16 listen_interval)
{
- struct vnt_manager *mgmt = &priv->vnt_mgmt;
- u16 aid = mgmt->wCurrAID | BIT14 | BIT15;
+ u16 aid = priv->current_aid | BIT(14) | BIT(15);
/* set period of power up before TBTT */
vnt_mac_write_word(priv, MAC_REG_PWBT, C_PWBT);
@@ -92,26 +91,12 @@ void vnt_enable_power_saving(struct vnt_private *priv, u16 listen_interval)
/* first time set listen next beacon */
vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_LNBCN);
-
- mgmt->wCountToWakeUp = listen_interval;
-
} else {
/* always listen beacon */
vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_ALBCN);
-
- mgmt->wCountToWakeUp = 0;
}
- priv->bEnablePSMode = true;
-
- /* We don't send null pkt in ad hoc mode
- * since beacon will handle this.
- */
- if (priv->op_mode == NL80211_IFTYPE_STATION)
- PSbSendNullPacket(priv);
-
- priv->bPWBitOn = true;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "PS:Power Saving Mode Enable...\n");
}
@@ -137,12 +122,6 @@ void vnt_disable_power_saving(struct vnt_private *priv)
/* set always listen beacon */
vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_ALBCN);
- priv->bEnablePSMode = false;
-
- if (priv->op_mode == NL80211_IFTYPE_STATION)
- PSbSendNullPacket(priv);
-
- priv->bPWBitOn = false;
}
/*