diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-08-16 21:31:11 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:02:19 -0700 |
commit | 003cb3c42a6ac4da982621efc2ac04a44d966527 (patch) | |
tree | c8d6b1e6f71507675bd439d7215b2470a4b92262 /drivers/staging/rt2860 | |
parent | 170ee4d26f70f322fdecee4cc3cb1794df2e7842 (diff) |
Staging: rtxxx0: unify MlmeCheckPsmChange()
Unify RT30xx and !RT30xx code in MlmeCheckPsmChange().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rt2860')
-rw-r--r-- | drivers/staging/rt2860/common/mlme.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/drivers/staging/rt2860/common/mlme.c b/drivers/staging/rt2860/common/mlme.c index d2f0a8be59c..b7bf17d756c 100644 --- a/drivers/staging/rt2860/common/mlme.c +++ b/drivers/staging/rt2860/common/mlme.c @@ -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 |