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 14/22] Staging: rtxxx0: unify AsicEvaluateRxAnt()
Date: Sun, 16 Aug 2009 21:31:17 +0200 [thread overview]
Message-ID: <20090816193117.3789.76517.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20090816192934.3789.3648.sendpatchset@localhost.localdomain>
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] Staging: rtxxx0: unify AsicEvaluateRxAnt()
Unify RT30xx and !RT30xx code in AsicEvaluateRxAnt().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/staging/rt2860/common/mlme.c | 63 ++++++++---------------------------
1 file changed, 15 insertions(+), 48 deletions(-)
Index: b/drivers/staging/rt2860/common/mlme.c
===================================================================
--- a/drivers/staging/rt2860/common/mlme.c
+++ b/drivers/staging/rt2860/common/mlme.c
@@ -8252,56 +8252,19 @@ VOID AsicEvaluateRxAnt(
{
UCHAR BBPR3 = 0;
-#ifndef RT30xx
- {
- if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RESET_IN_PROGRESS |
- fRTMP_ADAPTER_HALT_IN_PROGRESS |
- fRTMP_ADAPTER_RADIO_OFF |
- fRTMP_ADAPTER_NIC_NOT_EXIST |
- fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS))
- return;
-
- if (pAd->StaCfg.Psm == PWR_SAVE)
+ if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RESET_IN_PROGRESS |
+ fRTMP_ADAPTER_HALT_IN_PROGRESS |
+ fRTMP_ADAPTER_RADIO_OFF |
+ fRTMP_ADAPTER_NIC_NOT_EXIST |
+ fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS)
+#ifdef RT30xx
+ || OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE)
+ || (pAd->EepromAccess)
+#endif
+ )
return;
- }
- RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R3, &BBPR3);
- BBPR3 &= (~0x18);
- if(pAd->Antenna.field.RxPath == 3)
- {
- BBPR3 |= (0x10);
- }
- else if(pAd->Antenna.field.RxPath == 2)
- {
- BBPR3 |= (0x8);
- }
- else if(pAd->Antenna.field.RxPath == 1)
- {
- BBPR3 |= (0x0);
- }
- RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, BBPR3);
-
-#ifdef RT2860
- pAd->StaCfg.BBPR3 = BBPR3;
-#endif
-#endif /* RT30xx */
#ifdef RT30xx
- if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RESET_IN_PROGRESS |
- fRTMP_ADAPTER_HALT_IN_PROGRESS |
- fRTMP_ADAPTER_RADIO_OFF |
- fRTMP_ADAPTER_NIC_NOT_EXIST |
- fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS) ||
- OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE)
- || (pAd->EepromAccess)
- )
- return;
-
-
- {
- //if (pAd->StaCfg.Psm == PWR_SAVE)
- // return;
- }
-
// two antenna selection mechanism- one is antenna diversity, the other is failed antenna remove
// one is antenna diversity:there is only one antenna can rx and tx
// the other is failed antenna remove:two physical antenna can rx and tx
@@ -8324,6 +8287,7 @@ VOID AsicEvaluateRxAnt(
RTMPSetTimer(&pAd->Mlme.RxAntEvalTimer, 300);
}
else
+#endif
{
if (pAd->StaCfg.Psm == PWR_SAVE)
return;
@@ -8343,8 +8307,11 @@ VOID AsicEvaluateRxAnt(
BBPR3 |= (0x0);
}
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, BBPR3);
+
+#ifdef RT2860
+ pAd->StaCfg.BBPR3 = BBPR3;
+#endif
}
-#endif /* RT30xx */
if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED)
)
next prev parent reply other threads:[~2009-08-16 19:31 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 ` [PATCH 13/22] Staging: rtxxx0: unify MlmeCheckPsmChange() Bartlomiej Zolnierkiewicz
2009-08-16 19:31 ` Bartlomiej Zolnierkiewicz [this message]
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=20090816193117.3789.76517.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