[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090816193111.3789.9342.sendpatchset@localhost.localdomain>
Date: Sun, 16 Aug 2009 21:31:11 +0200
From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To: "Greg Kroah-Hartman" <gregkh@...e.de>
Cc: devel@...verdev.osuosl.org,
Bartlomiej Zolnierkiewicz <bzolnier@...il.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 13/22] Staging: rtxxx0: unify MlmeCheckPsmChange()
From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
Subject: [PATCH] Staging: rtxxx0: unify MlmeCheckPsmChange()
Unify RT30xx and !RT30xx code in MlmeCheckPsmChange().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
---
drivers/staging/rt2860/common/mlme.c | 30 ++----------------------------
1 file changed, 2 insertions(+), 28 deletions(-)
Index: b/drivers/staging/rt2860/common/mlme.c
===================================================================
--- 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists