Staging: rt2860: remove dead CONFIG_AP_SUPPORT code
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sun, 26 Apr 2009 14:06:04 +0000 (16:06 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Jun 2009 18:00:48 +0000 (11:00 -0700)
Then remove no longer needed IF_DEV_CONFIG_OPMODE_ON_[AP,STA]() macros.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 files changed:
drivers/staging/rt2860/2860_main_dev.c
drivers/staging/rt2860/common/action.c
drivers/staging/rt2860/common/ba_action.c
drivers/staging/rt2860/common/cmm_data.c
drivers/staging/rt2860/common/cmm_data_2860.c
drivers/staging/rt2860/common/cmm_info.c
drivers/staging/rt2860/common/cmm_sanity.c
drivers/staging/rt2860/common/cmm_sync.c
drivers/staging/rt2860/common/cmm_wpa.c
drivers/staging/rt2860/common/mlme.c
drivers/staging/rt2860/common/rtmp_init.c
drivers/staging/rt2860/mlme.h
drivers/staging/rt2860/rt_linux.c
drivers/staging/rt2860/rt_main_dev.c
drivers/staging/rt2860/rt_profile.c
drivers/staging/rt2860/rtmp.h
drivers/staging/rt2860/rtmp_def.h
drivers/staging/rt2860/sta_ioctl.c

index 0ac092f6ce0f383bc17b5a2a8a3f0d49ed27b0bb..c7038e03a4dccc09dd8a096b3707b70b57895649 100644 (file)
@@ -477,8 +477,7 @@ static void rx_done_tasklet(unsigned long data)
 
        pAd->int_pending &= ~(INT_RX);
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               bReschedule = STARxDoneInterruptHandle(pAd, 0);
+       bReschedule = STARxDoneInterruptHandle(pAd, 0);
 
        RTMP_INT_LOCK(&pAd->irq_lock, flags);
        /*
@@ -914,11 +913,8 @@ rt2860_interrupt(int irq, void *dev_instance)
                RTMPHandleTBTTInterrupt(pAd);
        }
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-       {
-               if (IntSource.word & AutoWakeupInt)
-                       RTMPHandleTwakeupInterrupt(pAd);
-       }
+       if (IntSource.word & AutoWakeupInt)
+               RTMPHandleTwakeupInterrupt(pAd);
 
     return  IRQ_HANDLED;
 }
index 8d40e158cfc8615ccd14ad0d8ac67d3b8db46f45..c270ccda2c1195da4bfd7b948128468cdb6040e3 100644 (file)
@@ -125,7 +125,6 @@ VOID MlmeADDBAAction(
                        pBAEntry =&pAd->BATable.BAOriEntry[Idx];
                }
 
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                        if (ADHOC_ON(pAd))
                                ActHeaderInit(pAd, &Frame.Hdr, pInfo->pAddr, pAd->CurrentAddress, pAd->CommonCfg.Bssid);
@@ -207,8 +206,7 @@ VOID MlmeDELBAAction(
                // SEND BAR (Send BAR to refresh peer reordering buffer.)
                Idx = pAd->MacTab.Content[pInfo->Wcid].BAOriWcidArray[pInfo->TID];
 
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-                       BarHeaderInit(pAd, &FrameBar, pAd->MacTab.Content[pInfo->Wcid].Addr, pAd->CurrentAddress);
+               BarHeaderInit(pAd, &FrameBar, pAd->MacTab.Content[pInfo->Wcid].Addr, pAd->CurrentAddress);
 
                FrameBar.StartingSeq.field.FragNum = 0; // make sure sequence not clear in DEL funciton.
                FrameBar.StartingSeq.field.StartSeq = pAd->MacTab.Content[pInfo->Wcid].TxSeq[pInfo->TID]; // make sure sequence not clear in DEL funciton.
@@ -227,7 +225,6 @@ VOID MlmeDELBAAction(
                // SEND DELBA FRAME
                FrameLen = 0;
 
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                        if (ADHOC_ON(pAd))
                                ActHeaderInit(pAd, &Frame.Hdr, pAd->MacTab.Content[pInfo->Wcid].Addr, pAd->CurrentAddress, pAd->CommonCfg.Bssid);
@@ -357,7 +354,6 @@ static VOID respond_ht_information_exchange_action(
 
        NdisZeroMemory(&HTINFOframe, sizeof(FRAME_HT_INFO));
        // 2-1. Prepare ADDBA Response frame.
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                if (ADHOC_ON(pAd))
                        ActHeaderInit(pAd, &HTINFOframe.Hdr, pAddr, pAd->CurrentAddress, pAd->CommonCfg.Bssid);
@@ -522,8 +518,7 @@ VOID SendRefreshBAR(
 
                        Sequence = pEntry->TxSeq[TID];
 
-                       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-                               BarHeaderInit(pAd, &FrameBar, pEntry->Addr, pAd->CurrentAddress);
+                       BarHeaderInit(pAd, &FrameBar, pEntry->Addr, pAd->CurrentAddress);
 
                        FrameBar.StartingSeq.field.FragNum = 0; // make sure sequence not clear in DEL function.
                        FrameBar.StartingSeq.field.StartSeq = Sequence; // make sure sequence not clear in DEL funciton.
index 8877f815e861ef7c01cab049d4d83af2c5f19b0e..6f51bd2b21c6db6b105cf12c00e3b2076576bc13 100644 (file)
@@ -130,8 +130,7 @@ void Announce_Reordering_Packet(IN PRTMP_ADAPTER                    pAd,
                // pass this 802.3 packet to upper layer or forward this packet to WM directly
                //
 
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-                       ANNOUNCE_OR_FORWARD_802_3_PACKET(pAd, pPacket, RTMP_GET_PACKET_IF(pPacket));
+               ANNOUNCE_OR_FORWARD_802_3_PACKET(pAd, pPacket, RTMP_GET_PACKET_IF(pPacket));
        }
 }
 
@@ -606,8 +605,7 @@ VOID BAOriSessionAdd(
                        return;
                }
 
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-                       BarHeaderInit(pAd, &FrameBar, pAd->MacTab.Content[pBAEntry->Wcid].Addr, pAd->CurrentAddress);
+               BarHeaderInit(pAd, &FrameBar, pAd->MacTab.Content[pBAEntry->Wcid].Addr, pAd->CurrentAddress);
 
                FrameBar.StartingSeq.field.FragNum = 0; // make sure sequence not clear in DEL function.
                FrameBar.StartingSeq.field.StartSeq = pBAEntry->Sequence; // make sure sequence not clear in DEL funciton.
@@ -1076,12 +1074,9 @@ VOID BAOriSessionSetupTimeout(
 
        pAd = pBAEntry->pAdapter;
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-       {
-               // Do nothing if monitor mode is on
-               if (MONITOR_ON(pAd))
-                       return;
-       }
+       // Do nothing if monitor mode is on
+       if (MONITOR_ON(pAd))
+               return;
 
        pEntry = &pAd->MacTab.Content[pBAEntry->Wcid];
 
@@ -1216,7 +1211,6 @@ VOID PeerAddBAReqAction(
        NdisZeroMemory(&ADDframe, sizeof(FRAME_ADDBA_RSP));
 
        // 2-1. Prepare ADDBA Response frame.
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                if (ADHOC_ON(pAd))
                        ActHeaderInit(pAd, &ADDframe.Hdr, pAddr, pAd->CurrentAddress, pAd->CommonCfg.Bssid);
@@ -1412,8 +1406,7 @@ VOID SendPSMPAction(
                return;
        }
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               ActHeaderInit(pAd, &Frame.Hdr, pAd->CommonCfg.Bssid, pAd->CurrentAddress, pAd->MacTab.Content[Wcid].Addr);
+       ActHeaderInit(pAd, &Frame.Hdr, pAd->CommonCfg.Bssid, pAd->CurrentAddress, pAd->MacTab.Content[Wcid].Addr);
 
        Frame.Category = CATEGORY_HT;
        Frame.Action = SMPS_ACTION;
@@ -1478,8 +1471,7 @@ void convert_reordering_packet_to_preAMSDU_or_802_3_packet(
        //              a. pointer pRxBlk->pData to payload
        //      b. modify pRxBlk->DataSize
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               RTMP_802_11_REMOVE_LLC_AND_CONVERT_TO_802_3(pRxBlk, Header802_3);
+       RTMP_802_11_REMOVE_LLC_AND_CONVERT_TO_802_3(pRxBlk, Header802_3);
 
        ASSERT(pRxBlk->pRxPacket);
        pRxPkt = RTPKT_TO_OSPKT(pRxBlk->pRxPacket);
@@ -1494,12 +1486,9 @@ void convert_reordering_packet_to_preAMSDU_or_802_3_packet(
        //
        if (!RX_BLK_TEST_FLAG(pRxBlk, fRX_AMSDU))
        {
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               {
 #ifdef LINUX
-                       NdisMoveMemory(skb_push(pRxPkt, LENGTH_802_3), Header802_3, LENGTH_802_3);
+               NdisMoveMemory(skb_push(pRxPkt, LENGTH_802_3), Header802_3, LENGTH_802_3);
 #endif
-               }
        }
 }
 
index 92f07ff8bad9d894d604dc4c8d5efef59001d84b..d857d06fd772b2edd17af44145b48a896650e4e7 100644 (file)
@@ -339,12 +339,9 @@ NDIS_STATUS MlmeHardTransmitTxRing(
                return NDIS_STATUS_FAILURE;
        }
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-       {
-               // outgoing frame always wakeup PHY to prevent frame lost
-               if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE))
-                       AsicForceWakeup(pAd, FROM_TX);
-       }
+       // outgoing frame always wakeup PHY to prevent frame lost
+       if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE))
+               AsicForceWakeup(pAd, FROM_TX);
 
        pFirstTxWI      =(PTXWI_STRUC)pSrcBufVA;
 
@@ -501,12 +498,9 @@ NDIS_STATUS MlmeHardTransmitMgmtRing(
                return NDIS_STATUS_FAILURE;
        }
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-       {
-               // outgoing frame always wakeup PHY to prevent frame lost
-               if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE))
-                       AsicForceWakeup(pAd, FROM_TX);
-       }
+       // outgoing frame always wakeup PHY to prevent frame lost
+       if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE))
+               AsicForceWakeup(pAd, FROM_TX);
 
        pFirstTxWI = (PTXWI_STRUC)(pSrcBufVA +  TXINFO_SIZE);
        pHeader_802_11 = (PHEADER_802_11) (pSrcBufVA + TXINFO_SIZE + TXWI_SIZE); //TXWI_SIZE);
@@ -530,7 +524,6 @@ NDIS_STATUS MlmeHardTransmitMgmtRing(
                pMacEntry = MacTableLookup(pAd, pHeader_802_11->Addr1);
        }
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                // Fixed W52 with Activity scan issue in ABG_MIXED and ABGN_MIXED mode.
                if (pAd->CommonCfg.PhyMode == PHY_11ABG_MIXED
@@ -829,13 +822,9 @@ BOOLEAN RTMP_FillTxBlkInfo(
                        TX_BLK_SET_FLAG(pTxBlk, fTX_bAckRequired);
 
                {
-                       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-                       {
-
-                               // If support WMM, enable it.
-                               if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_WMM_INUSED))
-                                       TX_BLK_SET_FLAG(pTxBlk, fTX_bWMM);
-                       }
+                       // If support WMM, enable it.
+                       if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_WMM_INUSED))
+                               TX_BLK_SET_FLAG(pTxBlk, fTX_bWMM);
                }
 
                if (pTxBlk->TxFrameType == TX_LEGACY_FRAME)
@@ -1107,9 +1096,8 @@ VOID RTMPDeQueuePacket(
 
                        Count += pTxBlk->TxPacketList.Number;
 
-                               // Do HardTransmit now.
-                       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-                               Status = STAHardTransmit(pAd, pTxBlk, QueIdx);
+                       // Do HardTransmit now.
+                       Status = STAHardTransmit(pAd, pTxBlk, QueIdx);
 
                        DEQUEUE_UNLOCK(&pAd->irq_lock, bIntContext, IrqFlags);
                        // static rate also need NICUpdateFifoStaCounters() function.
@@ -2146,7 +2134,6 @@ UINT deaggregate_AMSDU_announce(
                   kfree(Elem);
                }
 
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                        if (pRemovedLLCSNAP)
                        {
@@ -2159,8 +2146,7 @@ UINT deaggregate_AMSDU_announce(
                pClonePacket = ClonePacket(pAd, pPacket, pPayload, PayloadSize);
                if (pClonePacket)
                {
-                       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-                               ANNOUNCE_OR_FORWARD_802_3_PACKET(pAd, pClonePacket, RTMP_GET_PACKET_IF(pPacket));
+                       ANNOUNCE_OR_FORWARD_802_3_PACKET(pAd, pClonePacket, RTMP_GET_PACKET_IF(pPacket));
                }
 
 
@@ -2257,8 +2243,6 @@ MAC_TABLE_ENTRY *MacTableInsertEntry(
 
        FirstWcid = 1;
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-
        if (pAd->StaCfg.BssType == BSS_INFRA)
                FirstWcid = 2;
 
@@ -2283,7 +2267,6 @@ MAC_TABLE_ENTRY *MacTableInsertEntry(
                                pEntry->PairwiseKey.CipherAlg = CIPHER_NONE;
                        }
                        {
-                               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                                {
                                        pEntry->ValidAsCLI = TRUE;
                                        pEntry->ValidAsWDS = FALSE;
@@ -2311,7 +2294,6 @@ MAC_TABLE_ENTRY *MacTableInsertEntry(
                                pEntry->apidx = apidx;
 
                        {
-                               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                                {
                                        pEntry->AuthMode = pAd->StaCfg.AuthMode;
                                        pEntry->WepStatus = pAd->StaCfg.WepStatus;
@@ -2796,8 +2778,7 @@ VOID Indicate_Legacy_Packet(
        // 2. remove LLC
        //              a. pointer pRxBlk->pData to payload
        //      b. modify pRxBlk->DataSize
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               RTMP_802_11_REMOVE_LLC_AND_CONVERT_TO_802_3(pRxBlk, Header802_3);
+       RTMP_802_11_REMOVE_LLC_AND_CONVERT_TO_802_3(pRxBlk, Header802_3);
 
        if (pRxBlk->DataSize > MAX_RX_PKT_LEN)
        {
@@ -2816,8 +2797,7 @@ VOID Indicate_Legacy_Packet(
        //
        // pass this 802.3 packet to upper layer or forward this packet to WM directly
        //
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               ANNOUNCE_OR_FORWARD_802_3_PACKET(pAd, pRxPacket, FromWhichBSSID);
+       ANNOUNCE_OR_FORWARD_802_3_PACKET(pAd, pRxPacket, FromWhichBSSID);
 }
 
 
@@ -2876,8 +2856,7 @@ VOID CmmRxRalinkFrameIndicate(
        }
 
        // get 802.3 Header and  remove LLC
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               RTMP_802_11_REMOVE_LLC_AND_CONVERT_TO_802_3(pRxBlk, Header802_3);
+       RTMP_802_11_REMOVE_LLC_AND_CONVERT_TO_802_3(pRxBlk, Header802_3);
 
        ASSERT(pRxBlk->pRxPacket);
 
@@ -2888,8 +2867,7 @@ VOID CmmRxRalinkFrameIndicate(
 
        pData2 = pRxBlk->pData + Payload1Size + LENGTH_802_3;
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               pPacket2 = duplicate_pkt(pAd, (pData2-LENGTH_802_3), LENGTH_802_3, pData2, Payload2Size, FromWhichBSSID);
+       pPacket2 = duplicate_pkt(pAd, (pData2-LENGTH_802_3), LENGTH_802_3, pData2, Payload2Size, FromWhichBSSID);
 
        if (!pPacket2)
        {
@@ -2902,13 +2880,11 @@ VOID CmmRxRalinkFrameIndicate(
        pRxBlk->DataSize = Payload1Size;
        wlan_802_11_to_802_3_packet(pAd, pRxBlk, Header802_3, FromWhichBSSID);
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               ANNOUNCE_OR_FORWARD_802_3_PACKET(pAd, pRxBlk->pRxPacket, FromWhichBSSID);
+       ANNOUNCE_OR_FORWARD_802_3_PACKET(pAd, pRxBlk->pRxPacket, FromWhichBSSID);
 
        if (pPacket2)
        {
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-                       ANNOUNCE_OR_FORWARD_802_3_PACKET(pAd, pPacket2, FromWhichBSSID);
+               ANNOUNCE_OR_FORWARD_802_3_PACKET(pAd, pPacket2, FromWhichBSSID);
        }
 }
 
@@ -3051,7 +3027,6 @@ VOID Indicate_EAPOL_Packet(
 {
        MAC_TABLE_ENTRY *pEntry = NULL;
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                pEntry = &pAd->MacTab.Content[BSSID_WCID];
                STARxEAPOLFrameIndicate(pAd, pEntry, pRxBlk, FromWhichBSSID);
index b9e8795845bce41f8d2129e77ceb35f73c1cd6f9..fb1735533b74c1d84091f6f35a36b4c31b9a7734 100644 (file)
@@ -1105,7 +1105,6 @@ VOID RT28xxPciMlmeRadioOFF(
        // Set LED
        RTMPSetLED(pAd, LED_RADIO_OFF);
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
     {
        BOOLEAN         Cancelled;
 
index dc919160752a4f3952d552fca357d380dfaaae37..a172f3715e4052d8d630da1c6d543bddc98308b9 100644 (file)
@@ -225,8 +225,7 @@ INT Set_DriverVersion_Proc(
        IN      PRTMP_ADAPTER   pAd,
        IN      PUCHAR                  arg)
 {
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               DBGPRINT(RT_DEBUG_TRACE, ("Driver version-%s\n", STA_DRIVER_VERSION));
+       DBGPRINT(RT_DEBUG_TRACE, ("Driver version-%s\n", STA_DRIVER_VERSION));
 
     return TRUE;
 }
@@ -336,7 +335,6 @@ INT Set_WirelessMode_Proc(
 
        WirelessMode = simple_strtol(arg, 0, 10);
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                INT MaxPhyMode = PHY_11G;
 
@@ -405,7 +403,6 @@ INT Set_Channel_Proc(
        // check if this channel is valid
        if (ChannelSanity(pAd, Channel) == TRUE)
        {
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                        pAd->CommonCfg.Channel = Channel;
 
@@ -433,8 +430,7 @@ INT Set_Channel_Proc(
        }
        else
        {
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-                       success = FALSE;
+               success = FALSE;
        }
 
 
@@ -490,7 +486,6 @@ INT Set_TxPower_Proc(
        TxPower = (ULONG) simple_strtol(arg, 0, 10);
        if (TxPower <= 100)
        {
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                        pAd->CommonCfg.TxPowerDefault = TxPower;
                        pAd->CommonCfg.TxPowerPercentage = pAd->CommonCfg.TxPowerDefault;
@@ -560,8 +555,7 @@ INT Set_TxPreamble_Proc(
                case Rt802_11PreambleShort:
                        pAd->CommonCfg.TxPreamble = Preamble;
 
-                       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-                               MlmeSetTxPreamble(pAd, Rt802_11PreambleShort);
+                       MlmeSetTxPreamble(pAd, Rt802_11PreambleShort);
                        break;
                case Rt802_11PreambleLong:
                case Rt802_11PreambleAuto:
@@ -569,8 +563,7 @@ INT Set_TxPreamble_Proc(
                        // capability upon association.
                        pAd->CommonCfg.TxPreamble = Preamble;
 
-                       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-                               MlmeSetTxPreamble(pAd, Rt802_11PreambleLong);
+                       MlmeSetTxPreamble(pAd, Rt802_11PreambleLong);
                        break;
                default: //Invalid argument
                        return FALSE;
@@ -641,7 +634,6 @@ INT Set_FragThreshold_Proc(
                pAd->CommonCfg.FragmentThreshold = (USHORT)FragThresh;
        }
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                if (pAd->CommonCfg.FragmentThreshold == MAX_FRAG_THRESHOLD)
                        pAd->CommonCfg.bUseZeroToDisableFragment = TRUE;
@@ -1173,8 +1165,7 @@ VOID      RTMPSetPhyMode(
 
        if (i == pAd->ChannelListNum)
        {
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-                       pAd->CommonCfg.Channel = FirstChannel(pAd);
+               pAd->CommonCfg.Channel = FirstChannel(pAd);
                DBGPRINT(RT_DEBUG_ERROR, ("RTMPSetPhyMode: channel is out of range, use first channel=%d \n", pAd->CommonCfg.Channel));
        }
 
@@ -1479,10 +1470,7 @@ VOID     RTMPSetHT(
        }
        AsicSetEdcaParm(pAd, &pAd->CommonCfg.APEdcaParm);
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-       {
-               RTMPSetIndividualHT(pAd, 0);
-       }
+       RTMPSetIndividualHT(pAd, 0);
 }
 
 /*
@@ -1507,7 +1495,6 @@ VOID      RTMPSetIndividualHT(
 
        do
        {
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                        pDesired_ht_phy = &pAd->StaCfg.DesiredHtPhyInfo;
                        DesiredMcs = pAd->StaCfg.DesiredTransmitSetting.field.MCS;
@@ -1664,7 +1651,6 @@ VOID      RTMPAddWcidAttributeEntry(
        USHORT          Wcid = 0;
 
        {
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                        if (BssIdx > BSS0)
                        {
@@ -1689,7 +1675,6 @@ VOID      RTMPAddWcidAttributeEntry(
        // Update WCID attribute table
        offset = MAC_WCID_ATTRIBUTE_BASE + (Wcid * HW_WCID_ATTRI_SIZE);
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                if (pEntry && pEntry->ValidAsMesh)
                        WCIDAttri = (CipherAlg<<1) | PAIRWISEKEYTABLE;
@@ -2199,7 +2184,6 @@ INT       Set_HtMcs_Proc(
        else
                HtMcs = MCS_AUTO;
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                pAd->StaCfg.DesiredTransmitSetting.field.MCS = HtMcs;
                pAd->StaCfg.bAutoTxRateSwitch = (HtMcs == MCS_AUTO) ? TRUE:FALSE;
@@ -2703,8 +2687,7 @@ INT       Set_FixedTxMode_Proc(
         fix_tx_mode = FIXED_TXMODE_CCK;
        }
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               pAd->StaCfg.DesiredTransmitSetting.field.FixedTxMode = fix_tx_mode;
+       pAd->StaCfg.DesiredTransmitSetting.field.FixedTxMode = fix_tx_mode;
 
        DBGPRINT(RT_DEBUG_TRACE, ("Set_FixedTxMode_Proc::(FixedTxMode=%d)\n", fix_tx_mode));
 
@@ -2789,8 +2772,7 @@ INT       Show_SSID_Proc(
        IN      PRTMP_ADAPTER   pAd,
        OUT     PUCHAR                  pBuf)
 {
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               sprintf(pBuf, "\t%s", pAd->CommonCfg.Ssid);
+       sprintf(pBuf, "\t%s", pAd->CommonCfg.Ssid);
        return 0;
 }
 
@@ -2948,8 +2930,7 @@ INT       Show_HtMcs_Proc(
        IN      PRTMP_ADAPTER   pAd,
        OUT     PUCHAR                  pBuf)
 {
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               sprintf(pBuf, "\t%u", pAd->StaCfg.DesiredTransmitSetting.field.MCS);
+       sprintf(pBuf, "\t%u", pAd->StaCfg.DesiredTransmitSetting.field.MCS);
        return 0;
 }
 
@@ -3090,8 +3071,7 @@ INT       Show_WmmCapable_Proc(
        IN      PRTMP_ADAPTER   pAd,
        OUT     PUCHAR                  pBuf)
 {
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               sprintf(pBuf, "\t%s", pAd->CommonCfg.bWmmCapable ? "TRUE":"FALSE");
+       sprintf(pBuf, "\t%s", pAd->CommonCfg.bWmmCapable ? "TRUE":"FALSE");
 
        return 0;
 }
@@ -3136,8 +3116,7 @@ INT       Show_AuthMode_Proc(
 {
        NDIS_802_11_AUTHENTICATION_MODE AuthMode = Ndis802_11AuthModeOpen;
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               AuthMode = pAd->StaCfg.AuthMode;
+       AuthMode = pAd->StaCfg.AuthMode;
 
        if ((AuthMode >= Ndis802_11AuthModeOpen) &&
                (AuthMode <= Ndis802_11AuthModeWPA1PSKWPA2PSK))
@@ -3154,8 +3133,7 @@ INT       Show_EncrypType_Proc(
 {
        NDIS_802_11_WEP_STATUS  WepStatus = Ndis802_11WEPDisabled;
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               WepStatus = pAd->StaCfg.WepStatus;
+       WepStatus = pAd->StaCfg.WepStatus;
 
        if ((WepStatus >= Ndis802_11WEPEnabled) &&
                (WepStatus <= Ndis802_11Encryption4KeyAbsent))
@@ -3172,8 +3150,7 @@ INT       Show_DefaultKeyID_Proc(
 {
        UCHAR DefaultKeyId = 0;
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               DefaultKeyId = pAd->StaCfg.DefaultKeyId;
+       DefaultKeyId = pAd->StaCfg.DefaultKeyId;
 
        sprintf(pBuf, "\t%d", DefaultKeyId);
 
@@ -3243,8 +3220,7 @@ INT       Show_WPAPSK_Proc(
        INT     idx;
        UCHAR   PMK[32] = {0};
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               NdisMoveMemory(PMK, pAd->StaCfg.PMK, 32);
+       NdisMoveMemory(PMK, pAd->StaCfg.PMK, 32);
 
     sprintf(pBuf, "\tPMK = ");
     for (idx = 0; idx < 32; idx++)
index e5bebd5de93b00cd4c91825ef5505fc20a4bca67..843e44e41abed9581b3043b284144153e62e1591 100644 (file)
@@ -422,7 +422,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
                                *(USHORT *)(&pHtCapability->HtCapInfo) = cpu2le16(*(USHORT *)(&pHtCapability->HtCapInfo));
                                *(USHORT *)(&pHtCapability->ExtHtCapInfo) = cpu2le16(*(USHORT *)(&pHtCapability->ExtHtCapInfo));
 
-                               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                                {
                                        *pPreNHtCapabilityLen = 0;      // Nnow we only support 26 bytes.
 
@@ -450,7 +449,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
                                *(USHORT *)(&AddHtInfo->AddHtInfo2) = cpu2le16(*(USHORT *)(&AddHtInfo->AddHtInfo2));
                                *(USHORT *)(&AddHtInfo->AddHtInfo3) = cpu2le16(*(USHORT *)(&AddHtInfo->AddHtInfo3));
 
-                               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                                {
                                        Ptr = (PUCHAR) pVIE;
                                        NdisMoveMemory(Ptr + *LengthVIE, &pEid->Eid, pEid->Len + 2);
@@ -483,7 +481,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
                 {
                     *pChannel = *pEid->Octet;
 
-                                       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                                        {
                                                if (ChannelSanity(pAd, *pChannel) == 0)
                                                {
@@ -707,7 +704,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
     }
 
     // For some 11a AP. it did not have the channel EID, patch here
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                UCHAR LatchRfChannel = MsgChannel;
                if ((pAd->LatchRfRegs.Channel > 14) && ((Sanity & 0x4) == 0))
index cdbc8a34d3fc15fd2cbf49c948689e97335a895f..360b3bcb97d3c0b35d7a7dfc59c1473adcd2bf0c 100644 (file)
@@ -383,11 +383,8 @@ VOID ScanNextChannel(
        PHEADER_802_11  pHdr80211;
        UINT                    ScanTimeIn5gChannel = SHORT_CHANNEL_TIME;
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-       {
-               if (MONITOR_ON(pAd))
-                       return;
-       }
+       if (MONITOR_ON(pAd))
+               return;
 
        if (pAd->MlmeAux.Channel == 0)
        {
@@ -411,7 +408,6 @@ VOID ScanNextChannel(
                        DBGPRINT(RT_DEBUG_TRACE, ("SYNC - End of SCAN, restore to channel %d, Total BSS[%02d]\n",pAd->CommonCfg.Channel, pAd->ScanTab.BssNr));
                }
 
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                        //
                        // To prevent data lost.
@@ -446,7 +442,6 @@ VOID ScanNextChannel(
        }
        else
        {
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                // BBP and RF are not accessible in PS mode, we has to wake them up first
                if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE))
@@ -460,7 +455,6 @@ VOID ScanNextChannel(
                AsicSwitchChannel(pAd, pAd->MlmeAux.Channel, TRUE);
                AsicLockChannel(pAd, pAd->MlmeAux.Channel);
 
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                        if (pAd->MlmeAux.Channel > 14)
                        {
@@ -515,7 +509,6 @@ VOID ScanNextChannel(
                        {
                                DBGPRINT(RT_DEBUG_TRACE, ("SYNC - ScanNextChannel() allocate memory fail\n"));
 
-                               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                                {
                                        pAd->Mlme.SyncMachine.CurrState = SYNC_IDLE;
                                        Status = MLME_FAIL_NO_RESOURCE;
@@ -590,8 +583,7 @@ VOID ScanNextChannel(
 
                // For SCAN_CISCO_PASSIVE, do nothing and silently wait for beacon or other probe reponse
 
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-                       pAd->Mlme.SyncMachine.CurrState = SCAN_LISTEN;
+               pAd->Mlme.SyncMachine.CurrState = SCAN_LISTEN;
        }
 }
 
index 4074db23a14ef8baeb38867d39d4b0362c2376a6..e206077e278a46e5e6ee38c5062a843f3cd16a41 100644 (file)
@@ -623,7 +623,6 @@ VOID RTMPMakeRSNIE(
        rsnielen_ex_cur_p = NULL;
 
        {
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                        if (pAd->StaCfg.WpaSupplicantUP != WPA_SUPPLICANT_DISABLE)
                        {
index 81332673437ed1b4b62eca5d3b8553ab37520f8e..886dcbeb0bf36cdc88314950957b06e4e2a15488 100644 (file)
@@ -477,7 +477,6 @@ NDIS_STATUS MlmeInit(
                pAd->Mlme.bRunning = FALSE;
                NdisAllocateSpinLock(&pAd->Mlme.TaskLock);
 
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                        BssTableInit(&pAd->ScanTab);
 
@@ -505,7 +504,6 @@ NDIS_STATUS MlmeInit(
                // software-based RX Antenna diversity
                RTMPInitTimer(pAd, &pAd->Mlme.RxAntEvalTimer, GET_TIMER_FUNCTION(AsicRxAntEvalTimeout), pAd, FALSE);
 
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE))
                {
@@ -647,7 +645,6 @@ VOID MlmeHalt(
                AsicDisableSync(pAd);
        }
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                // Cancel pending timers
                RTMPCancelTimer(&pAd->MlmeAux.AssocTimer,               &Cancelled);
@@ -756,7 +753,6 @@ VOID MlmePeriodicExec(
                pAd->StaCfg.WpaSupplicantUP = 1;
        }
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
            // If Hardware controlled Radio enabled, we have to check GPIO pin2 every 2 second.
                // Move code to here, because following code will return when radio is off
@@ -805,7 +801,6 @@ VOID MlmePeriodicExec(
                                                                fRTMP_ADAPTER_RESET_IN_PROGRESS))))
                return;
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                if ((pAd->RalinkCounters.LastReceivedByteCount == pAd->RalinkCounters.ReceivedByteCount) && (pAd->StaCfg.bRadio == TRUE))
                {
@@ -846,7 +841,6 @@ VOID MlmePeriodicExec(
 
        RT28XX_MLME_PRE_SANITY_CHECK(pAd);
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                // Do nothing if monitor mode is on
                if (MONITOR_ON(pAd))
@@ -881,7 +875,6 @@ VOID MlmePeriodicExec(
        if ((pAd->Mlme.PeriodicRound % 5 == 0) && RTMPAutoRateSwitchCheck(pAd)/*(OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_TX_RATE_SWITCH_ENABLED))*/)
        {
                // perform dynamic tx rate switching based on past TX history
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                        if ((OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED)
                                        )
@@ -952,12 +945,10 @@ VOID MlmePeriodicExec(
                        }
                }
 
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-                       STAMlmePeriodicExec(pAd);
+               STAMlmePeriodicExec(pAd);
 
                MlmeResetRalinkCounters(pAd);
 
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                        if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST) && (pAd->bPCIclkOff == FALSE))
                        {
@@ -1516,7 +1507,6 @@ VOID MlmeSelectTxRateTable(
                        break;
                }
 
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                        //else if ((pAd->StaActive.SupportedPhyInfo.MCSSet[0] == 0) && (pAd->StaActive.SupportedPhyInfo.MCSSet[1] == 0))
                        if ((pEntry->HTCapability.MCSSet[0] == 0) && (pEntry->HTCapability.MCSSet[1] == 0))
@@ -2805,7 +2795,6 @@ VOID MlmeUpdateTxRates(
 
 //===========================================================================
 //===========================================================================
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                pHtPhy          = &pAd->StaCfg.HTPhyMode;
                pMaxHtPhy       = &pAd->StaCfg.MaxHTPhyMode;
@@ -2934,8 +2923,7 @@ VOID MlmeUpdateTxRates(
        {
                short dbm = 0;
 
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-                       dbm = pAd->StaCfg.RssiSample.AvgRssi0 - pAd->BbpRssiToDbmDelta;
+               dbm = pAd->StaCfg.RssiSample.AvgRssi0 - pAd->BbpRssiToDbmDelta;
 
                if (bLinkUp == TRUE)
                        pAd->CommonCfg.TxRate = RATE_24;
@@ -3088,7 +3076,6 @@ VOID MlmeUpdateHtTxRates(
 
        auto_rate_cur_p = NULL;
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                pDesireHtPhy    = &pAd->StaCfg.DesiredHtPhyInfo;
                pActiveHtPhy    = &pAd->StaCfg.DesiredHtPhyInfo;
@@ -3562,7 +3549,6 @@ VOID BssEntrySet(
        else
                pBss->QbssLoad.bValid = FALSE;
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                PEID_STRUCT     pEid;
                USHORT          Length = 0;
@@ -4357,8 +4343,7 @@ VOID MgtMacHeaderInit(
        pHdr80211->FC.ToDs = ToDs;
        COPY_MAC_ADDR(pHdr80211->Addr1, pDA);
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               COPY_MAC_ADDR(pHdr80211->Addr2, pAd->CurrentAddress);
+       COPY_MAC_ADDR(pHdr80211->Addr2, pAd->CurrentAddress);
 
        COPY_MAC_ADDR(pHdr80211->Addr3, pBssid);
 }
@@ -4566,7 +4551,6 @@ BOOLEAN MlmeEnqueueForRecv(
                return FALSE;
        }
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                if (!MsgTypeSubst(pAd, pFrame, &Machine, &MsgType))
                {
@@ -4674,7 +4658,6 @@ VOID      MlmeRestartStateMachine(
                }
        }
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                // Cancel all timer events
                // Be careful to cancel new added timer
@@ -4693,7 +4676,6 @@ VOID      MlmeRestartStateMachine(
        // Resume MSDU which is turned off durning scan
        RTMPResumeMsduTransmission(pAd);
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                // Set all state machines back IDLE
                pAd->Mlme.CntlMachine.CurrState    = CNTL_IDLE;
@@ -6223,7 +6205,6 @@ VOID AsicEnableBssSync(
 
        RTMP_IO_READ32(pAd, BCN_TIME_CFG, &csr.word);
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                csr.field.BeaconInterval = pAd->CommonCfg.BeaconPeriod << 4; // ASIC register in units of 1/16 TU
                csr.field.bTsfTicking = 1;
@@ -6427,7 +6408,6 @@ VOID AsicSetEdcaParm(
                Ac2Cfg.field.Cwmax = pEdcaParm->Cwmax[QID_AC_VI];
                Ac2Cfg.field.Aifsn = pEdcaParm->Aifsn[QID_AC_VI];
 
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                        // Tuning for Wi-Fi WMM S06
                        if (pAd->CommonCfg.bWiFiTest &&
@@ -6485,8 +6465,7 @@ VOID AsicSetEdcaParm(
                CwminCsr.field.Cwmin1 = pEdcaParm->Cwmin[QID_AC_BK];
                CwminCsr.field.Cwmin2 = pEdcaParm->Cwmin[QID_AC_VI];
 
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-                       CwminCsr.field.Cwmin3 = pEdcaParm->Cwmin[QID_AC_VO] - 1; //for TGn wifi test
+               CwminCsr.field.Cwmin3 = pEdcaParm->Cwmin[QID_AC_VO] - 1; //for TGn wifi test
 
                RTMP_IO_WRITE32(pAd, WMM_CWMIN_CFG, CwminCsr.word);
 
@@ -6502,7 +6481,6 @@ VOID AsicSetEdcaParm(
                AifsnCsr.field.Aifsn1 = Ac1Cfg.field.Aifsn; //pEdcaParm->Aifsn[QID_AC_BK];
                AifsnCsr.field.Aifsn2 = Ac2Cfg.field.Aifsn; //pEdcaParm->Aifsn[QID_AC_VI];
 
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                        // Tuning for Wi-Fi WMM S06
                        if (pAd->CommonCfg.bWiFiTest &&
@@ -6519,8 +6497,7 @@ VOID AsicSetEdcaParm(
                        }
                }
 
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-                       AifsnCsr.field.Aifsn3 = Ac3Cfg.field.Aifsn - 1; //pEdcaParm->Aifsn[QID_AC_VO]; //for TGn wifi test
+               AifsnCsr.field.Aifsn3 = Ac3Cfg.field.Aifsn - 1; //pEdcaParm->Aifsn[QID_AC_VO]; //for TGn wifi test
 
                RTMP_IO_WRITE32(pAd, WMM_AIFSN_CFG, AifsnCsr.word);
 
@@ -6582,7 +6559,6 @@ VOID      AsicSetSlotTime(
 
        SlotTime = (bUseShortSlotTime)? 9 : 20;
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                // force using short SLOT time for FAE to demo performance when TxBurst is ON
                if (((pAd->StaActive.SupportedPhyInfo.bHtEnable == FALSE) && (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_WMM_INUSED)))
@@ -6601,11 +6577,8 @@ VOID     AsicSetSlotTime(
        //
        // ToDo: Should consider capability with 11B
        //
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-       {
-               if (pAd->StaCfg.BssType == BSS_ADHOC)
-                       SlotTime = 20;
-       }
+       if (pAd->StaCfg.BssType == BSS_ADHOC)
+               SlotTime = 20;
 
        RTMP_IO_READ32(pAd, BKOFF_SLOT_CFG, &RegValue);
        RegValue = RegValue & 0xFFFFFF00;
@@ -7551,7 +7524,6 @@ VOID AsicEvaluateRxAnt(
 {
        UCHAR   BBPR3 = 0;
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RESET_IN_PROGRESS |
                                                                fRTMP_ADAPTER_HALT_IN_PROGRESS  |
@@ -7580,7 +7552,6 @@ VOID AsicEvaluateRxAnt(
        }
        RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, BBPR3);
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        pAd->StaCfg.BBPR3 = BBPR3;
 
        if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED)
@@ -7626,7 +7597,6 @@ VOID AsicRxAntEvalTimeout(
        UCHAR                   BBPR3 = 0;
        CHAR                    larger = -127, rssi0, rssi1, rssi2;
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RESET_IN_PROGRESS)        ||
                        RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS)             ||
@@ -7752,7 +7722,6 @@ BOOLEAN RTMPCheckEntryEnableAutoRateSwitch(
 {
        BOOLEAN         result = TRUE;
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                // only associated STA counts
                if (pEntry && (pEntry->ValidAsCLI) && (pEntry->Sst == SST_ASSOC))
@@ -7770,11 +7739,8 @@ BOOLEAN RTMPCheckEntryEnableAutoRateSwitch(
 BOOLEAN RTMPAutoRateSwitchCheck(
        IN PRTMP_ADAPTER    pAd)
 {
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-       {
-               if (pAd->StaCfg.bAutoTxRateSwitch)
-                       return TRUE;
-       }
+       if (pAd->StaCfg.bAutoTxRateSwitch)
+               return TRUE;
 
        return FALSE;
 }
@@ -7801,10 +7767,7 @@ UCHAR RTMPStaFixedTxMode(
 {
        UCHAR   tx_mode = FIXED_TXMODE_HT;
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-       {
-               tx_mode = (UCHAR)pAd->StaCfg.DesiredTransmitSetting.field.FixedTxMode;
-       }
+       tx_mode = (UCHAR)pAd->StaCfg.DesiredTransmitSetting.field.FixedTxMode;
 
        return tx_mode;
 }
index 4d2b9db2bcfe01468eec01399629a5df1458891f..611c88c9cf6de405741ffaf696d2b42c6157823d 100644 (file)
@@ -1272,7 +1272,6 @@ VOID      NICReadEEPROMParameters(
 
        NicConfig2.word = pAd->EEPROMDefaultValue[1];
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                NicConfig2.word = 0;
                if ((NicConfig2.word & 0x00ff) == 0xff)
@@ -1538,7 +1537,6 @@ VOID      NICInitAsicFromEEPROM(
     pAd->LedIndicatorStregth = 0xFF;
     RTMPSetSignalLED(pAd, -100);       // Force signal strength Led to be turned off, before link up
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                // Read Hardware controlled Radio state enable bit
                if (NicConfig2.field.HardwareRadioControl == 1)
@@ -1602,7 +1600,6 @@ VOID      NICInitAsicFromEEPROM(
        }
        RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, BBPR3);
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                // Handle the difference when 1T
                RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R1, &BBPR1);
@@ -1862,7 +1859,6 @@ NDIS_STATUS       NICInitializeAsic(
        }
 
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                for (Index = 0; Index < NUM_STA_MAC_REG_PARMS; Index++)
                {
@@ -1932,7 +1928,6 @@ NDIS_STATUS       NICInitializeAsic(
 
 
        // Add radio off control
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                if (pAd->StaCfg.bRadio == FALSE)
                {
@@ -1979,7 +1974,6 @@ NDIS_STATUS       NICInitializeAsic(
                }
        }
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                // for rt2860E and after, init TXOP_CTRL_CFG with 0x583f. This is for extension channel overlapping IOT.
                if ((pAd->MACVersion&0xffff) != 0x0101)
@@ -2972,7 +2966,6 @@ VOID      UserCfgInit(
        //
        // part II. intialize STA specific configuration
        //
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                RX_FILTER_SET_FLAG(pAd, fRX_FILTER_ACCEPT_DIRECT);
                RX_FILTER_CLEAR_FLAG(pAd, fRX_FILTER_ACCEPT_MULTICAST);
@@ -3020,7 +3013,6 @@ VOID      UserCfgInit(
        pAd->CommonCfg.PhyMode = PHY_11BG_MIXED;                // default PHY mode
        OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_SHORT_PREAMBLE_INUSED);  // CCK use LONG preamble
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                // user desired power mode
                pAd->StaCfg.WindowsPowerMode = Ndis802_11PowerModeCAM;
index cfd1960871a138404dcdfc289413ba8ef8fcbd71..3d1a8284fbd4f92235c59d952a54fa7bf13470a4 100644 (file)
 #define MAX_CHANNEL_TIME            140       // unit: msec, for single band scan
 #define        FAST_ACTIVE_SCAN_TIME       30            // Active scan waiting for probe response time
 #define CW_MIN_IN_BITS              4         // actual CwMin = 2^CW_MIN_IN_BITS - 1
-
-#ifndef CONFIG_AP_SUPPORT
 #define CW_MAX_IN_BITS              10        // actual CwMax = 2^CW_MAX_IN_BITS - 1
-#endif
 
 // Note: RSSI_TO_DBM_OFFSET has been changed to variable for new RF (2004-0720).
 // SHould not refer to this constant anymore
index a8c637a60785f65017636133fe40a21bdfd4f3ef..d74c593def79cc010d7a351c70972c3eb0aa828e 100644 (file)
@@ -486,10 +486,7 @@ PNET_DEV get_netdev_from_bssid(
 {
     PNET_DEV dev_p = NULL;
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-       {
-               dev_p = pAd->net_dev;
-       }
+       dev_p = pAd->net_dev;
 
        ASSERT(dev_p);
        return dev_p; /* return one of MBSS */
@@ -645,11 +642,8 @@ void wlan_802_11_to_802_3_packet(
        //
        //
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               NdisMoveMemory(skb_push(pOSPkt, LENGTH_802_3), pHeader802_3, LENGTH_802_3);
-       }
-
-
+       NdisMoveMemory(skb_push(pOSPkt, LENGTH_802_3), pHeader802_3, LENGTH_802_3);
+}
 
 void announce_802_3_packet(
        IN      PRTMP_ADAPTER   pAd,
index 7a09b7573b52842a8046410e86878534abc9c32b..138b136b073a54bbab357aa2e12579401dda7894 100644 (file)
@@ -195,7 +195,6 @@ int rt28xx_close(IN PNET_DEV dev)
        if (pAd == NULL)
                return 0; // close ok
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                // If dirver doesn't wake up firmware here,
                // NICLoadFirmware will hang forever when interface is up again.
@@ -260,11 +259,7 @@ int rt28xx_close(IN PNET_DEV dev)
        // Close kernel threads or tasklets
        kill_thread_task(pAd);
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-       {
-               MacTableReset(pAd);
-       }
-
+       MacTableReset(pAd);
 
        MeasureReqTabExit(pAd);
        TpcReqTabExit(pAd);
@@ -377,8 +372,7 @@ static int rt28xx_init(IN struct net_device *net_dev)
 
        CfgInitHook(pAd);
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               NdisAllocateSpinLock(&pAd->MacTabLock);
+       NdisAllocateSpinLock(&pAd->MacTabLock);
 
        MeasureReqTabInit(pAd);
        TpcReqTabInit(pAd);
@@ -547,11 +541,8 @@ int rt28xx_open(IN PNET_DEV dev)
        if (rt28xx_init(net_dev) == FALSE)
                goto err;
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-       {
-               NdisZeroMemory(pAd->StaCfg.dev_name, 16);
-               NdisMoveMemory(pAd->StaCfg.dev_name, net_dev->name, strlen(net_dev->name));
-       }
+       NdisZeroMemory(pAd->StaCfg.dev_name, 16);
+       NdisMoveMemory(pAd->StaCfg.dev_name, net_dev->name, strlen(net_dev->name));
 
        // Set up the Mac address
        NdisMoveMemory(net_dev->dev_addr, (void *) pAd->CurrentAddress, 6);
@@ -561,10 +552,6 @@ int rt28xx_open(IN PNET_DEV dev)
 
        // Various AP function init
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-       {
-       }
-
        // Enable Interrupt
        RT28XX_IRQ_ENABLE(pAd);
 
@@ -578,7 +565,6 @@ int rt28xx_open(IN PNET_DEV dev)
        printk("0x1300 = %08x\n", reg);
        }
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
         RTMPInitPCIeLinkCtrlValue(pAd);
 
        return (retval);
@@ -776,7 +762,6 @@ int rt28xx_packet_xmit(struct sk_buff *skb)
        int status = 0;
        PNDIS_PACKET pPacket = (PNDIS_PACKET) skb;
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
                // Drop send request since we are in monitor mode
                if (MONITOR_ON(pAd))
@@ -802,11 +787,7 @@ int rt28xx_packet_xmit(struct sk_buff *skb)
     }
 #endif
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-       {
-
-               STASendPackets((NDIS_HANDLE)pAd, (PPNDIS_PACKET) &pPacket, 1);
-       }
+       STASendPackets((NDIS_HANDLE)pAd, (PPNDIS_PACKET) &pPacket, 1);
 
        status = 0;
 done:
@@ -928,10 +909,7 @@ INT rt28xx_ioctl(
                return -ENETDOWN;
        }
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-       {
-               ret = rt28xx_sta_ioctl(net_dev, rq, cmd);
-       }
+       ret = rt28xx_sta_ioctl(net_dev, rq, cmd);
 
        return ret;
 }
index d89a1c71624527eaef01ef821d444e66fd28cadc..48ec80863a9057f143517c1ebe9297e3ef8fadde 100644 (file)
@@ -754,7 +754,6 @@ static void rtmp_read_key_parms_from_file(IN  PRTMP_ADAPTER pAd, char *tmpbuf, c
        //DefaultKeyID
        if(RTMPGetKeyParameter("DefaultKeyID", tmpbuf, 25, buffer))
        {
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                        KeyIdx = simple_strtol(tmpbuf, 0, 10);
                        if((KeyIdx >= 1 ) && (KeyIdx <= 4))
@@ -778,7 +777,6 @@ static void rtmp_read_key_parms_from_file(IN  PRTMP_ADAPTER pAd, char *tmpbuf, c
                            KeyType[i] = simple_strtol(macptr, 0, 10);
                    }
 
-                       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                        {
                                sprintf(tok_str, "Key%dStr", idx + 1);
                                if (RTMPGetCriticalParameter(tok_str, tmpbuf, 128, buffer))
@@ -884,8 +882,7 @@ NDIS_STATUS RTMPReadParametersHook(
         return NDIS_STATUS_FAILURE;
        }
 
-       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-               src = STA_PROFILE_PATH;
+       src = STA_PROFILE_PATH;
 
        // Save uid and gid used for filesystem access.
        // Set user and group to 0 (root)
@@ -959,7 +956,6 @@ NDIS_STATUS RTMPReadParametersHook(
                                                pAd->CommonCfg.CountryCode[2] = ' ';
                                        }
 
-                                       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                                        {
                                                //SSID
                                                if (RTMPGetCriticalParameter("SSID", tmpbuf, 256, buffer))
@@ -980,7 +976,6 @@ NDIS_STATUS RTMPReadParametersHook(
                                                }
                                        }
 
-                                       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                                        {
                                                //NetworkType
                                                if (RTMPGetKeyParameter("NetworkType", tmpbuf, 25, buffer))
@@ -1034,8 +1029,7 @@ NDIS_STATUS       RTMPReadParametersHook(
                                        {
                                                pAd->CommonCfg.TxPowerPercentage = (ULONG) simple_strtol(tmpbuf, 0, 10);
 
-                                               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-                                                       pAd->CommonCfg.TxPowerDefault = pAd->CommonCfg.TxPowerPercentage;
+                                               pAd->CommonCfg.TxPowerDefault = pAd->CommonCfg.TxPowerPercentage;
 
                                                DBGPRINT(RT_DEBUG_TRACE, ("TxPower=%ld\n", pAd->CommonCfg.TxPowerPercentage));
                                        }
@@ -1153,8 +1147,7 @@ NDIS_STATUS       RTMPReadParametersHook(
 #endif // AGGREGATION_SUPPORT //
 
                                        // WmmCapable
-                                       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
-                                               rtmp_read_sta_wmm_parms_from_file(pAd, tmpbuf, buffer);
+                                       rtmp_read_sta_wmm_parms_from_file(pAd, tmpbuf, buffer);
 
                                        //ShortSlot
                                        if(RTMPGetKeyParameter("ShortSlot", tmpbuf, 10, buffer))
@@ -1257,7 +1250,6 @@ NDIS_STATUS       RTMPReadParametersHook(
                                        //AuthMode
                                        if(RTMPGetKeyParameter("AuthMode", tmpbuf, 128, buffer))
                                        {
-                                               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                                                {
                                                        if ((strcmp(tmpbuf, "WEPAUTO") == 0) || (strcmp(tmpbuf, "wepauto") == 0))
                                                            pAd->StaCfg.AuthMode = Ndis802_11AuthModeAutoSwitch;
@@ -1284,7 +1276,6 @@ NDIS_STATUS       RTMPReadParametersHook(
                                        //EncrypType
                                        if(RTMPGetKeyParameter("EncrypType", tmpbuf, 128, buffer))
                                        {
-                                               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                                                {
                                                        if ((strcmp(tmpbuf, "WEP") == 0) || (strcmp(tmpbuf, "wep") == 0))
                                                                pAd->StaCfg.WepStatus   = Ndis802_11WEPEnabled;
@@ -1305,7 +1296,6 @@ NDIS_STATUS       RTMPReadParametersHook(
                                                }
                                        }
 
-                                       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                                        {
                                                if(RTMPGetCriticalParameter("WPAPSK", tmpbuf, 512, buffer))
                                                {
@@ -1360,7 +1350,6 @@ NDIS_STATUS       RTMPReadParametersHook(
 
                                        HTParametersHook(pAd, tmpbuf, buffer);
 
-                                       IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                                        {
                                                //PSMode
                                                if (RTMPGetKeyParameter("PSMode", tmpbuf, 32, buffer))
@@ -1713,7 +1702,6 @@ static void       HTParametersHook(
        {
                UCHAR   fix_tx_mode;
 
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                        fix_tx_mode = FIXED_TXMODE_HT;
 
@@ -1789,7 +1777,6 @@ static void       HTParametersHook(
        // MSC
        if (RTMPGetKeyParameter("HT_MCS", pValueStr, 50, pInput))
        {
-               IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
                        Value = simple_strtol(pValueStr, 0, 10);
 
index 51e58db50f593bbd8e37d6297263e497599c6a86..9d10185afc935946904e3166923817a6b0ef70e8 100644 (file)
 
 //#define DBG_DIAGNOSE         1
 
-#if defined(CONFIG_AP_SUPPORT)
-#define IF_DEV_CONFIG_OPMODE_ON_AP(_pAd)       if(_pAd->OpMode == OPMODE_AP)
-#define IF_DEV_CONFIG_OPMODE_ON_STA(_pAd)      if(_pAd->OpMode == OPMODE_STA)
-#else
-#define IF_DEV_CONFIG_OPMODE_ON_AP(_pAd)
-#define IF_DEV_CONFIG_OPMODE_ON_STA(_pAd)
-#endif
-
 #define VIRTUAL_IF_INC(__pAd) ((__pAd)->VirtualIfCnt++)
 #define VIRTUAL_IF_DEC(__pAd) ((__pAd)->VirtualIfCnt--)
 #define VIRTUAL_IF_NUM(__pAd) ((__pAd)->VirtualIfCnt)
index 5abe8d746e278784c0af7c58da7a23d3e15ad3ff..7ba584ce0d8c8effccd6a874035db75d112a0fd2 100644 (file)
 #define MAX_RX_REORDERBUF              64
 #define DEFAULT_TX_TIMEOUT             30
 #define DEFAULT_RX_TIMEOUT             30
-#ifndef CONFIG_AP_SUPPORT
 #define MAX_BARECI_SESSION             8
-#endif
 
 #ifndef IW_ESSID_MAX_SIZE
 /* Maximum size of the ESSID and pAd->nickname strings */
index a2644a92f6f968f8ef719a6234f2d830b7cd7103..73a83d490b37f3a5a41590e0a2fc3e289f9f9d4d 100644 (file)
@@ -3007,11 +3007,7 @@ static const iw_handler rt_handler[] =
 static const iw_handler rt_priv_handlers[] = {
        (iw_handler) NULL, /* + 0x00 */
        (iw_handler) NULL, /* + 0x01 */
-#ifndef CONFIG_AP_SUPPORT
        (iw_handler) rt_ioctl_setparam, /* + 0x02 */
-#else
-       (iw_handler) NULL, /* + 0x02 */
-#endif // CONFIG_AP_SUPPORT //
 #ifdef DBG
        (iw_handler) rt_private_ioctl_bbp, /* + 0x03 */
 #else