]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
Staging: rtxxx0: unify MlmeCheckPsmChange()
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sun, 16 Aug 2009 19:31:11 +0000 (21:31 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Sep 2009 19:02:19 +0000 (12:02 -0700)
Unify RT30xx and !RT30xx code in MlmeCheckPsmChange().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/rt2860/common/mlme.c

index d2f0a8be59ce43e2b6f6c9c6581fcd2c908037d5..b7bf17d756cf0bac54c931cddda3d56b4b9e51a2 100644 (file)
@@ -2771,44 +2771,19 @@ VOID MlmeCheckPsmChange(
                (pAd->StaCfg.Psm == PWR_ACTIVE) &&
 #ifdef RT2860
                RTMP_TEST_PSFLAG(pAd, fRTMP_PS_CAN_GO_SLEEP))
-#endif
-#if !defined(RT2860) && !defined(RT30xx)
+#else
                (pAd->Mlme.CntlMachine.CurrState == CNTL_IDLE))
 #endif
-#ifndef RT30xx
        {
-               NdisGetSystemUpTime(&pAd->Mlme.LastSendNULLpsmTime);
-               pAd->RalinkCounters.RxCountSinceLastNULL = 0;
-               MlmeSetPsmBit(pAd, PWR_SAVE);
-               if (!(pAd->CommonCfg.bAPSDCapable && pAd->CommonCfg.APEdcaParm.bAPSDCapable))
-               {
-                       RTMPSendNullFrame(pAd, pAd->CommonCfg.TxRate, FALSE);
-               }
-               else
-               {
-                       RTMPSendNullFrame(pAd, pAd->CommonCfg.TxRate, TRUE);
-               }
-       }
-#endif
 #ifdef RT30xx
-//             (! RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS))
-               (pAd->Mlme.CntlMachine.CurrState == CNTL_IDLE) /*&&
-               (pAd->RalinkCounters.OneSecTxNoRetryOkCount == 0) &&
-               (pAd->RalinkCounters.OneSecTxRetryOkCount == 0)*/)
-       {
                // add by johnli, use Rx OK data count per second to calculate throughput
                // If Ttraffic is too high ( > 400 Rx per second), don't go to sleep mode. If tx rate is low, use low criteria
                // Mode=CCK/MCS=3 => 11 Mbps, Mode=OFDM/MCS=3 => 18 Mbps
                if (((pAd->StaCfg.HTPhyMode.field.MCS <= 3) &&
-/* Iverson mark
-                               (pAd->StaCfg.HTPhyMode.field.MODE <= MODE_OFDM) &&
-*/
                                (pAd->RalinkCounters.OneSecRxOkDataCnt < (ULONG)100)) ||
                        ((pAd->StaCfg.HTPhyMode.field.MCS > 3) &&
-/* Iverson mark
-                       (pAd->StaCfg.HTPhyMode.field.MODE > MODE_OFDM) &&
-*/
                        (pAd->RalinkCounters.OneSecRxOkDataCnt < (ULONG)400)))
+#endif
                {
                                // Get this time
                        NdisGetSystemUpTime(&pAd->Mlme.LastSendNULLpsmTime);
@@ -2824,7 +2799,6 @@ VOID MlmeCheckPsmChange(
                        }
                }
        }
-#endif
 }
 
 // IRQL = PASSIVE_LEVEL