diff options
author | Malcolm Priestley <tvboxspy@gmail.com> | 2014-06-25 21:14:31 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-26 20:21:20 -0400 |
commit | f7c7f7f268b7aeee6ae5352596078ee6bf21d2fe (patch) | |
tree | 0d6c44e3ae2676e7c138addf4ba6c3d2bfa0af17 /drivers/staging | |
parent | f31a67ae11b02638eb53838015f62c6aaff634ee (diff) |
staging: vt6656: mac80211 conversion: change vnt_next_tbtt_wakeup
Wake up to listen to next beacon when struct ieee80211_conf -> listen_interval == 1
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/vt6656/power.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/drivers/staging/vt6656/power.c b/drivers/staging/vt6656/power.c index 6c34d365b93e..ace0cba79dc5 100644 --- a/drivers/staging/vt6656/power.c +++ b/drivers/staging/vt6656/power.c @@ -293,25 +293,15 @@ int PSbSendNullPacket(struct vnt_private *pDevice) int vnt_next_tbtt_wakeup(struct vnt_private *priv) { - struct vnt_manager *mgmt = &priv->vnt_mgmt; + struct ieee80211_hw *hw = priv->hw; + struct ieee80211_conf *conf = &hw->conf; int wake_up = false; - if (mgmt->wListenInterval >= 2) { - if (mgmt->wCountToWakeUp == 0) - mgmt->wCountToWakeUp = mgmt->wListenInterval; - - mgmt->wCountToWakeUp--; - - if (mgmt->wCountToWakeUp == 1) { - /* Turn on wake up to listen next beacon */ - vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_LNBCN); - priv->bPSRxBeacon = false; - wake_up = true; - } else if (!priv->bPSRxBeacon) { - /* Listen until RxBeacon */ - vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_LNBCN); - } + if (conf->listen_interval == 1) { + /* Turn on wake up to listen next beacon */ + vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_LNBCN); + wake_up = true; } + return wake_up; } - |