diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-08-23 15:32:00 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:02:23 -0700 |
commit | 606661ea0476fb506ca87cd41b58cbb7dc14fcc0 (patch) | |
tree | dcf094669924ed995bfa6d0f78d6643364538d22 /drivers/staging/rt2860/common | |
parent | Staging: rt2870: add eFuse support (diff) | |
download | linux-dev-606661ea0476fb506ca87cd41b58cbb7dc14fcc0.tar.xz linux-dev-606661ea0476fb506ca87cd41b58cbb7dc14fcc0.zip |
Staging: rt2870: add Antenna Diversity support
rt3070:
* remove non-working AntDiversity config parameter
* remove unused bRxAntDiversity field from COMMON_CONFIG
rt2870:
* propagate Antenna Diversity support from rt3070
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rt2860/common')
-rw-r--r-- | drivers/staging/rt2860/common/eeprom.c | 16 | ||||
-rw-r--r-- | drivers/staging/rt2860/common/mlme.c | 10 | ||||
-rw-r--r-- | drivers/staging/rt2860/common/rtmp_init.c | 2 |
3 files changed, 10 insertions, 18 deletions
diff --git a/drivers/staging/rt2860/common/eeprom.c b/drivers/staging/rt2860/common/eeprom.c index fb5e52a00bfd..ffcb4ce1a034 100644 --- a/drivers/staging/rt2860/common/eeprom.c +++ b/drivers/staging/rt2860/common/eeprom.c @@ -181,14 +181,11 @@ USHORT RTMP_EEPROM_READ16( UINT32 x; USHORT data; -#ifdef RT30xx +#ifdef RT2870 if (pAd->NicConfig2.field.AntDiversity) { pAd->EepromAccess = TRUE; } -//2008/09/11:KH add to support efuse<-- -//2008/09/11:KH add to support efuse--> -{ #endif Offset /= 2; // reset bits and set EECS @@ -214,7 +211,7 @@ USHORT RTMP_EEPROM_READ16( EEpromCleanup(pAd); -#ifdef RT30xx +#ifdef RT2870 // Antenna and EEPROM access are both using EESK pin, // Therefor we should avoid accessing EESK at the same time // Then restore antenna after EEPROM access @@ -223,7 +220,6 @@ USHORT RTMP_EEPROM_READ16( pAd->EepromAccess = FALSE; AsicSetRxAnt(pAd, pAd->RxAnt.Pair1PrimaryRxAnt); } -} #endif return data; } //ReadEEprom @@ -235,14 +231,11 @@ VOID RTMP_EEPROM_WRITE16( { UINT32 x; -#ifdef RT30xx +#ifdef RT2870 if (pAd->NicConfig2.field.AntDiversity) { pAd->EepromAccess = TRUE; } - //2008/09/11:KH add to support efuse<-- -//2008/09/11:KH add to support efuse--> - { #endif Offset /= 2; @@ -278,7 +271,7 @@ VOID RTMP_EEPROM_WRITE16( EEpromCleanup(pAd); -#ifdef RT30xx +#ifdef RT2870 // Antenna and EEPROM access are both using EESK pin, // Therefor we should avoid accessing EESK at the same time // Then restore antenna after EEPROM access @@ -287,7 +280,6 @@ VOID RTMP_EEPROM_WRITE16( pAd->EepromAccess = FALSE; AsicSetRxAnt(pAd, pAd->RxAnt.Pair1PrimaryRxAnt); } -} #endif } diff --git a/drivers/staging/rt2860/common/mlme.c b/drivers/staging/rt2860/common/mlme.c index d0a3b6b70feb..9de5e240a497 100644 --- a/drivers/staging/rt2860/common/mlme.c +++ b/drivers/staging/rt2860/common/mlme.c @@ -8004,7 +8004,7 @@ CHAR RTMPMaxRssi( return larger; } -#ifdef RT30xx +#ifdef RT2870 // Antenna divesity use GPIO3 and EESK pin for control // Antenna and EEPROM access are both using EESK pin, // Therefor we should avoid accessing EESK at the same time @@ -8052,7 +8052,7 @@ VOID AsicSetRxAnt( DBGPRINT_RAW(RT_DEBUG_TRACE, ("AsicSetRxAnt, switch to aux antenna\n")); } } -#endif /* RT30xx */ +#endif /* ======================================================================== @@ -8078,7 +8078,7 @@ VOID AsicEvaluateRxAnt( fRTMP_ADAPTER_NIC_NOT_EXIST | fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS) || OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE) -#ifdef RT30xx +#ifdef RT2870 || (pAd->EepromAccess) #endif ) @@ -8182,9 +8182,9 @@ VOID AsicRxAntEvalTimeout( fRTMP_ADAPTER_RADIO_OFF | fRTMP_ADAPTER_NIC_NOT_EXIST) || OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE) -#ifdef RT30xx +#ifdef RT2870 || (pAd->EepromAccess) -#endif // RT30xx // +#endif ) return; diff --git a/drivers/staging/rt2860/common/rtmp_init.c b/drivers/staging/rt2860/common/rtmp_init.c index df0e1e9a8d2d..e6a43b645022 100644 --- a/drivers/staging/rt2860/common/rtmp_init.c +++ b/drivers/staging/rt2860/common/rtmp_init.c @@ -3416,7 +3416,7 @@ VOID UserCfgInit( } } -#ifdef RT30xx +#ifdef RT2870 pAd->EepromAccess = FALSE; #endif pAd->Antenna.word = 0; |