]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
staging: vt6656: mac80211 conversion: change vnt_next_tbtt_wakeup
authorMalcolm Priestley <tvboxspy@gmail.com>
Wed, 25 Jun 2014 20:14:31 +0000 (21:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2014 00:21:20 +0000 (20:21 -0400)
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/vt6656/power.c

index 6c34d365b93e070271d04bcea4bb375f5fae3411..ace0cba79dc54e5d227943031ea2c63ed11a6db1 100644 (file)
@@ -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;
 }
-