diff options
Diffstat (limited to 'drivers/staging/rt2860')
-rw-r--r-- | drivers/staging/rt2860/ap.h | 3 | ||||
-rw-r--r-- | drivers/staging/rt2860/chlist.h | 43 | ||||
-rw-r--r-- | drivers/staging/rt2860/common/ba_action.c | 51 | ||||
-rw-r--r-- | drivers/staging/rt2860/common/cmm_info.c | 6 | ||||
-rw-r--r-- | drivers/staging/rt2860/common/dfs.c | 12 | ||||
-rw-r--r-- | drivers/staging/rt2860/common/mlme.c | 11 | ||||
-rw-r--r-- | drivers/staging/rt2860/common/rtmp_init.c | 68 | ||||
-rw-r--r-- | drivers/staging/rt2860/rt_linux.h | 6 | ||||
-rw-r--r-- | drivers/staging/rt2860/rt_main_dev.c | 3 | ||||
-rw-r--r-- | drivers/staging/rt2860/rt_profile.c | 5 | ||||
-rw-r--r-- | drivers/staging/rt2860/rtmp.h | 1 | ||||
-rw-r--r-- | drivers/staging/rt2860/sta/sync.c | 1 |
12 files changed, 2 insertions, 208 deletions
diff --git a/drivers/staging/rt2860/ap.h b/drivers/staging/rt2860/ap.h index 2da13abb14c..a9ce57be814 100644 --- a/drivers/staging/rt2860/ap.h +++ b/drivers/staging/rt2860/ap.h @@ -516,9 +516,6 @@ BOOLEAN APPeerBeaconAndProbeRspSanity( OUT BOOLEAN *ExtendedRateIeExist, OUT UCHAR *Erp); -// ap_info.c - - // ================== end of AP RTMP.h ======================== diff --git a/drivers/staging/rt2860/chlist.h b/drivers/staging/rt2860/chlist.h index 60f8548a57e..f49a35c95de 100644 --- a/drivers/staging/rt2860/chlist.h +++ b/drivers/staging/rt2860/chlist.h @@ -1195,49 +1195,6 @@ static inline VOID N_ChannelCheck( pAd->CommonCfg.RegTransmitSetting.field.BW = BW_20; //pAd->CommonCfg.RegTransmitSetting.field.EXTCHA = EXTCHA_NONE; // We didn't set the ExtCh as NONE due to it'll set in RTMPSetHT() } -#if 0 - switch (pAd->CommonCfg.CountryRegion & 0x7f) - { - case REGION_0_BG_BAND: // 1 -11 - case REGION_1_BG_BAND: // 1 - 13 - case REGION_5_BG_BAND: // 1 - 14 - if (Channel <= 4) - { - pAd->CommonCfg.RegTransmitSetting.field.EXTCHA = EXTCHA_ABOVE; - } - else if (Channel >= 8) - { - if ((ChannelNum - Channel) < 4) - pAd->CommonCfg.RegTransmitSetting.field.EXTCHA = EXTCHA_BELOW; - } - break; - - case REGION_2_BG_BAND: // 10 - 11 - case REGION_3_BG_BAND: // 10 - 13 - case REGION_4_BG_BAND: // 14 - pAd->CommonCfg.RegTransmitSetting.field.BW = BW_20; - break; - - case REGION_6_BG_BAND: // 3 - 9 - if (Channel <= 5) - pAd->CommonCfg.RegTransmitSetting.field.EXTCHA = EXTCHA_ABOVE; - else if (Channel == 6) - pAd->CommonCfg.RegTransmitSetting.field.BW = BW_20; - else if (Channel >= 7) - pAd->CommonCfg.RegTransmitSetting.field.EXTCHA = EXTCHA_BELOW; - break; - - case REGION_7_BG_BAND: // 5 - 13 - if (Channel <= 8) - pAd->CommonCfg.RegTransmitSetting.field.EXTCHA = EXTCHA_ABOVE; - else if (Channel >= 10) - pAd->CommonCfg.RegTransmitSetting.field.EXTCHA = EXTCHA_BELOW; - break; - - default: // Error. should never happen - break; - } -#endif } } diff --git a/drivers/staging/rt2860/common/ba_action.c b/drivers/staging/rt2860/common/ba_action.c index 6f51bd2b21c..6b0898dc208 100644 --- a/drivers/staging/rt2860/common/ba_action.c +++ b/drivers/staging/rt2860/common/ba_action.c @@ -444,9 +444,6 @@ void ba_flush_reordering_timeout_mpdus( && (pBAEntry->list.qlen > 0) ) { -// printk("timeout[%d] (%lx-%lx = %d > %d): %x, ", pBAEntry->list.qlen, Now32, (pBAEntry->LastIndSeqAtTimer), -// (int)((long) Now32 - (long)(pBAEntry->LastIndSeqAtTimer)), REORDERING_PACKET_TIMEOUT, -// pBAEntry->LastIndSeq); // // force LastIndSeq to shift to LastIndSeq+1 // @@ -463,22 +460,7 @@ void ba_flush_reordering_timeout_mpdus( pBAEntry->LastIndSeq = Sequence; } - //printk("%x, flush one!\n", pBAEntry->LastIndSeq); - } -#if 0 - else if ( - (RTMP_TIME_AFTER((unsigned long)Now32, (unsigned long)(pBAEntry->LastIndSeqAtTimer+(MAX_REORDERING_PACKET_TIMEOUT))) && - (pBAEntry->list.qlen > 1)) - ) - { - DBGPRINT(RT_DEBUG_TRACE,("timeout[%d] (%lx-%lx = %d > %d): %x\n ", pBAEntry->list.qlen, Now32, (pBAEntry->LastIndSeqAtTimer), - (int)((long) Now32 - (long)(pBAEntry->LastIndSeqAtTimer)), MAX_REORDERING_PACKET_TIMEOUT, - pBAEntry->LastIndSeq)); - ba_refresh_reordering_mpdus(pAd, pBAEntry); - pBAEntry->LastIndSeqAtTimer = Now32; - } -#endif } @@ -692,10 +674,6 @@ BOOLEAN BARecSessionAdd( RTMPInitTimer(pAd, &pBAEntry->RECBATimer, GET_TIMER_FUNCTION(BARecSessionIdleTimeout), pBAEntry, TRUE); } -#if 0 // for debugging - RTMPSetTimer(&pBAEntry->RECBATimer, REC_BA_SESSION_IDLE_TIMEOUT); -#endif - // Set Bitmap flag. pEntry->RXBAbitmap |= (1<<TID); pEntry->BARecWcidArray[TID] = Idx; @@ -1556,13 +1534,9 @@ static VOID ba_enqueue_reordering_packet( } else { -#if 0 - DBGPRINT(RT_DEBUG_ERROR, ("!!! (%d:%d) Can't allocate reordering mpdu blk\n", - blk_count, pBAEntry->list.qlen)); -#else DBGPRINT(RT_DEBUG_ERROR, ("!!! (%d) Can't allocate reordering mpdu blk\n", pBAEntry->list.qlen)); -#endif + /* * flush all pending reordering mpdus * and receving mpdu to upper layer @@ -1610,29 +1584,11 @@ VOID Indicate_AMPDU_Packet( if (!RX_BLK_TEST_FLAG(pRxBlk, fRX_AMSDU) && (pRxBlk->DataSize > MAX_RX_PKT_LEN)) { -#if 0 // sample take off, no use - static int err_size; - - err_size++; - if (err_size > 20) { - printk("AMPDU DataSize = %d\n", pRxBlk->DataSize); - hex_dump("802.11 Header", (UCHAR *)pRxBlk->pHeader, 24); - hex_dump("Payload", pRxBlk->pData, 64); - err_size = 0; - } -#endif // release packet RELEASE_NDIS_PACKET(pAd, pRxBlk->pRxPacket, NDIS_STATUS_FAILURE); return; } - -#if 0 // test - /* Rec BA Session had been torn down */ - INDICATE_LEGACY_OR_AMSDU(pAd, pRxBlk, FromWhichBSSID); - return; -#endif - if (Wcid < MAX_LEN_OF_MAC_TABLE) { Idx = pAd->MacTab.Content[Wcid].BARecWcidArray[TID]; @@ -1727,10 +1683,6 @@ VOID Indicate_AMPDU_Packet( // else { -#if 0 - ba_refresh_reordering_mpdus(pAd, pBAEntry); - INDICATE_LEGACY_OR_AMSDU(pAd, pRxBlk, FromWhichBSSID); -#else LONG WinStartSeq, TmpSeq; @@ -1752,6 +1704,5 @@ VOID Indicate_AMPDU_Packet( { pBAEntry->LastIndSeq = TmpSeq; } -#endif } } diff --git a/drivers/staging/rt2860/common/cmm_info.c b/drivers/staging/rt2860/common/cmm_info.c index a172f3715e4..ea76f5b252c 100644 --- a/drivers/staging/rt2860/common/cmm_info.c +++ b/drivers/staging/rt2860/common/cmm_info.c @@ -1145,11 +1145,6 @@ VOID RTMPSetPhyMode( INT i; // the selected phymode must be supported by the RF IC encoded in E2PROM - // if no change, do nothing - /* bug fix - if (pAd->CommonCfg.PhyMode == phymode) - return; - */ pAd->CommonCfg.PhyMode = (UCHAR)phymode; DBGPRINT(RT_DEBUG_TRACE,("RTMPSetPhyMode : PhyMode=%d, channel=%d \n", pAd->CommonCfg.PhyMode, pAd->CommonCfg.Channel)); @@ -1981,7 +1976,6 @@ INT Set_BASetup_Proc( =>The six 2 digit hex-decimal number previous are the Mac address, =>The seventh decimal number is the tid value. */ - //printk("\n%s\n", arg); if(strlen(arg) < 19) //Mac address acceptable format 01:02:03:04:05:06 length 17 plus the "-" and tid value in decimal format. return FALSE; diff --git a/drivers/staging/rt2860/common/dfs.c b/drivers/staging/rt2860/common/dfs.c index 87289627e9e..23330f2661d 100644 --- a/drivers/staging/rt2860/common/dfs.c +++ b/drivers/staging/rt2860/common/dfs.c @@ -80,18 +80,6 @@ VOID BbpRadarDetectionStart( RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, 124, 0x28); RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, 125, 0xff); -#if 0 - // toggle Rx enable bit for radar detection. - // it's Andy's recommand. - { - UINT32 Value; - RTMP_IO_READ32(pAd, MAC_SYS_CTRL, &Value); - Value |= (0x1 << 3); - RTMP_IO_WRITE32(pAd, MAC_SYS_CTRL, Value); - Value &= ~(0x1 << 3); - RTMP_IO_WRITE32(pAd, MAC_SYS_CTRL, Value); - } -#endif RadarPeriod = ((UINT)RdIdleTimeTable[pAd->CommonCfg.RadarDetect.RDDurRegion][0] + (UINT)pAd->CommonCfg.RadarDetect.DfsSessionTime) < 250 ? (RdIdleTimeTable[pAd->CommonCfg.RadarDetect.RDDurRegion][0] + pAd->CommonCfg.RadarDetect.DfsSessionTime) : 250; diff --git a/drivers/staging/rt2860/common/mlme.c b/drivers/staging/rt2860/common/mlme.c index 886dcbeb0bf..51468689a38 100644 --- a/drivers/staging/rt2860/common/mlme.c +++ b/drivers/staging/rt2860/common/mlme.c @@ -1921,11 +1921,6 @@ VOID MlmeDynamicTxRateSwitching( ULONG TxRetransmit = 0, TxSuccess = 0, TxFailCount = 0; MAC_TABLE_ENTRY *pEntry; - /*if (pAd->Antenna.field.RxPath > 1) - Rssi = (pAd->StaCfg.RssiSample.AvgRssi0 + pAd->StaCfg.RssiSample.AvgRssi1) >> 1; - else - Rssi = pAd->StaCfg.RssiSample.AvgRssi0;*/ - // // walk through MAC table, see if need to change AP's TX rate toward each entry // @@ -2109,7 +2104,6 @@ VOID MlmeDynamicTxRateSwitching( { MCS14 = idx; } - //else if ((pCurrTxRate->CurrMCS == MCS_15)/* && (pCurrTxRate->ShortGI == GI_800)*/) //we hope to use ShortGI as initial rate else if ((pCurrTxRate->CurrMCS == MCS_15) && (pCurrTxRate->ShortGI == GI_800)) //we hope to use ShortGI as initial rate, however Atheros's chip has bugs when short GI { MCS15 = idx; @@ -5216,9 +5210,7 @@ VOID AsicUpdateProtect( // Config ASIC RTS threshold register RTMP_IO_READ32(pAd, TX_RTS_CFG, &MacReg); MacReg &= 0xFF0000FF; -#if 0 - MacReg |= (pAd->CommonCfg.RtsThreshold << 8); -#else + // If the user want disable RtsThreshold and enable Amsdu/Ralink-Aggregation, set the RtsThreshold as 4096 if (( (pAd->CommonCfg.BACapability.field.AmsduEnable) || @@ -5231,7 +5223,6 @@ VOID AsicUpdateProtect( { MacReg |= (pAd->CommonCfg.RtsThreshold << 8); } -#endif RTMP_IO_WRITE32(pAd, TX_RTS_CFG, MacReg); diff --git a/drivers/staging/rt2860/common/rtmp_init.c b/drivers/staging/rt2860/common/rtmp_init.c index 611c88c9cf6..d79877e1e82 100644 --- a/drivers/staging/rt2860/common/rtmp_init.c +++ b/drivers/staging/rt2860/common/rtmp_init.c @@ -969,67 +969,6 @@ VOID RTMPReadChannelPwr( // 4. Print and Debug choffset = 14 + 12 + 16 + 7; - - -#if 0 - // Init the 802.11j channel number for TX channel power - // 0. 20MHz - for (i = 0; i < 3; i++) - { - pAd->TxPower11J[i].Channel = 8 + i * 4; - pAd->TxPower11J[i].BW = BW_20; - } - - for (i = 0; i < 4; i++) - { - pAd->TxPower11J[i + 3].Channel = 34 + i * 4; - pAd->TxPower11J[i + 3].BW = BW_20; - } - - for (i = 0; i < 4; i++) - { - pAd->TxPower11J[i + 7].Channel = 184 + i * 4; - pAd->TxPower11J[i + 7].BW = BW_20; - } - - // 0. 10MHz - for (i = 0; i < 2; i++) - { - pAd->TxPower11J[i + 11].Channel = 7 + i; - pAd->TxPower11J[i + 11].BW = BW_10; - } - pAd->TxPower11J[13].Channel = 11; - pAd->TxPower11J[13].BW = BW_10; - - for (i = 0; i < 3; i++) - { - pAd->TxPower11J[i + 14].Channel = 183 + i; - pAd->TxPower11J[i + 14].BW= BW_10; - } - - for (i = 0; i < 3; i++) - { - pAd->TxPower11J[i + 17].Channel = 187 + i; - pAd->TxPower11J[i + 17].BW = BW_10; - } - for (i = 0; i < 10; i++) - { - Power.word = RTMP_EEPROM_READ16(pAd, EEPROM_Japan_TX_PWR_OFFSET + i * 2); - Power2.word = RTMP_EEPROM_READ16(pAd, EEPROM_Japan_TX2_PWR_OFFSET + i * 2); - - if ((Power.field.Byte0 < 36) && (Power.field.Byte0 > -6)) - pAd->TxPower11J[i * 2].Power = Power.field.Byte0; - - if ((Power.field.Byte1 < 36) && (Power.field.Byte1 > -6)) - pAd->TxPower11J[i * 2 + 1].Power = Power.field.Byte1; - - if ((Power2.field.Byte0 < 36) && (Power2.field.Byte0 > -6)) - pAd->TxPower11J[i * 2].Power2 = Power2.field.Byte0; - - if ((Power2.field.Byte1 < 36) && (Power2.field.Byte1 > -6)) - pAd->TxPower11J[i * 2 + 1].Power2 = Power2.field.Byte1; - } -#endif } /* @@ -2217,10 +2156,6 @@ VOID NICUpdateFifoStaCounters( if (pEntry->FIFOCount >= 1) { DBGPRINT(RT_DEBUG_TRACE, ("#")); -#if 0 - SendRefreshBAR(pAd, pEntry); - pEntry->NoBADataCountDown = 64; -#else pEntry->NoBADataCountDown = 64; if(pEntry->PsMode == PWR_ACTIVE) @@ -2241,10 +2176,7 @@ VOID NICUpdateFifoStaCounters( pEntry->FIFOCount = 0; pEntry->ContinueTxFailCnt = 0; } -#endif - //pEntry->FIFOCount = 0; } - //pEntry->bSendBAR = TRUE; } else { diff --git a/drivers/staging/rt2860/rt_linux.h b/drivers/staging/rt2860/rt_linux.h index 9f836779220..bfd9d062d09 100644 --- a/drivers/staging/rt2860/rt_linux.h +++ b/drivers/staging/rt2860/rt_linux.h @@ -647,10 +647,6 @@ void RTMP_GetCurrentSystemTime(LARGE_INTEGER *time); #define RTMP_GET_PACKET_MOREDATA(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+7]) -#if 0 -//#define RTMP_SET_PACKET_DHCP(_p, _flg) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] = _flg) -//#define RTMP_GET_PACKET_DHCP(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11]) -#else // // Sepcific Pakcet Type definition // @@ -730,8 +726,6 @@ void RTMP_GetCurrentSystemTime(LARGE_INTEGER *time); #define RTMP_GET_PACKET_IPV4(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] & RTMP_PACKET_SPECIFIC_IPV4) -#endif - // If this flag is set, it indicates that this EAPoL frame MUST be clear. #define RTMP_SET_PACKET_CLEAR_EAP_FRAME(_p, _flg) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+12] = _flg) diff --git a/drivers/staging/rt2860/rt_main_dev.c b/drivers/staging/rt2860/rt_main_dev.c index 138b136b073..5951567b2cb 100644 --- a/drivers/staging/rt2860/rt_main_dev.c +++ b/drivers/staging/rt2860/rt_main_dev.c @@ -596,9 +596,6 @@ static NDIS_STATUS rt_ieee80211_if_setup(struct net_device *dev, PRTMP_ADAPTER p CHAR slot_name[IFNAMSIZ]; struct net_device *device; - - //ether_setup(dev); - #if WIRELESS_EXT >= 12 if (pAd->OpMode == OPMODE_STA) { diff --git a/drivers/staging/rt2860/rt_profile.c b/drivers/staging/rt2860/rt_profile.c index 48ec80863a9..a279eed5b45 100644 --- a/drivers/staging/rt2860/rt_profile.c +++ b/drivers/staging/rt2860/rt_profile.c @@ -1453,11 +1453,6 @@ NDIS_STATUS RTMPReadParametersHook( set_fs(orgfs); -#if 0 - current->cred->fsuid = orgfsuid; - current->cred->fsgid = orgfsgid; -#endif - kfree(buffer); kfree(tmpbuf); diff --git a/drivers/staging/rt2860/rtmp.h b/drivers/staging/rt2860/rtmp.h index 9d10185afc9..55149537a4a 100644 --- a/drivers/staging/rt2860/rtmp.h +++ b/drivers/staging/rt2860/rtmp.h @@ -2516,7 +2516,6 @@ typedef struct _RTMP_ADAPTER NDIS_MEDIA_STATE IndicateMediaState; // Base on Indication state, default is NdisMediaStateDisConnected - // MAT related parameters // configuration: read from Registry & E2PROM BOOLEAN bLocalAdminMAC; // Use user changed MAC diff --git a/drivers/staging/rt2860/sta/sync.c b/drivers/staging/rt2860/sta/sync.c index f80c21dfd12..17dbe1dc219 100644 --- a/drivers/staging/rt2860/sta/sync.c +++ b/drivers/staging/rt2860/sta/sync.c @@ -1499,7 +1499,6 @@ VOID PeerBeacon( // Set a flag to go to sleep . Then after parse this RxDoneInterrupt, will go to sleep mode. RTMP_SET_PSFLAG(pAd, fRTMP_PS_GO_TO_SLEEP_NOW); pAd->ThisTbttNumToNextWakeUp = TbttNumToNextWakeUp; - //AsicSleepThenAutoWakeup(pAd, TbttNumToNextWakeUp); } } } |