aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rt2860/common
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-04-26 16:06:12 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-19 11:00:49 -0700
commit96f139ee99322060523883d4a665b10780ca3182 (patch)
treedc9cc79b928005de136cd7eea5de87c58a755bbc /drivers/staging/rt2860/common
parentStaging: rt3070: use empty ASSERT() macro (diff)
downloadlinux-dev-96f139ee99322060523883d4a665b10780ca3182.tar.xz
linux-dev-96f139ee99322060523883d4a665b10780ca3182.zip
Staging: rt2860: 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/rt2860/common')
-rw-r--r--drivers/staging/rt2860/common/ba_action.c51
-rw-r--r--drivers/staging/rt2860/common/cmm_info.c6
-rw-r--r--drivers/staging/rt2860/common/dfs.c12
-rw-r--r--drivers/staging/rt2860/common/mlme.c11
-rw-r--r--drivers/staging/rt2860/common/rtmp_init.c68
5 files changed, 2 insertions, 146 deletions
diff --git a/drivers/staging/rt2860/common/ba_action.c b/drivers/staging/rt2860/common/ba_action.c
index 6f51bd2b21c6..6b0898dc2087 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 a172f3715e40..ea76f5b252cf 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 87289627e9e7..23330f2661d9 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 886dcbeb0bf3..51468689a382 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 611c88c9cf6d..d79877e1e82a 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
{