]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: vt6655: mac80211 conversion: PSbIsNextTBTTWakeUp convert to mac80211
authorMalcolm Priestley <tvboxspy@gmail.com>
Wed, 29 Oct 2014 17:44:00 +0000 (17:44 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 20:31:31 +0000 (13:31 -0700)
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>
drivers/staging/vt6655/power.c

index fe33bb2fd7ff67fcbb0877dfbd7ec63846acc3a3..53718026910c25265dfc3e1ea87edb2a5da4f9ac 100644 (file)
@@ -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;