diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-08-23 15:32:06 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:02:23 -0700 |
commit | 9eeb783ed4a11d7eb82d0cb5d23cc214e3827c8d (patch) | |
tree | 77f8c138a7f0f825e95b88921a59ae96068b6226 /drivers/staging/rt2860/common/mlme.c | |
parent | 606661ea0476fb506ca87cd41b58cbb7dc14fcc0 (diff) |
Staging: rtxx70: merge rt3070 with rt2870
* remove RT30xx ifdefs
* add -DRT3070 to rt2870's EXTRA_CFLAGS
* because of changes in the way that hardware is initialized/accessed
rt3070 driver's firmware should be now also used by rt2870 driver
(this is also done by newer out-of-tree vendor driver versions, i.e.
2.1.0.0, historically in-kernel driver was based on 1.4.0.0 version)
* change RT28xx_CHIP_NAME to RTxx70
* update rt2870's help entry text
* add MODULE_ALIAS("rt3070sta") to rt2870
* update rt3070's dependencies
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rt2860/common/mlme.c')
-rw-r--r-- | drivers/staging/rt2860/common/mlme.c | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/drivers/staging/rt2860/common/mlme.c b/drivers/staging/rt2860/common/mlme.c index 9de5e240a497..61a2a4eb7140 100644 --- a/drivers/staging/rt2860/common/mlme.c +++ b/drivers/staging/rt2860/common/mlme.c @@ -5565,8 +5565,7 @@ VOID AsicUpdateProtect( } } -#ifdef RT30xx -// add by johnli, RF power sequence setup +#ifdef RT2870 /* ========================================================================== Description: @@ -5721,8 +5720,7 @@ VOID RT30xxReverseRFSleepModeSetup( RTMP_IO_WRITE32(pAd, LDO_CFG0, MACValue); } } -// end johnli -#endif // RT30xx // +#endif /* ========================================================================== @@ -5764,9 +5762,7 @@ VOID AsicSwitchChannel( #ifdef RT2870 // The RF programming sequence is difference between 3xxx and 2xxx if ((IS_RT3070(pAd) || IS_RT3090(pAd)) && ( -#ifdef RT30xx (pAd->RfIcType == RFIC_3022) || (pAd->RfIcType == RFIC_3021) || -#endif (pAd->RfIcType == RFIC_3020) || (pAd->RfIcType == RFIC_2020))) { /* modify by WY for Read RF Reg. error */ @@ -5789,7 +5785,6 @@ VOID AsicSwitchChannel( RFValue = (RFValue & 0xE0) | TxPwer; RT30xxWriteRFRegister(pAd, RF_R12, RFValue); -#ifdef RT30xx // Set Tx1 Power RT30xxReadRFRegister(pAd, RF_R13, &RFValue); RFValue = (RFValue & 0xE0) | TxPwer2; @@ -5809,7 +5804,6 @@ VOID AsicSwitchChannel( else if (pAd->Antenna.field.RxPath == 2) RFValue |= 0x40; RT30xxWriteRFRegister(pAd, RF_R01, RFValue); -#endif // Set RF offset RT30xxReadRFRegister(pAd, RF_R23, &RFValue); @@ -5827,9 +5821,8 @@ VOID AsicSwitchChannel( RFValue = pAd->Mlme.CaliBW20RfR24; } RT30xxWriteRFRegister(pAd, RF_R24, RFValue); -#ifdef RT30xx RT30xxWriteRFRegister(pAd, RF_R31, RFValue); -#endif + // Enable RF tuning RT30xxReadRFRegister(pAd, RF_R07, &RFValue); RFValue = RFValue | 0x1; @@ -5838,7 +5831,6 @@ VOID AsicSwitchChannel( // latch channel for future usage. pAd->LatchRfRegs.Channel = Channel; -#ifdef RT30xx DBGPRINT(RT_DEBUG_TRACE, ("SwitchChannel#%d(RF=%d, Pwr0=%d, Pwr1=%d, %dT), N=0x%02X, K=0x%02X, R=0x%02X\n", Channel, pAd->RfIcType, @@ -5848,8 +5840,6 @@ VOID AsicSwitchChannel( FreqItems3020[index].N, FreqItems3020[index].K, FreqItems3020[index].R)); -#endif - break; } } @@ -6828,13 +6818,13 @@ VOID AsicSetEdcaParm( Ac2Cfg.field.AcTxop = 5; } -#ifdef RT30xx +#ifdef RT2870 if (pAd->RfIcType == RFIC_3020 || pAd->RfIcType == RFIC_2020) { // Tuning for WiFi WMM S3-T07: connexant legacy sta ==> broadcom 11n sta. Ac2Cfg.field.Aifsn = 5; } -#endif // RT30xx // +#endif } Ac3Cfg.field.AcTxop = pEdcaParm->Txop[QID_AC_VO]; @@ -6915,11 +6905,10 @@ VOID AsicSetEdcaParm( } AifsnCsr.field.Aifsn3 = Ac3Cfg.field.Aifsn - 1; //pEdcaParm->Aifsn[QID_AC_VO]; //for TGn wifi test -#ifdef RT30xx +#ifdef RT2870 if (pAd->RfIcType == RFIC_3020 || pAd->RfIcType == RFIC_2020) AifsnCsr.field.Aifsn2 = 0x2; //pEdcaParm->Aifsn[QID_AC_VI]; //for WiFi WMM S4-T04. -#endif // RT30xx // - +#endif RTMP_IO_WRITE32(pAd, WMM_AIFSN_CFG, AifsnCsr.word); NdisMoveMemory(&pAd->CommonCfg.APEdcaParm, pEdcaParm, sizeof(EDCA_PARM)); @@ -8493,12 +8482,7 @@ VOID AsicStaBbpTuning( #ifdef RT2870 // RT3070 is a no LNA solution, it should have different control regarding to AGC gain control // Otherwise, it will have some throughput side effect when low RSSI -#ifndef RT30xx - if (IS_RT3070(pAd)) -#endif -#ifdef RT30xx if (IS_RT30xx(pAd)) -#endif { if (Rssi > RSSI_FOR_MID_LOW_SENSIBILITY) { |