diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-04-26 16:06:16 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-19 11:00:49 -0700 |
commit | 12e95a6366cbf30341e0e4330c04c6b6d8895f16 (patch) | |
tree | 39ad31d7b2ec0539c258b2ee5f95115ac553b232 /drivers/staging/rt3070/common/mlme.c | |
parent | ac7e7d5a88b9db7b7557e22893cdf94013fafa31 (diff) |
Staging: rt3070: remove dead code
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rt3070/common/mlme.c')
-rw-r--r-- | drivers/staging/rt3070/common/mlme.c | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/drivers/staging/rt3070/common/mlme.c b/drivers/staging/rt3070/common/mlme.c index dda4cc3127a..a814fbba302 100644 --- a/drivers/staging/rt3070/common/mlme.c +++ b/drivers/staging/rt3070/common/mlme.c @@ -243,19 +243,11 @@ UCHAR RateSwitchTable11BGN3S[] = { // 3*3 0x02, 0x21, 2, 20, 50, 0x03, 0x21, 3, 20, 50, 0x04, 0x21, 4, 15, 50, -#if 1 0x05, 0x20, 20, 15, 30, 0x06, 0x20, 21, 8, 20, 0x07, 0x20, 22, 8, 20, 0x08, 0x20, 23, 8, 25, 0x09, 0x22, 23, 8, 25, -#else // for RT2860 2*3 test - 0x05, 0x20, 12, 15, 30, - 0x06, 0x20, 13, 8, 20, - 0x07, 0x20, 14, 8, 20, - 0x08, 0x20, 15, 8, 25, - 0x09, 0x22, 15, 8, 25, -#endif }; UCHAR RateSwitchTable11BGN2SForABand[] = { @@ -839,8 +831,6 @@ VOID MlmePeriodicExec( rx_Total = 0; } - //ORIBATimerTimeout(pAd); - // Media status changed, report to NDIS if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_MEDIA_STATE_CHANGE)) { @@ -990,8 +980,6 @@ VOID STAMlmePeriodicExec( DBGPRINT(RT_DEBUG_TRACE, ("MMCHK - No BEACON. restore R66 to the low bound(%d) \n", (0x2E + GET_LNA_GAIN(pAd)))); } - //if ((pAd->RalinkCounters.OneSecTxNoRetryOkCount == 0) && - // (pAd->RalinkCounters.OneSecTxRetryOkCount == 0)) { if (pAd->CommonCfg.bAPSDCapable && pAd->CommonCfg.APEdcaParm.bAPSDCapable) { @@ -1027,7 +1015,6 @@ VOID STAMlmePeriodicExec( wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL); } - // RTMPPatchMacBbpBug(pAd); MlmeAutoReconnectLastSSID(pAd); } else if (CQI_IS_BAD(pAd->Mlme.ChannelQuality)) @@ -1307,8 +1294,6 @@ VOID MlmeSelectTxRateTable( break; } - //if ((pAd->StaActive.SupRateLen + pAd->StaActive.ExtRateLen == 12) && (pAd->StaActive.SupportedPhyInfo.MCSSet[0] == 0xff) && - // ((pAd->StaActive.SupportedPhyInfo.MCSSet[1] == 0x00) || (pAd->Antenna.field.TxPath == 1))) if ((pEntry->RateLen == 12) && (pEntry->HTCapability.MCSSet[0] == 0xff) && ((pEntry->HTCapability.MCSSet[1] == 0x00) || (pAd->CommonCfg.TxStream == 1))) {// 11BGN 1S AP @@ -1319,8 +1304,6 @@ VOID MlmeSelectTxRateTable( break; } - //else if ((pAd->StaActive.SupRateLen + pAd->StaActive.ExtRateLen == 12) && (pAd->StaActive.SupportedPhyInfo.MCSSet[0] == 0xff) && - // (pAd->StaActive.SupportedPhyInfo.MCSSet[1] == 0xff) && (pAd->Antenna.field.TxPath == 2)) if ((pEntry->RateLen == 12) && (pEntry->HTCapability.MCSSet[0] == 0xff) && (pEntry->HTCapability.MCSSet[1] == 0xff) && (pAd->CommonCfg.TxStream == 2)) {// 11BGN 2S AP @@ -1341,7 +1324,6 @@ VOID MlmeSelectTxRateTable( break; } - //else if ((pAd->StaActive.SupportedPhyInfo.MCSSet[0] == 0xff) && ((pAd->StaActive.SupportedPhyInfo.MCSSet[1] == 0x00) || (pAd->Antenna.field.TxPath == 1))) if ((pEntry->HTCapability.MCSSet[0] == 0xff) && ((pEntry->HTCapability.MCSSet[1] == 0x00) || (pAd->CommonCfg.TxStream == 1))) {// 11N 1S AP *ppTable = RateSwitchTable11N1S; @@ -1351,7 +1333,6 @@ VOID MlmeSelectTxRateTable( break; } - //else if ((pAd->StaActive.SupportedPhyInfo.MCSSet[0] == 0xff) && (pAd->StaActive.SupportedPhyInfo.MCSSet[1] == 0xff) && (pAd->Antenna.field.TxPath == 2)) if ((pEntry->HTCapability.MCSSet[0] == 0xff) && (pEntry->HTCapability.MCSSet[1] == 0xff) && (pAd->CommonCfg.TxStream == 2)) {// 11N 2S AP if (pAd->LatchRfRegs.Channel <= 14) @@ -2086,7 +2067,6 @@ VOID MlmeDynamicTxRateSwitching( else TxRateIdx = MCS0; } -// else if ((pTable == RateSwitchTable11BGN2S) || (pTable == RateSwitchTable11BGN2SForABand) ||(pTable == RateSwitchTable11N2S) ||(pTable == RateSwitchTable11N2SForABand) || (pTable == RateSwitchTable)) else if ((pTable == RateSwitchTable11BGN2S) || (pTable == RateSwitchTable11BGN2SForABand) ||(pTable == RateSwitchTable11N2S) ||(pTable == RateSwitchTable11N2SForABand)) // 3*3 {// N mode with 2 stream if (MCS15 && (Rssi >= (-70+RssiOffset))) @@ -2149,7 +2129,6 @@ VOID MlmeDynamicTxRateSwitching( TxRateIdx = MCS0; } - // if (TxRateIdx != pAd->CommonCfg.TxRateIndex) { pEntry->CurrTxRateIndex = TxRateIdx; pNextTxRate = (PRTMP_TX_RATE_SWITCH) &pTable[(pEntry->CurrTxRateIndex+1)*5]; @@ -2753,28 +2732,20 @@ VOID MlmeUpdateTxRates( // specified; otherwise disabled if (num <= 1) { - //OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_TX_RATE_SWITCH_ENABLED); - //pAd->CommonCfg.bAutoTxRateSwitch = FALSE; *auto_rate_cur_p = FALSE; } else { - //OPSTATUS_SET_FLAG(pAd, fOP_STATUS_TX_RATE_SWITCH_ENABLED); - //pAd->CommonCfg.bAutoTxRateSwitch = TRUE; *auto_rate_cur_p = TRUE; } #if 1 if (HtMcs != MCS_AUTO) { - //OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_TX_RATE_SWITCH_ENABLED); - //pAd->CommonCfg.bAutoTxRateSwitch = FALSE; *auto_rate_cur_p = FALSE; } else { - //OPSTATUS_SET_FLAG(pAd, fOP_STATUS_TX_RATE_SWITCH_ENABLED); - //pAd->CommonCfg.bAutoTxRateSwitch = TRUE; *auto_rate_cur_p = TRUE; } #endif @@ -2860,14 +2831,6 @@ VOID MlmeUpdateTxRates( pAd->CommonCfg.MaxTxRate = MaxDesire; pAd->CommonCfg.MinTxRate = MinSupport; - // 2003-07-31 john - 2500 doesn't have good sensitivity at high OFDM rates. to increase the success - // ratio of initial DHCP packet exchange, TX rate starts from a lower rate depending - // on average RSSI - // 1. RSSI >= -70db, start at 54 Mbps (short distance) - // 2. -70 > RSSI >= -75, start at 24 Mbps (mid distance) - // 3. -75 > RSSI, start at 11 Mbps (long distance) - //if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_TX_RATE_SWITCH_ENABLED)/* && - // OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED)*/) if (*auto_rate_cur_p) { short dbm = 0; @@ -2936,11 +2899,7 @@ VOID MlmeUpdateTxRates( pAd->CommonCfg.MlmeTransmit.field.MODE = MODE_CCK; pAd->CommonCfg.MlmeTransmit.field.MCS = RATE_1; -//#ifdef WIFI_TEST pAd->CommonCfg.RtsRate = RATE_11; -//#else -// pAd->CommonCfg.RtsRate = RATE_1; -//#endif break; case PHY_11G: case PHY_11A: @@ -4289,8 +4248,6 @@ VOID MgtMacHeaderInit( pHdr80211->FC.Type = BTYPE_MGMT; pHdr80211->FC.SubType = SubType; -// if (SubType == SUBTYPE_ACK) // sample, no use, it will conflict with ACTION frame sub type -// pHdr80211->FC.Type = BTYPE_CNTL; pHdr80211->FC.ToDs = ToDs; COPY_MAC_ADDR(pHdr80211->Addr1, pDA); @@ -6193,10 +6150,7 @@ VOID AsicAdjustTxPower( break; } // The index is the step we should decrease, idx = 0 means there is nothing to compensate -// if (R3 > (ULONG) (TxAgcStep * (idx-1))) *pTxAgcCompensate = -(TxAgcStep * (idx-1)); -// else -// *pTxAgcCompensate = -((UCHAR)R3); DeltaPwr += (*pTxAgcCompensate); DBGPRINT(RT_DEBUG_TRACE, ("-- Tx Power, BBP R1=%x, TssiRef=%x, TxAgcStep=%x, step = -%d\n", @@ -6479,11 +6433,6 @@ VOID AsicDisableRDG( RTMP_IO_READ32(pAd, EDCA_AC0_CFG, &Data); Data &= 0xFFFFFF00; - //Data |= 0x20; -#ifndef WIFI_TEST - //if ( pAd->CommonCfg.bEnableTxBurst ) - // Data |= 0x60; // for performance issue not set the TXOP to 0 -#endif if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_DYNAMIC_BE_TXOP_ACTIVE) && (pAd->MacTab.fAnyStationMIMOPSDynamic == FALSE) ) @@ -6540,7 +6489,6 @@ VOID AsicEnableBssSync( DBGPRINT(RT_DEBUG_TRACE, ("--->AsicEnableBssSync(INFRA mode)\n")); RTMP_IO_READ32(pAd, BCN_TIME_CFG, &csr.word); -// RTMP_IO_WRITE32(pAd, BCN_TIME_CFG, 0x00000000); { csr.field.BeaconInterval = pAd->CommonCfg.BeaconPeriod << 4; // ASIC register in units of 1/16 TU @@ -6586,8 +6534,6 @@ VOID AsicEnableIbssSync( ptr = (PUCHAR)&pAd->BeaconTxWI; for (i=0; i<TXWI_SIZE; i+=2) // 16-byte TXWI field { - //UINT32 longptr = *ptr + (*(ptr+1)<<8) + (*(ptr+2)<<16) + (*(ptr+3)<<24); - //RTMP_IO_WRITE32(pAd, HW_BEACON_BASE0 + i, longptr); RTUSBMultiWrite(pAd, HW_BEACON_BASE0 + i, ptr, 2); ptr += 2; } @@ -6596,19 +6542,11 @@ VOID AsicEnableIbssSync( ptr = pAd->BeaconBuf; for (i=0; i< pAd->BeaconTxWI.MPDUtotalByteCount; i+=2) { - //UINT32 longptr = *ptr + (*(ptr+1)<<8) + (*(ptr+2)<<16) + (*(ptr+3)<<24); - //RTMP_IO_WRITE32(pAd, HW_BEACON_BASE0 + TXWI_SIZE + i, longptr); RTUSBMultiWrite(pAd, HW_BEACON_BASE0 + TXWI_SIZE + i, ptr, 2); ptr +=2; } #endif // RT2870 // - // - // For Wi-Fi faily generated beacons between participating stations. - // Set TBTT phase adaptive adjustment step to 8us (default 16us) - // don't change settings 2006-5- by Jerry - //RTMP_IO_WRITE32(pAd, TBTT_SYNC_CFG, 0x00001010); - // start sending BEACON csr9.field.BeaconInterval = pAd->CommonCfg.BeaconPeriod << 4; // ASIC register in units of 1/16 TU csr9.field.bTsfTicking = 1; @@ -6656,7 +6594,6 @@ VOID AsicSetEdcaParm( //======================================================== // MAC Register has a copy . //======================================================== -//#ifndef WIFI_TEST if( pAd->CommonCfg.bEnableTxBurst ) { // For CWC test, change txop from 0x30 to 0x20 in TxBurst mode @@ -6664,9 +6601,6 @@ VOID AsicSetEdcaParm( } else Ac0Cfg.field.AcTxop = 0; // QID_AC_BE -//#else -// Ac0Cfg.field.AcTxop = 0; // QID_AC_BE -//#endif Ac0Cfg.field.Cwmin = CW_MIN_IN_BITS; Ac0Cfg.field.Cwmax = CW_MAX_IN_BITS; Ac0Cfg.field.Aifsn = 2; @@ -7175,18 +7109,14 @@ VOID AsicAddKeyEntry( IN BOOLEAN bTxKey) { ULONG offset; -// ULONG WCIDAttri = 0; UCHAR IV4 = 0; PUCHAR pKey = pCipherKey->Key; -// ULONG KeyLen = pCipherKey->KeyLen; PUCHAR pTxMic = pCipherKey->TxMic; PUCHAR pRxMic = pCipherKey->RxMic; PUCHAR pTxtsc = pCipherKey->TxTsc; UCHAR CipherAlg = pCipherKey->CipherAlg; SHAREDKEY_MODE_STRUC csr1; -// ASSERT(KeyLen <= MAX_LEN_OF_PEER_KEY); - DBGPRINT(RT_DEBUG_TRACE, ("==> AsicAddKeyEntry\n")); // // 1.) decide key table offset @@ -8054,19 +7984,6 @@ VOID APSDPeriodicExec( return; pAd->CommonCfg.TriggerTimerCount++; - -// Driver should not send trigger frame, it should be send by application layer -/* - if (pAd->CommonCfg.bAPSDCapable && pAd->CommonCfg.APEdcaParm.bAPSDCapable - && (pAd->CommonCfg.bNeedSendTriggerFrame || - (((pAd->CommonCfg.TriggerTimerCount%20) == 19) && (!pAd->CommonCfg.bAPSDAC_BE || !pAd->CommonCfg.bAPSDAC_BK || !pAd->CommonCfg.bAPSDAC_VI || !pAd->CommonCfg.bAPSDAC_VO)))) - { - DBGPRINT(RT_DEBUG_TRACE,("Sending trigger frame and enter service period when support APSD\n")); - RTMPSendNullFrame(pAd, pAd->CommonCfg.TxRate, TRUE); - pAd->CommonCfg.bNeedSendTriggerFrame = FALSE; - pAd->CommonCfg.TriggerTimerCount = 0; - pAd->CommonCfg.bInServicePeriod = TRUE; - }*/ } /* |