diff options
author | Malcolm Priestley <tvboxspy@gmail.com> | 2014-10-29 17:44:00 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-29 20:31:31 (GMT) |
commit | e24c235b5d5edf55a4d9413c01bc08f2138c4f42 (patch) | |
tree | d9876e83882be6464cfc2271222fd4550375e107 /drivers/staging/vt6655 | |
parent | b4bdf94d7dfb0146241185abafb26c3920cb7b33 (diff) | |
download | linux-e24c235b5d5edf55a4d9413c01bc08f2138c4f42.tar.xz |
staging: vt6655: mac80211 conversion: PSbIsNextTBTTWakeUp convert to mac80211
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/vt6655')
-rw-r--r-- | drivers/staging/vt6655/power.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/staging/vt6655/power.c b/drivers/staging/vt6655/power.c index fe33bb2..5371802 100644 --- a/drivers/staging/vt6655/power.c +++ b/drivers/staging/vt6655/power.c @@ -327,21 +327,14 @@ PSbIsNextTBTTWakeUp( ) { struct vnt_private *pDevice = hDeviceContext; - PSMgmtObject pMgmt = pDevice->pMgmt; + struct ieee80211_hw *hw = pDevice->hw; + struct ieee80211_conf *conf = &hw->conf; bool bWakeUp = false; - if (pMgmt->wListenInterval >= 2) { - if (pMgmt->wCountToWakeUp == 0) - pMgmt->wCountToWakeUp = pMgmt->wListenInterval; - - pMgmt->wCountToWakeUp--; - - if (pMgmt->wCountToWakeUp == 1) { - // Turn on wake up to listen next beacon - MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_LNBCN); - bWakeUp = true; - } - + if (conf->listen_interval == 1) { + /* Turn on wake up to listen next beacon */ + MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_LNBCN); + bWakeUp = true; } return bWakeUp; |