public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: "Greg Kroah-Hartman" <gregkh@suse.de>
Cc: devel@driverdev.osuosl.org,
	Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 13/22] Staging: rtxxx0: unify MlmeCheckPsmChange()
Date: Sun, 16 Aug 2009 21:31:11 +0200	[thread overview]
Message-ID: <20090816193111.3789.9342.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20090816192934.3789.3648.sendpatchset@localhost.localdomain>

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] Staging: rtxxx0: unify MlmeCheckPsmChange()

Unify RT30xx and !RT30xx code in MlmeCheckPsmChange().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.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

  parent reply	other threads:[~2009-08-16 19:38 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-16 19:29 [PATCH 00/22] Staging: rt{286,287,307}0: various fixes/cleanups Bartlomiej Zolnierkiewicz
2009-08-16 19:29 ` [PATCH 01/22] Staging: rt2870: duplicated code is executed twice in AsicEvaluateRxAnt() Bartlomiej Zolnierkiewicz
2009-08-16 19:29 ` [PATCH 02/22] Staging: rt3070: fix build warnings Bartlomiej Zolnierkiewicz
2009-08-16 19:29 ` [PATCH 03/22] Staging: rtxxx0: remove support for older wireless extensions Bartlomiej Zolnierkiewicz
2009-08-16 19:29 ` [PATCH 04/22] Staging: rtxxx0: remove dead platform specific code Bartlomiej Zolnierkiewicz
2009-08-16 19:30 ` [PATCH 05/22] Staging: rtxxx0: kill RT8270_USB_DEVICES() macro Bartlomiej Zolnierkiewicz
2009-08-16 19:30 ` [PATCH 06/22] Staging: rtxxx0: PID checking fixes Bartlomiej Zolnierkiewicz
2009-08-16 19:30 ` [PATCH 07/22] Staging: rt3070: kill TimerQThr thread first in RT28xxThreadTerminate() Bartlomiej Zolnierkiewicz
2009-08-16 19:30 ` [PATCH 08/22] Staging: rtxxx0: kill PID macros Bartlomiej Zolnierkiewicz
2009-08-16 19:30 ` [PATCH 09/22] Staging: rtxxx0: remove unused defines Bartlomiej Zolnierkiewicz
2009-08-16 19:30 ` [PATCH 10/22] Staging: rtxxx0: unify different RT30xx{Read,Write}RFRegister() flavors Bartlomiej Zolnierkiewicz
2009-08-16 19:30 ` [PATCH 11/22] Staging: rtxxx0: remove superfluous RT30xx ifdefs Bartlomiej Zolnierkiewicz
2009-08-16 19:31 ` [PATCH 12/22] Staging: rtxxx0: unify RT{USB,MP}FilterCalibration() Bartlomiej Zolnierkiewicz
2009-08-16 19:31 ` Bartlomiej Zolnierkiewicz [this message]
2009-08-16 19:31 ` [PATCH 14/22] Staging: rtxxx0: unify AsicEvaluateRxAnt() Bartlomiej Zolnierkiewicz
2009-08-16 19:31 ` [PATCH 15/22] Staging: rtxxx0: remove dead DBG_DIAGNOSE code Bartlomiej Zolnierkiewicz
2009-08-16 19:31 ` [PATCH 16/22] Staging: rtxxx0: remove dead virtual adapter support Bartlomiej Zolnierkiewicz
2009-08-16 19:31 ` [PATCH 17/22] Staging: rtxxx0: debug messages fixes Bartlomiej Zolnierkiewicz
2009-08-16 19:31 ` [PATCH 18/22] Staging: rtxxx0: remove unused link_list.h Bartlomiej Zolnierkiewicz
2009-08-16 19:31 ` [PATCH 19/22] Staging: rtxxx0: remove superfluous function prototypes Bartlomiej Zolnierkiewicz
2009-08-16 19:31 ` [PATCH 20/22] Staging: rtxxx0: remove private debugging ioctls Bartlomiej Zolnierkiewicz
2009-08-16 19:32 ` [PATCH 21/22] Staging: rtxxx0: remove private ioctls Bartlomiej Zolnierkiewicz
2009-08-16 19:32 ` [PATCH 22/22] Staging: rtxxx0: remove unused code Bartlomiej Zolnierkiewicz
2009-08-17  3:47 ` [PATCH 00/22] Staging: rt{286,287,307}0: various fixes/cleanups Mike Galbraith
2009-08-17  3:57   ` Mike Galbraith
2009-08-17  4:20     ` Greg KH
2009-08-19 19:25   ` Bartlomiej Zolnierkiewicz
2009-08-20  5:44     ` Mike Galbraith
2009-08-23 13:18       ` Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090816193111.3789.9342.sendpatchset@localhost.localdomain \
    --to=bzolnier@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox