Staging: rt2860: remove dead code
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sun, 26 Apr 2009 14:06:12 +0000 (16:06 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Jun 2009 18:00:49 +0000 (11:00 -0700)
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 files changed:
drivers/staging/rt2860/ap.h
drivers/staging/rt2860/chlist.h
drivers/staging/rt2860/common/ba_action.c
drivers/staging/rt2860/common/cmm_info.c
drivers/staging/rt2860/common/dfs.c
drivers/staging/rt2860/common/mlme.c
drivers/staging/rt2860/common/rtmp_init.c
drivers/staging/rt2860/rt_linux.h
drivers/staging/rt2860/rt_main_dev.c
drivers/staging/rt2860/rt_profile.c
drivers/staging/rt2860/rtmp.h
drivers/staging/rt2860/sta/sync.c
drivers/staging/rt2870/ap.h
drivers/staging/rt2870/rtmp.h

index 2da13abb14cc0c5c3a8ebbc662a56ea25720805e..a9ce57be8140d2f535887396794d864d9d5869f5 100644 (file)
@@ -516,9 +516,6 @@ BOOLEAN APPeerBeaconAndProbeRspSanity(
     OUT BOOLEAN *ExtendedRateIeExist,
     OUT UCHAR *Erp);
 
-// ap_info.c
-
-
 
 // ================== end of AP RTMP.h ========================
 
index 60f8548a57eac933689236d50d2a866ab8823614..f49a35c95de67ec79e2e4453964c8433287d0a61 100644 (file)
@@ -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
                }
        }
 
index 6f51bd2b21c6db6b105cf12c00e3b2076576bc13..6b0898dc20871804064bfe8d916b52e33fdba9dc 100644 (file)
@@ -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
        }
 }
index a172f3715e4052d8d630da1c6d543bddc98308b9..ea76f5b252cfbc64312f03df3a6f9856a407695a 100644 (file)
@@ -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;
index 87289627e9e7b5973f5c9459e3d6f78f45b63ff6..23330f2661d9ba533a08e95494f2629df3e6ab76 100644 (file)
@@ -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;
 
index 886dcbeb0bf36cdc88314950957b06e4e2a15488..51468689a3827bf159e51de31449ce4e6494f2d9 100644 (file)
@@ -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);
 
index 611c88c9cf6de405741ffaf696d2b42c6157823d..d79877e1e82a628fba758facf7f900b0f7132713 100644 (file)
@@ -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
                        {
index 9f836779220c7bd5c33d9526b68ecf3324ab5972..bfd9d062d0956ea6c2541ae3c45e8184b9cb70b3 100644 (file)
@@ -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)
index 138b136b073a54bbab357aa2e12579401dda7894..5951567b2cb4a6dde899abb0fbf543344a61e78e 100644 (file)
@@ -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)
        {
index 48ec80863a9057f143517c1ebe9297e3ef8fadde..a279eed5b453672f06d1d29286cf3cfa21d02b31 100644 (file)
@@ -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);
 
index 9d10185afc935946904e3166923817a6b0ef70e8..55149537a4aad52b59a10749ccafa74d337ed3ee 100644 (file)
@@ -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
index f80c21dfd120a7bd22178b4dbc2d64f254b9c8a7..17dbe1dc2196edc8fff20cfa212ae2894cb21688 100644 (file)
@@ -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);
                                        }
                                }
                        }
index 217df0ee1b3aea8b8d60de606d9c926f97cf96a3..4b5457199252f13df02204250f9bd5283b6732ce 100644 (file)
@@ -535,9 +535,6 @@ BOOLEAN APPeerBeaconAndProbeRspSanity(
     OUT BOOLEAN *ExtendedRateIeExist,
     OUT UCHAR *Erp);
 
-// ap_info.c
-
-
 
 // ================== end of AP RTMP.h ========================
 
index e360b33086b71af916f7f8a02b7c77a1df96a210..c7b74ad039b64088938d6a134c75c7638ad712f3 100644 (file)
@@ -1239,7 +1239,6 @@ typedef struct _MLME_STRUCT {
 
 // structure for radar detection and channel switch
 typedef struct _RADAR_DETECT_STRUCT {
-    //BOOLEAN          IEEE80211H;                     // 0: disable, 1: enable IEEE802.11h
        UCHAR           CSCount;                        //Channel switch counter
        UCHAR           CSPeriod;                       //Channel switch period (beacon count)
        UCHAR           RDCount;                        //Radar detection counter