Commit 84717059 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Greg Kroah-Hartman

Staging: rt3070: remove CONFIG_STA_SUPPORT ifdefs

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent bc05b159
...@@ -46,12 +46,10 @@ ...@@ -46,12 +46,10 @@
// Otherwise post to forum in ralinktech's web site(www.ralinktech.com) and let all users help you. *** // Otherwise post to forum in ralinktech's web site(www.ralinktech.com) and let all users help you. ***
MODULE_AUTHOR("Paul Lin <paul_lin@ralinktech.com>"); MODULE_AUTHOR("Paul Lin <paul_lin@ralinktech.com>");
MODULE_DESCRIPTION("RT2870 Wireless Lan Linux Driver"); MODULE_DESCRIPTION("RT2870 Wireless Lan Linux Driver");
#ifdef CONFIG_STA_SUPPORT
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
#ifdef MODULE_VERSION #ifdef MODULE_VERSION
MODULE_VERSION(STA_DRIVER_VERSION); MODULE_VERSION(STA_DRIVER_VERSION);
#endif #endif
#endif // CONFIG_STA_SUPPORT //
/* Kernel thread and vars, which handles packets that are completed. Only /* Kernel thread and vars, which handles packets that are completed. Only
* packets that have a "complete" function are sent here. This way, the * packets that have a "complete" function are sent here. This way, the
...@@ -614,7 +612,6 @@ VOID RT2870_WatchDog(IN RTMP_ADAPTER *pAd) ...@@ -614,7 +612,6 @@ VOID RT2870_WatchDog(IN RTMP_ADAPTER *pAd)
} }
//PS packets use HCCA queue when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA) //PS packets use HCCA queue when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA)
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
idx = 0; idx = 0;
...@@ -630,7 +627,6 @@ VOID RT2870_WatchDog(IN RTMP_ADAPTER *pAd) ...@@ -630,7 +627,6 @@ VOID RT2870_WatchDog(IN RTMP_ADAPTER *pAd)
RTMP_IO_WRITE32(pAd, PBF_CFG, 0xf40006); RTMP_IO_WRITE32(pAd, PBF_CFG, 0xf40006);
} }
} }
#endif // CONFIG_STA_SUPPORT //
if (pAd->watchDogRxOverFlowCnt >= 2) if (pAd->watchDogRxOverFlowCnt >= 2)
{ {
...@@ -1318,13 +1314,10 @@ VOID RT2870_BssBeaconStop( ...@@ -1318,13 +1314,10 @@ VOID RT2870_BssBeaconStop(
{ {
INT NumOfBcn; INT NumOfBcn;
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
NumOfBcn = MAX_MESH_NUM; NumOfBcn = MAX_MESH_NUM;
} }
#endif // CONFIG_STA_SUPPORT //
RTMPCancelTimer(&pAd->CommonCfg.BeaconUpdateTimer, &Cancelled); RTMPCancelTimer(&pAd->CommonCfg.BeaconUpdateTimer, &Cancelled);
...@@ -1357,22 +1350,16 @@ VOID RT2870_BssBeaconStart( ...@@ -1357,22 +1350,16 @@ VOID RT2870_BssBeaconStart(
{ {
INT NumOfBcn; INT NumOfBcn;
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
NumOfBcn = MAX_MESH_NUM; NumOfBcn = MAX_MESH_NUM;
} }
#endif // CONFIG_STA_SUPPORT //
for(apidx=0; apidx<NumOfBcn; apidx++) for(apidx=0; apidx<NumOfBcn; apidx++)
{ {
UCHAR CapabilityInfoLocationInBeacon = 0; UCHAR CapabilityInfoLocationInBeacon = 0;
UCHAR TimIELocationInBeacon = 0; UCHAR TimIELocationInBeacon = 0;
#ifdef CONFIG_STA_SUPPORT
#endif // CONFIG_STA_SUPPORT //
NdisZeroMemory(pBeaconSync->BeaconBuf[apidx], HW_BEACON_OFFSET); NdisZeroMemory(pBeaconSync->BeaconBuf[apidx], HW_BEACON_OFFSET);
pBeaconSync->CapabilityInfoLocationInBeacon[apidx] = CapabilityInfoLocationInBeacon; pBeaconSync->CapabilityInfoLocationInBeacon[apidx] = CapabilityInfoLocationInBeacon;
pBeaconSync->TimIELocationInBeacon[apidx] = TimIELocationInBeacon; pBeaconSync->TimIELocationInBeacon[apidx] = TimIELocationInBeacon;
......
...@@ -3,7 +3,6 @@ obj-$(CONFIG_RT3070) += rt3070sta.o ...@@ -3,7 +3,6 @@ obj-$(CONFIG_RT3070) += rt3070sta.o
# TODO: all of these should be removed # TODO: all of these should be removed
EXTRA_CFLAGS += -DLINUX -DAGGREGATION_SUPPORT -DPIGGYBACK_SUPPORT -DWMM_SUPPORT EXTRA_CFLAGS += -DLINUX -DAGGREGATION_SUPPORT -DPIGGYBACK_SUPPORT -DWMM_SUPPORT
EXTRA_CFLAGS += -DRT2870 -DRT30xx -DRT3070 EXTRA_CFLAGS += -DRT2870 -DRT30xx -DRT3070
EXTRA_CFLAGS += -DCONFIG_STA_SUPPORT
EXTRA_CFLAGS += -DDBG EXTRA_CFLAGS += -DDBG
EXTRA_CFLAGS += -DDOT11_N_SUPPORT EXTRA_CFLAGS += -DDOT11_N_SUPPORT
EXTRA_CFLAGS += -DWPA_SUPPLICANT_SUPPORT EXTRA_CFLAGS += -DWPA_SUPPLICANT_SUPPORT
......
...@@ -234,10 +234,8 @@ NDIS_STATUS NICInitTransmit( ...@@ -234,10 +234,8 @@ NDIS_STATUS NICInitTransmit(
// //
// TX_RING_SIZE, 4 ACs // TX_RING_SIZE, 4 ACs
// //
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
for(acidx=0; acidx<4; acidx++) for(acidx=0; acidx<4; acidx++)
#endif // CONFIG_STA_SUPPORT //
{ {
#if 1 //def DOT11_N_SUPPORT #if 1 //def DOT11_N_SUPPORT
PHT_TX_CONTEXT pHTTXContext = &(pAd->TxContext[acidx]); PHT_TX_CONTEXT pHTTXContext = &(pAd->TxContext[acidx]);
...@@ -436,10 +434,8 @@ NDIS_STATUS NICInitTransmit( ...@@ -436,10 +434,8 @@ NDIS_STATUS NICInitTransmit(
} }
out1: out1:
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
for(acidx=0; acidx<4; acidx++) for(acidx=0; acidx<4; acidx++)
#endif // CONFIG_STA_SUPPORT //
{ {
PHT_TX_CONTEXT pTxContext = &(pAd->TxContext[acidx]); PHT_TX_CONTEXT pTxContext = &(pAd->TxContext[acidx]);
if (pTxContext) if (pTxContext)
...@@ -646,10 +642,8 @@ VOID RTMPFreeTxRxRingMemory( ...@@ -646,10 +642,8 @@ VOID RTMPFreeTxRxRingMemory(
// Free Tx frame resource // Free Tx frame resource
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
for(acidx=0; acidx<4; acidx++) for(acidx=0; acidx<4; acidx++)
#endif // CONFIG_STA_SUPPORT //
{ {
PHT_TX_CONTEXT pHTTXContext = &(pAd->TxContext[acidx]); PHT_TX_CONTEXT pHTTXContext = &(pAd->TxContext[acidx]);
if (pHTTXContext) if (pHTTXContext)
...@@ -810,8 +804,6 @@ NDIS_STATUS CreateThreads( ...@@ -810,8 +804,6 @@ NDIS_STATUS CreateThreads(
return NDIS_STATUS_SUCCESS; return NDIS_STATUS_SUCCESS;
} }
#ifdef CONFIG_STA_SUPPORT
/* /*
======================================================================== ========================================================================
Routine Description: Routine Description:
...@@ -992,7 +984,6 @@ VOID RTMPAddBSSIDCipher( ...@@ -992,7 +984,6 @@ VOID RTMPAddBSSIDCipher(
DBGPRINT_RAW(RT_DEBUG_TRACE,(" %x:", pKey->KeyMaterial[i])); DBGPRINT_RAW(RT_DEBUG_TRACE,(" %x:", pKey->KeyMaterial[i]));
DBGPRINT(RT_DEBUG_TRACE,(" \n")); DBGPRINT(RT_DEBUG_TRACE,(" \n"));
} }
#endif // CONFIG_STA_SUPPORT //
/* /*
======================================================================== ========================================================================
......
...@@ -128,7 +128,6 @@ VOID MlmeADDBAAction( ...@@ -128,7 +128,6 @@ VOID MlmeADDBAAction(
pBAEntry =&pAd->BATable.BAOriEntry[Idx]; pBAEntry =&pAd->BATable.BAOriEntry[Idx];
} }
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
if (ADHOC_ON(pAd)) if (ADHOC_ON(pAd))
...@@ -137,7 +136,6 @@ VOID MlmeADDBAAction( ...@@ -137,7 +136,6 @@ VOID MlmeADDBAAction(
ActHeaderInit(pAd, &Frame.Hdr, pAd->CommonCfg.Bssid, pAd->CurrentAddress, pInfo->pAddr); ActHeaderInit(pAd, &Frame.Hdr, pAd->CommonCfg.Bssid, pAd->CurrentAddress, pInfo->pAddr);
} }
#endif // CONFIG_STA_SUPPORT //
Frame.Category = CATEGORY_BA; Frame.Category = CATEGORY_BA;
Frame.Action = ADDBA_REQ; Frame.Action = ADDBA_REQ;
...@@ -214,10 +212,8 @@ VOID MlmeDELBAAction( ...@@ -214,10 +212,8 @@ VOID MlmeDELBAAction(
// SEND BAR (Send BAR to refresh peer reordering buffer.) // SEND BAR (Send BAR to refresh peer reordering buffer.)
Idx = pAd->MacTab.Content[pInfo->Wcid].BAOriWcidArray[pInfo->TID]; Idx = pAd->MacTab.Content[pInfo->Wcid].BAOriWcidArray[pInfo->TID];
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 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);
#endif // CONFIG_STA_SUPPORT //
FrameBar.StartingSeq.field.FragNum = 0; // make sure sequence not clear in DEL funciton. 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. FrameBar.StartingSeq.field.StartSeq = pAd->MacTab.Content[pInfo->Wcid].TxSeq[pInfo->TID]; // make sure sequence not clear in DEL funciton.
...@@ -235,7 +231,7 @@ VOID MlmeDELBAAction( ...@@ -235,7 +231,7 @@ VOID MlmeDELBAAction(
// SEND DELBA FRAME // SEND DELBA FRAME
FrameLen = 0; FrameLen = 0;
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
if (ADHOC_ON(pAd)) if (ADHOC_ON(pAd))
...@@ -243,7 +239,7 @@ VOID MlmeDELBAAction( ...@@ -243,7 +239,7 @@ VOID MlmeDELBAAction(
else else
ActHeaderInit(pAd, &Frame.Hdr, pAd->CommonCfg.Bssid, pAd->CurrentAddress, pAd->MacTab.Content[pInfo->Wcid].Addr); ActHeaderInit(pAd, &Frame.Hdr, pAd->CommonCfg.Bssid, pAd->CurrentAddress, pAd->MacTab.Content[pInfo->Wcid].Addr);
} }
#endif // CONFIG_STA_SUPPORT //
Frame.Category = CATEGORY_BA; Frame.Category = CATEGORY_BA;
Frame.Action = DELBA; Frame.Action = DELBA;
Frame.DelbaParm.Initiator = pInfo->Initiator; Frame.DelbaParm.Initiator = pInfo->Initiator;
...@@ -370,7 +366,6 @@ static VOID respond_ht_information_exchange_action( ...@@ -370,7 +366,6 @@ static VOID respond_ht_information_exchange_action(
NdisZeroMemory(&HTINFOframe, sizeof(FRAME_HT_INFO)); NdisZeroMemory(&HTINFOframe, sizeof(FRAME_HT_INFO));
// 2-1. Prepare ADDBA Response frame. // 2-1. Prepare ADDBA Response frame.
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
if (ADHOC_ON(pAd)) if (ADHOC_ON(pAd))
...@@ -378,7 +373,6 @@ static VOID respond_ht_information_exchange_action( ...@@ -378,7 +373,6 @@ static VOID respond_ht_information_exchange_action(
else else
ActHeaderInit(pAd, &HTINFOframe.Hdr, pAd->CommonCfg.Bssid, pAd->CurrentAddress, pAddr); ActHeaderInit(pAd, &HTINFOframe.Hdr, pAd->CommonCfg.Bssid, pAd->CurrentAddress, pAddr);
} }
#endif // CONFIG_STA_SUPPORT //
HTINFOframe.Category = CATEGORY_HT; HTINFOframe.Category = CATEGORY_HT;
HTINFOframe.Action = HT_INFO_EXCHANGE; HTINFOframe.Action = HT_INFO_EXCHANGE;
...@@ -407,7 +401,7 @@ VOID PeerHTAction( ...@@ -407,7 +401,7 @@ VOID PeerHTAction(
{ {
case NOTIFY_BW_ACTION: case NOTIFY_BW_ACTION:
DBGPRINT(RT_DEBUG_TRACE,("ACTION - HT Notify Channel bandwidth action----> \n")); DBGPRINT(RT_DEBUG_TRACE,("ACTION - HT Notify Channel bandwidth action----> \n"));
#ifdef CONFIG_STA_SUPPORT
if(pAd->StaActive.SupportedPhyInfo.bHtEnable == FALSE) if(pAd->StaActive.SupportedPhyInfo.bHtEnable == FALSE)
{ {
// Note, this is to patch DIR-1353 AP. When the AP set to Wep, it will use legacy mode. But AP still keeps // Note, this is to patch DIR-1353 AP. When the AP set to Wep, it will use legacy mode. But AP still keeps
...@@ -417,7 +411,6 @@ VOID PeerHTAction( ...@@ -417,7 +411,6 @@ VOID PeerHTAction(
Elem->Msg[LENGTH_802_11+2] )); Elem->Msg[LENGTH_802_11+2] ));
break; break;
} }
#endif // CONFIG_STA_SUPPORT //
if (Elem->Msg[LENGTH_802_11+2] == 0) // 7.4.8.2. if value is 1, keep the same as supported channel bandwidth. if (Elem->Msg[LENGTH_802_11+2] == 0) // 7.4.8.2. if value is 1, keep the same as supported channel bandwidth.
pAd->MacTab.Content[Elem->Wcid].HTPhyMode.field.BW = 0; pAd->MacTab.Content[Elem->Wcid].HTPhyMode.field.BW = 0;
...@@ -546,11 +539,8 @@ VOID SendRefreshBAR( ...@@ -546,11 +539,8 @@ VOID SendRefreshBAR(
Sequence = pEntry->TxSeq[TID]; Sequence = pEntry->TxSeq[TID];
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
BarHeaderInit(pAd, &FrameBar, pEntry->Addr, pAd->CurrentAddress); BarHeaderInit(pAd, &FrameBar, pEntry->Addr, pAd->CurrentAddress);
#endif // CONFIG_STA_SUPPORT //
FrameBar.StartingSeq.field.FragNum = 0; // make sure sequence not clear in DEL function. 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. FrameBar.StartingSeq.field.StartSeq = Sequence; // make sure sequence not clear in DEL funciton.
......
...@@ -133,10 +133,8 @@ void Announce_Reordering_Packet(IN PRTMP_ADAPTER pAd, ...@@ -133,10 +133,8 @@ void Announce_Reordering_Packet(IN PRTMP_ADAPTER pAd,
// pass this 802.3 packet to upper layer or forward this packet to WM directly // pass this 802.3 packet to upper layer or forward this packet to WM directly
// //
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 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));
#endif // CONFIG_STA_SUPPORT //
} }
} }
...@@ -603,11 +601,8 @@ VOID BAOriSessionAdd( ...@@ -603,11 +601,8 @@ VOID BAOriSessionAdd(
return; return;
} }
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 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);
#endif // CONFIG_STA_SUPPORT //
FrameBar.StartingSeq.field.FragNum = 0; // make sure sequence not clear in DEL function. 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. FrameBar.StartingSeq.field.StartSeq = pBAEntry->Sequence; // make sure sequence not clear in DEL funciton.
...@@ -1072,14 +1067,12 @@ VOID BAOriSessionSetupTimeout( ...@@ -1072,14 +1067,12 @@ VOID BAOriSessionSetupTimeout(
pAd = pBAEntry->pAdapter; pAd = pBAEntry->pAdapter;
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
// Do nothing if monitor mode is on // Do nothing if monitor mode is on
if (MONITOR_ON(pAd)) if (MONITOR_ON(pAd))
return; return;
} }
#endif // CONFIG_STA_SUPPORT //
pEntry = &pAd->MacTab.Content[pBAEntry->Wcid]; pEntry = &pAd->MacTab.Content[pBAEntry->Wcid];
...@@ -1218,8 +1211,8 @@ VOID PeerAddBAReqAction( ...@@ -1218,8 +1211,8 @@ VOID PeerAddBAReqAction(
} }
NdisZeroMemory(&ADDframe, sizeof(FRAME_ADDBA_RSP)); NdisZeroMemory(&ADDframe, sizeof(FRAME_ADDBA_RSP));
// 2-1. Prepare ADDBA Response frame. // 2-1. Prepare ADDBA Response frame.
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
if (ADHOC_ON(pAd)) if (ADHOC_ON(pAd))
...@@ -1227,7 +1220,7 @@ VOID PeerAddBAReqAction( ...@@ -1227,7 +1220,7 @@ VOID PeerAddBAReqAction(
else else
ActHeaderInit(pAd, &ADDframe.Hdr, pAd->CommonCfg.Bssid, pAd->CurrentAddress, pAddr); ActHeaderInit(pAd, &ADDframe.Hdr, pAd->CommonCfg.Bssid, pAd->CurrentAddress, pAddr);
} }
#endif // CONFIG_STA_SUPPORT //
ADDframe.Category = CATEGORY_BA; ADDframe.Category = CATEGORY_BA;
ADDframe.Action = ADDBA_RESP; ADDframe.Action = ADDBA_RESP;
ADDframe.Token = pAddreqFrame->Token; ADDframe.Token = pAddreqFrame->Token;
...@@ -1294,9 +1287,7 @@ VOID PeerAddBARspAction( ...@@ -1294,9 +1287,7 @@ VOID PeerAddBARspAction(
} }
// Rcv Decline StatusCode // Rcv Decline StatusCode
if ((pFrame->StatusCode == 37) if ((pFrame->StatusCode == 37)
#ifdef CONFIG_STA_SUPPORT
|| ((pAd->OpMode == OPMODE_STA) && STA_TGN_WIFI_ON(pAd) && (pFrame->StatusCode != 0)) || ((pAd->OpMode == OPMODE_STA) && STA_TGN_WIFI_ON(pAd) && (pFrame->StatusCode != 0))
#endif // CONFIG_STA_SUPPORT //
) )
{ {
pAd->MacTab.Content[Elem->Wcid].BADeclineBitmap |= 1<<pFrame->BaParm.TID; pAd->MacTab.Content[Elem->Wcid].BADeclineBitmap |= 1<<pFrame->BaParm.TID;
...@@ -1421,10 +1412,9 @@ VOID SendPSMPAction( ...@@ -1421,10 +1412,9 @@ VOID SendPSMPAction(
DBGPRINT(RT_DEBUG_ERROR,("BA - MlmeADDBAAction() allocate memory failed \n")); DBGPRINT(RT_DEBUG_ERROR,("BA - MlmeADDBAAction() allocate memory failed \n"));
return; return;
} }
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 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);
#endif // CONFIG_STA_SUPPORT //
Frame.Category = CATEGORY_HT; Frame.Category = CATEGORY_HT;
Frame.Action = SMPS_ACTION; Frame.Action = SMPS_ACTION;
...@@ -1531,10 +1521,8 @@ void convert_reordering_packet_to_preAMSDU_or_802_3_packet( ...@@ -1531,10 +1521,8 @@ void convert_reordering_packet_to_preAMSDU_or_802_3_packet(
// a. pointer pRxBlk->pData to payload // a. pointer pRxBlk->pData to payload
// b. modify pRxBlk->DataSize // b. modify pRxBlk->DataSize
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 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);
#endif // CONFIG_STA_SUPPORT //
ASSERT(pRxBlk->pRxPacket); ASSERT(pRxBlk->pRxPacket);
pRxPkt = RTPKT_TO_OSPKT(pRxBlk->pRxPacket); pRxPkt = RTPKT_TO_OSPKT(pRxBlk->pRxPacket);
...@@ -1549,15 +1537,12 @@ void convert_reordering_packet_to_preAMSDU_or_802_3_packet( ...@@ -1549,15 +1537,12 @@ void convert_reordering_packet_to_preAMSDU_or_802_3_packet(
// //
if (!RX_BLK_TEST_FLAG(pRxBlk, fRX_AMSDU)) if (!RX_BLK_TEST_FLAG(pRxBlk, fRX_AMSDU))
{ {
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
#ifdef LINUX #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 #endif
} }
#endif // CONFIG_STA_SUPPORT //
} }
} }
......
...@@ -377,14 +377,12 @@ NDIS_STATUS MlmeHardTransmitMgmtRing( ...@@ -377,14 +377,12 @@ NDIS_STATUS MlmeHardTransmitMgmtRing(
return NDIS_STATUS_FAILURE; return NDIS_STATUS_FAILURE;
} }
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
// outgoing frame always wakeup PHY to prevent frame lost // outgoing frame always wakeup PHY to prevent frame lost
if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE)) if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE))
AsicForceWakeup(pAd, TRUE); AsicForceWakeup(pAd, TRUE);
} }
#endif // CONFIG_STA_SUPPORT //
pFirstTxWI = (PTXWI_STRUC)(pSrcBufVA + TXINFO_SIZE); pFirstTxWI = (PTXWI_STRUC)(pSrcBufVA + TXINFO_SIZE);
pHeader_802_11 = (PHEADER_802_11) (pSrcBufVA + TXINFO_SIZE + TXWI_SIZE); //TXWI_SIZE); pHeader_802_11 = (PHEADER_802_11) (pSrcBufVA + TXINFO_SIZE + TXWI_SIZE); //TXWI_SIZE);
...@@ -408,7 +406,6 @@ NDIS_STATUS MlmeHardTransmitMgmtRing( ...@@ -408,7 +406,6 @@ NDIS_STATUS MlmeHardTransmitMgmtRing(
pMacEntry = MacTableLookup(pAd, pHeader_802_11->Addr1); pMacEntry = MacTableLookup(pAd, pHeader_802_11->Addr1);
} }
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
// Fixed W52 with Activity scan issue in ABG_MIXED and ABGN_MIXED mode. // Fixed W52 with Activity scan issue in ABG_MIXED and ABGN_MIXED mode.
...@@ -424,7 +421,6 @@ NDIS_STATUS MlmeHardTransmitMgmtRing( ...@@ -424,7 +421,6 @@ NDIS_STATUS MlmeHardTransmitMgmtRing(
pAd->CommonCfg.MlmeTransmit.field.MODE = 0; pAd->CommonCfg.MlmeTransmit.field.MODE = 0;
} }
} }
#endif // CONFIG_STA_SUPPORT //
// //
// Should not be hard code to set PwrMgmt to 0 (PWR_ACTIVE) // Should not be hard code to set PwrMgmt to 0 (PWR_ACTIVE)
...@@ -434,7 +430,7 @@ NDIS_STATUS MlmeHardTransmitMgmtRing( ...@@ -434,7 +430,7 @@ NDIS_STATUS MlmeHardTransmitMgmtRing(
// pHeader_802_11->FC.PwrMgmt = 0; // (pAd->StaCfg.Psm == PWR_SAVE); // pHeader_802_11->FC.PwrMgmt = 0; // (pAd->StaCfg.Psm == PWR_SAVE);
// //
// In WMM-UAPSD, mlme frame should be set psm as power saving but probe request frame // In WMM-UAPSD, mlme frame should be set psm as power saving but probe request frame
#ifdef CONFIG_STA_SUPPORT
// Data-Null packets alse pass through MMRequest in RT2860, however, we hope control the psm bit to pass APSD // Data-Null packets alse pass through MMRequest in RT2860, however, we hope control the psm bit to pass APSD
if ((pHeader_802_11->FC.Type != BTYPE_DATA) && (pHeader_802_11->FC.Type != BTYPE_CNTL)) if ((pHeader_802_11->FC.Type != BTYPE_DATA) && (pHeader_802_11->FC.Type != BTYPE_CNTL))
{ {
...@@ -444,18 +440,15 @@ NDIS_STATUS MlmeHardTransmitMgmtRing( ...@@ -444,18 +440,15 @@ NDIS_STATUS MlmeHardTransmitMgmtRing(
else else
pHeader_802_11->FC.PwrMgmt = PWR_ACTIVE; pHeader_802_11->FC.PwrMgmt = PWR_ACTIVE;
} }
#endif // CONFIG_STA_SUPPORT //
bInsertTimestamp = FALSE; bInsertTimestamp = FALSE;
if (pHeader_802_11->FC.Type == BTYPE_CNTL) // must be PS-POLL if (pHeader_802_11->FC.Type == BTYPE_CNTL) // must be PS-POLL
{ {
#ifdef CONFIG_STA_SUPPORT
//Set PM bit in ps-poll, to fix WLK 1.2 PowerSaveMode_ext failure issue. //Set PM bit in ps-poll, to fix WLK 1.2 PowerSaveMode_ext failure issue.
if ((pAd->OpMode == OPMODE_STA) && (pHeader_802_11->FC.SubType == SUBTYPE_PS_POLL)) if ((pAd->OpMode == OPMODE_STA) && (pHeader_802_11->FC.SubType == SUBTYPE_PS_POLL))
{ {
pHeader_802_11->FC.PwrMgmt = PWR_SAVE; pHeader_802_11->FC.PwrMgmt = PWR_SAVE;
} }
#endif // CONFIG_STA_SUPPORT //
bAckRequired = FALSE; bAckRequired = FALSE;
} }
else // BTYPE_MGMT or BTYPE_DATA(must be NULL frame) else // BTYPE_MGMT or BTYPE_DATA(must be NULL frame)
...@@ -725,8 +718,6 @@ BOOLEAN RTMP_FillTxBlkInfo( ...@@ -725,8 +718,6 @@ BOOLEAN RTMP_FillTxBlkInfo(
TX_BLK_SET_FLAG(pTxBlk, fTX_bAckRequired); TX_BLK_SET_FLAG(pTxBlk, fTX_bAckRequired);
{ {
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
...@@ -738,7 +729,6 @@ BOOLEAN RTMP_FillTxBlkInfo( ...@@ -738,7 +729,6 @@ BOOLEAN RTMP_FillTxBlkInfo(
// if (pAd->StaCfg.bAutoTxRateSwitch) // if (pAd->StaCfg.bAutoTxRateSwitch)
// TX_BLK_SET_FLAG(pTxBlk, fTX_AutoRateSwitch); // TX_BLK_SET_FLAG(pTxBlk, fTX_AutoRateSwitch);
} }
#endif // CONFIG_STA_SUPPORT //
} }
if (pTxBlk->TxFrameType == TX_LEGACY_FRAME) if (pTxBlk->TxFrameType == TX_LEGACY_FRAME)
...@@ -821,13 +811,10 @@ BOOLEAN CanDoAggregateTransmit( ...@@ -821,13 +811,10 @@ BOOLEAN CanDoAggregateTransmit(
return FALSE; return FALSE;
} }
#ifdef CONFIG_STA_SUPPORT
if ((INFRA_ON(pAd)) && (pAd->OpMode == OPMODE_STA)) // must be unicast to AP if ((INFRA_ON(pAd)) && (pAd->OpMode == OPMODE_STA)) // must be unicast to AP
return TRUE; return TRUE;
else else
#endif // CONFIG_STA_SUPPORT //
return FALSE; return FALSE;
} }
...@@ -881,10 +868,8 @@ VOID RTMPDeQueuePacket( ...@@ -881,10 +868,8 @@ VOID RTMPDeQueuePacket(
{ {
sQIdx = 0; sQIdx = 0;
//PS packets use HCCA queue when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA) //PS packets use HCCA queue when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA)
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
eQIdx = 3; // 4 ACs, start from 0. eQIdx = 3; // 4 ACs, start from 0.
#endif // CONFIG_STA_SUPPORT //
} }
else else
{ {
...@@ -1004,10 +989,8 @@ VOID RTMPDeQueuePacket( ...@@ -1004,10 +989,8 @@ VOID RTMPDeQueuePacket(
Count += pTxBlk->TxPacketList.Number; Count += pTxBlk->TxPacketList.Number;
// Do HardTransmit now. // Do HardTransmit now.
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
Status = STAHardTransmit(pAd, pTxBlk, QueIdx); Status = STAHardTransmit(pAd, pTxBlk, QueIdx);
#endif // CONFIG_STA_SUPPORT //
} }
RT28XX_STOP_DEQUEUE(pAd, QueIdx, IrqFlags); RT28XX_STOP_DEQUEUE(pAd, QueIdx, IrqFlags);
...@@ -1693,7 +1676,6 @@ UINT deaggregate_AMSDU_announce( ...@@ -1693,7 +1676,6 @@ UINT deaggregate_AMSDU_announce(
// convert to 802.3 header // convert to 802.3 header
CONVERT_TO_802_3(Header802_3, pDA, pSA, pPayload, PayloadSize, pRemovedLLCSNAP); CONVERT_TO_802_3(Header802_3, pDA, pSA, pPayload, PayloadSize, pRemovedLLCSNAP);
#ifdef CONFIG_STA_SUPPORT
if ((Header802_3[12] == 0x88) && (Header802_3[13] == 0x8E) ) if ((Header802_3[12] == 0x88) && (Header802_3[13] == 0x8E) )
{ {
// avoid local heap overflow, use dyanamic allocation // avoid local heap overflow, use dyanamic allocation
...@@ -1703,9 +1685,7 @@ UINT deaggregate_AMSDU_announce( ...@@ -1703,9 +1685,7 @@ UINT deaggregate_AMSDU_announce(
WpaEAPOLKeyAction(pAd, Elem); WpaEAPOLKeyAction(pAd, Elem);
kfree(Elem); kfree(Elem);
} }
#endif // CONFIG_STA_SUPPORT //
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
if (pRemovedLLCSNAP) if (pRemovedLLCSNAP)
...@@ -1715,15 +1695,12 @@ UINT deaggregate_AMSDU_announce( ...@@ -1715,15 +1695,12 @@ UINT deaggregate_AMSDU_announce(
NdisMoveMemory(pPayload, &Header802_3[0], LENGTH_802_3); NdisMoveMemory(pPayload, &Header802_3[0], LENGTH_802_3);
} }
} }
#endif // CONFIG_STA_SUPPORT //
pClonePacket = ClonePacket(pAd, pPacket, pPayload, PayloadSize); pClonePacket = ClonePacket(pAd, pPacket, pPayload, PayloadSize);
if (pClonePacket) if (pClonePacket)
{ {
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 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));
#endif // CONFIG_STA_SUPPORT //
} }
...@@ -1821,11 +1798,11 @@ MAC_TABLE_ENTRY *MacTableInsertEntry( ...@@ -1821,11 +1798,11 @@ MAC_TABLE_ENTRY *MacTableInsertEntry(
return NULL; return NULL;
FirstWcid = 1; FirstWcid = 1;
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
if (pAd->StaCfg.BssType == BSS_INFRA) if (pAd->StaCfg.BssType == BSS_INFRA)
FirstWcid = 2; FirstWcid = 2;
#endif // CONFIG_STA_SUPPORT //
// allocate one MAC entry // allocate one MAC entry
NdisAcquireSpinLock(&pAd->MacTabLock); NdisAcquireSpinLock(&pAd->MacTabLock);
...@@ -1848,8 +1825,6 @@ MAC_TABLE_ENTRY *MacTableInsertEntry( ...@@ -1848,8 +1825,6 @@ MAC_TABLE_ENTRY *MacTableInsertEntry(
pEntry->PairwiseKey.CipherAlg = CIPHER_NONE; pEntry->PairwiseKey.CipherAlg = CIPHER_NONE;
} }
{ {
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
pEntry->ValidAsCLI = TRUE; pEntry->ValidAsCLI = TRUE;
...@@ -1858,7 +1833,6 @@ MAC_TABLE_ENTRY *MacTableInsertEntry( ...@@ -1858,7 +1833,6 @@ MAC_TABLE_ENTRY *MacTableInsertEntry(
pEntry->ValidAsMesh = FALSE; pEntry->ValidAsMesh = FALSE;
pEntry->ValidAsDls = FALSE; pEntry->ValidAsDls = FALSE;
} }
#endif // CONFIG_STA_SUPPORT //
} }
pEntry->bIAmBadAtheros = FALSE; pEntry->bIAmBadAtheros = FALSE;
...@@ -1879,15 +1853,12 @@ MAC_TABLE_ENTRY *MacTableInsertEntry( ...@@ -1879,15 +1853,12 @@ MAC_TABLE_ENTRY *MacTableInsertEntry(
pEntry->apidx = apidx; pEntry->apidx = apidx;
{ {
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
pEntry->AuthMode = pAd->StaCfg.AuthMode; pEntry->AuthMode = pAd->StaCfg.AuthMode;
pEntry->WepStatus = pAd->StaCfg.WepStatus; pEntry->WepStatus = pAd->StaCfg.WepStatus;
pEntry->PrivacyFilter = Ndis802_11PrivFilterAcceptAll; pEntry->PrivacyFilter = Ndis802_11PrivFilterAcceptAll;
} }
#endif // CONFIG_STA_SUPPORT //
} }
pEntry->GTKState = REKEY_NEGOTIATING; pEntry->GTKState = REKEY_NEGOTIATING;
...@@ -2376,10 +2347,8 @@ VOID Indicate_Legacy_Packet( ...@@ -2376,10 +2347,8 @@ VOID Indicate_Legacy_Packet(
// 2. remove LLC // 2. remove LLC
// a. pointer pRxBlk->pData to payload // a. pointer pRxBlk->pData to payload
// b. modify pRxBlk->DataSize // b. modify pRxBlk->DataSize
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 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);
#endif // CONFIG_STA_SUPPORT //
if (pRxBlk->DataSize > MAX_RX_PKT_LEN) if (pRxBlk->DataSize > MAX_RX_PKT_LEN)
{ {
...@@ -2430,11 +2399,8 @@ VOID Indicate_Legacy_Packet( ...@@ -2430,11 +2399,8 @@ VOID Indicate_Legacy_Packet(
// //
// pass this 802.3 packet to upper layer or forward this packet to WM directly // pass this 802.3 packet to upper layer or forward this packet to WM directly
// //
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 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);
#endif // CONFIG_STA_SUPPORT //
} }
...@@ -2497,11 +2463,8 @@ VOID CmmRxRalinkFrameIndicate( ...@@ -2497,11 +2463,8 @@ VOID CmmRxRalinkFrameIndicate(
} }
// get 802.3 Header and remove LLC // get 802.3 Header and remove LLC
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 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);
#endif // CONFIG_STA_SUPPORT //
ASSERT(pRxBlk->pRxPacket); ASSERT(pRxBlk->pRxPacket);
...@@ -2511,10 +2474,9 @@ VOID CmmRxRalinkFrameIndicate( ...@@ -2511,10 +2474,9 @@ VOID CmmRxRalinkFrameIndicate(
Payload2Size = Msdu2Size - LENGTH_802_3; Payload2Size = Msdu2Size - LENGTH_802_3;
pData2 = pRxBlk->pData + Payload1Size + LENGTH_802_3; pData2 = pRxBlk->pData + Payload1Size + LENGTH_802_3;
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 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);
#endif // CONFIG_STA_SUPPORT //
if (!pPacket2) if (!pPacket2)
{ {
...@@ -2527,17 +2489,13 @@ VOID CmmRxRalinkFrameIndicate( ...@@ -2527,17 +2489,13 @@ VOID CmmRxRalinkFrameIndicate(
pRxBlk->DataSize = Payload1Size; pRxBlk->DataSize = Payload1Size;
wlan_802_11_to_802_3_packet(pAd, pRxBlk, Header802_3, FromWhichBSSID); wlan_802_11_to_802_3_packet(pAd, pRxBlk, Header802_3, FromWhichBSSID);
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 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);
#endif // CONFIG_STA_SUPPORT //
if (pPacket2) if (pPacket2)
{ {
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 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);
#endif // CONFIG_STA_SUPPORT //
} }
} }
...@@ -2680,15 +2638,12 @@ VOID Indicate_EAPOL_Packet( ...@@ -2680,15 +2638,12 @@ VOID Indicate_EAPOL_Packet(
{ {
MAC_TABLE_ENTRY *pEntry = NULL; MAC_TABLE_ENTRY *pEntry = NULL;
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
pEntry = &pAd->MacTab.Content[BSSID_WCID]; pEntry = &pAd->MacTab.Content[BSSID_WCID];
STARxEAPOLFrameIndicate(pAd, pEntry, pRxBlk, FromWhichBSSID); STARxEAPOLFrameIndicate(pAd, pEntry, pRxBlk, FromWhichBSSID);
return; return;
} }
#endif // CONFIG_STA_SUPPORT //
if (pEntry == NULL) if (pEntry == NULL)
{ {
......
...@@ -293,10 +293,8 @@ USHORT RtmpUSB_WriteSingleTxResource( ...@@ -293,10 +293,8 @@ USHORT RtmpUSB_WriteSingleTxResource(
// For TxInfo, the length of USBDMApktLen = TXWI_SIZE + 802.11 header + payload // For TxInfo, the length of USBDMApktLen = TXWI_SIZE + 802.11 header + payload
//PS packets use HCCA queue when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA) //PS packets use HCCA queue when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA)
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
RTMPWriteTxInfo(pAd, pTxInfo, (USHORT)(USBDMApktLen), FALSE, FIFO_EDCA, FALSE /*NextValid*/, FALSE); RTMPWriteTxInfo(pAd, pTxInfo, (USHORT)(USBDMApktLen), FALSE, FIFO_EDCA, FALSE /*NextValid*/, FALSE);
#endif // CONFIG_STA_SUPPORT //
if ((pHTTXContext->CurWritePosition + 3906 + pTxBlk->Priv) > MAX_TXBULK_LIMIT) if ((pHTTXContext->CurWritePosition + 3906 + pTxBlk->Priv) > MAX_TXBULK_LIMIT)
{ {
...@@ -696,7 +694,6 @@ VOID RtmpUSBNullFrameKickOut( ...@@ -696,7 +694,6 @@ VOID RtmpUSBNullFrameKickOut(
} }
#ifdef CONFIG_STA_SUPPORT
/* /*
======================================================================== ========================================================================
...@@ -842,7 +839,6 @@ VOID RT28xxUsbStaAsicSleepThenAutoWakeup( ...@@ -842,7 +839,6 @@ VOID RT28xxUsbStaAsicSleepThenAutoWakeup(
OPSTATUS_SET_FLAG(pAd, fOP_STATUS_DOZE); OPSTATUS_SET_FLAG(pAd, fOP_STATUS_DOZE);
} }
#endif // CONFIG_STA_SUPPORT //
VOID RT28xxUsbMlmeRadioOn( VOID RT28xxUsbMlmeRadioOn(
IN PRTMP_ADAPTER pAd) IN PRTMP_ADAPTER pAd)
...@@ -852,13 +848,12 @@ VOID RT28xxUsbMlmeRadioOn( ...@@ -852,13 +848,12 @@ VOID RT28xxUsbMlmeRadioOn(
if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF)) if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF))
return; return;
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
AsicSendCommandToMcu(pAd, 0x31, 0xff, 0x00, 0x02); AsicSendCommandToMcu(pAd, 0x31, 0xff, 0x00, 0x02);
RTMPusecDelay(10000); RTMPusecDelay(10000);
} }
#endif // CONFIG_STA_SUPPORT //
NICResetFromError(pAd); NICResetFromError(pAd);
// Enable Tx/Rx // Enable Tx/Rx
...@@ -874,10 +869,8 @@ VOID RT28xxUsbMlmeRadioOn( ...@@ -874,10 +869,8 @@ VOID RT28xxUsbMlmeRadioOn(
// Clear Radio off flag // Clear Radio off flag
RTMP_CLEAR_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF); RTMP_CLEAR_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF);
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
RTUSBBulkReceive(pAd); RTUSBBulkReceive(pAd);
#endif // CONFIG_STA_SUPPORT //
// Set LED // Set LED
RTMPSetLED(pAd, LED_RADIO_ON); RTMPSetLED(pAd, LED_RADIO_ON);
...@@ -899,7 +892,6 @@ VOID RT28xxUsbMlmeRadioOFF( ...@@ -899,7 +892,6 @@ VOID RT28xxUsbMlmeRadioOFF(
// Set Radio off flag // Set Radio off flag
RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF); RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF);
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
// Link down first if any association exists // Link down first if any association exists
...@@ -911,8 +903,6 @@ VOID RT28xxUsbMlmeRadioOFF( ...@@ -911,8 +903,6 @@ VOID RT28xxUsbMlmeRadioOFF(
// Clean up old bss table // Clean up old bss table
BssTableInit(&pAd->ScanTab); BssTableInit(&pAd->ScanTab);
} }
#endif // CONFIG_STA_SUPPORT //
if (pAd->CommonCfg.BBPCurrentBW == BW_40) if (pAd->CommonCfg.BBPCurrentBW == BW_40)
{ {
...@@ -956,9 +946,7 @@ VOID RT28xxUsbMlmeRadioOFF( ...@@ -956,9 +946,7 @@ VOID RT28xxUsbMlmeRadioOFF(
// TX_PIN_CFG => value = 0x0 => 20mA // TX_PIN_CFG => value = 0x0 => 20mA
//RTMP_IO_WRITE32(pAd, TX_PIN_CFG, 0); //RTMP_IO_WRITE32(pAd, TX_PIN_CFG, 0);
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
AsicSendCommandToMcu(pAd, 0x30, 0xff, 0xff, 0x02); AsicSendCommandToMcu(pAd, 0x30, 0xff, 0xff, 0x02);
#endif // CONFIG_STA_SUPPORT //
} }
This diff is collapsed.
...@@ -284,9 +284,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity( ...@@ -284,9 +284,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
OUT PQOS_CAPABILITY_PARM pQosCapability, OUT PQOS_CAPABILITY_PARM pQosCapability,
OUT ULONG *pRalinkIe, OUT ULONG *pRalinkIe,
OUT UCHAR *pHtCapabilityLen, OUT UCHAR *pHtCapabilityLen,
#ifdef CONFIG_STA_SUPPORT
OUT UCHAR *pPreNHtCapabilityLen, OUT UCHAR *pPreNHtCapabilityLen,
#endif // CONFIG_STA_SUPPORT //
OUT HT_CAPABILITY_IE *pHtCapability, OUT HT_CAPABILITY_IE *pHtCapability,
OUT UCHAR *AddHtInfoLen, OUT UCHAR *AddHtInfoLen,
OUT ADD_HT_INFO_IE *AddHtInfo, OUT ADD_HT_INFO_IE *AddHtInfo,
...@@ -295,9 +293,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity( ...@@ -295,9 +293,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
OUT PNDIS_802_11_VARIABLE_IEs pVIE) OUT PNDIS_802_11_VARIABLE_IEs pVIE)
{ {
CHAR *Ptr; CHAR *Ptr;
#ifdef CONFIG_STA_SUPPORT
CHAR TimLen; CHAR TimLen;
#endif // CONFIG_STA_SUPPORT //
PFRAME_802_11 pFrame; PFRAME_802_11 pFrame;
PEID_STRUCT pEid; PEID_STRUCT pEid;
UCHAR SubType; UCHAR SubType;
...@@ -325,10 +321,8 @@ BOOLEAN PeerBeaconAndProbeRspSanity( ...@@ -325,10 +321,8 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
*pAironetCellPowerLimit = 0xFF; // Default of AironetCellPowerLimit is 0xFF *pAironetCellPowerLimit = 0xFF; // Default of AironetCellPowerLimit is 0xFF
*LengthVIE = 0; // Set the length of VIE to init value 0 *LengthVIE = 0; // Set the length of VIE to init value 0
*pHtCapabilityLen = 0; // Set the length of VIE to init value 0 *pHtCapabilityLen = 0; // Set the length of VIE to init value 0
#ifdef CONFIG_STA_SUPPORT
if (pAd->OpMode == OPMODE_STA) if (pAd->OpMode == OPMODE_STA)
*pPreNHtCapabilityLen = 0; // Set the length of VIE to init value 0 *pPreNHtCapabilityLen = 0; // Set the length of VIE to init value 0
#endif // CONFIG_STA_SUPPORT //
*AddHtInfoLen = 0; // Set the length of VIE to init value 0 *AddHtInfoLen = 0; // Set the length of VIE to init value 0
*pRalinkIe = 0; *pRalinkIe = 0;
*pNewChannel = 0; *pNewChannel = 0;
...@@ -439,7 +433,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity( ...@@ -439,7 +433,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
*(USHORT *)(&pHtCapability->HtCapInfo) = cpu2le16(*(USHORT *)(&pHtCapability->HtCapInfo)); *(USHORT *)(&pHtCapability->HtCapInfo) = cpu2le16(*(USHORT *)(&pHtCapability->HtCapInfo));
*(USHORT *)(&pHtCapability->ExtHtCapInfo) = cpu2le16(*(USHORT *)(&pHtCapability->ExtHtCapInfo)); *(USHORT *)(&pHtCapability->ExtHtCapInfo) = cpu2le16(*(USHORT *)(&pHtCapability->ExtHtCapInfo));
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
*pPreNHtCapabilityLen = 0; // Nnow we only support 26 bytes. *pPreNHtCapabilityLen = 0; // Nnow we only support 26 bytes.
...@@ -448,7 +441,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity( ...@@ -448,7 +441,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
NdisMoveMemory(Ptr + *LengthVIE, &pEid->Eid, pEid->Len + 2); NdisMoveMemory(Ptr + *LengthVIE, &pEid->Eid, pEid->Len + 2);
*LengthVIE += (pEid->Len + 2); *LengthVIE += (pEid->Len + 2);
} }
#endif // CONFIG_STA_SUPPORT //
} }
else else
{ {
...@@ -469,14 +461,12 @@ BOOLEAN PeerBeaconAndProbeRspSanity( ...@@ -469,14 +461,12 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
*(USHORT *)(&AddHtInfo->AddHtInfo2) = cpu2le16(*(USHORT *)(&AddHtInfo->AddHtInfo2)); *(USHORT *)(&AddHtInfo->AddHtInfo2) = cpu2le16(*(USHORT *)(&AddHtInfo->AddHtInfo2));
*(USHORT *)(&AddHtInfo->AddHtInfo3) = cpu2le16(*(USHORT *)(&AddHtInfo->AddHtInfo3)); *(USHORT *)(&AddHtInfo->AddHtInfo3) = cpu2le16(*(USHORT *)(&AddHtInfo->AddHtInfo3));
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
Ptr = (PUCHAR) pVIE; Ptr = (PUCHAR) pVIE;
NdisMoveMemory(Ptr + *LengthVIE, &pEid->Eid, pEid->Len + 2); NdisMoveMemory(Ptr + *LengthVIE, &pEid->Eid, pEid->Len + 2);
*LengthVIE += (pEid->Len + 2); *LengthVIE += (pEid->Len + 2);
} }
#endif // CONFIG_STA_SUPPORT //
} }
else else
{ {
...@@ -503,7 +493,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity( ...@@ -503,7 +493,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
if(pEid->Len == 1) if(pEid->Len == 1)
{ {
*pChannel = *pEid->Octet; *pChannel = *pEid->Octet;
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
if (ChannelSanity(pAd, *pChannel) == 0) if (ChannelSanity(pAd, *pChannel) == 0)
...@@ -512,7 +502,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity( ...@@ -512,7 +502,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
return FALSE; return FALSE;
} }
} }
#endif // CONFIG_STA_SUPPORT //
Sanity |= 0x4; Sanity |= 0x4;
} }
else else
...@@ -550,14 +540,13 @@ BOOLEAN PeerBeaconAndProbeRspSanity( ...@@ -550,14 +540,13 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
} }
break; break;
#ifdef CONFIG_STA_SUPPORT
case IE_TIM: case IE_TIM:
if(INFRA_ON(pAd) && SubType == SUBTYPE_BEACON) if(INFRA_ON(pAd) && SubType == SUBTYPE_BEACON)
{ {
GetTimBit((PUCHAR)pEid, pAd->StaActive.Aid, &TimLen, pBcastFlag, pDtimCount, pDtimPeriod, pMessageToMe); GetTimBit((PUCHAR)pEid, pAd->StaActive.Aid, &TimLen, pBcastFlag, pDtimCount, pDtimPeriod, pMessageToMe);
} }
break; break;
#endif // CONFIG_STA_SUPPORT //
case IE_CHANNEL_SWITCH_ANNOUNCEMENT: case IE_CHANNEL_SWITCH_ANNOUNCEMENT:
if(pEid->Len == 3) if(pEid->Len == 3)
{ {
...@@ -599,7 +588,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity( ...@@ -599,7 +588,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
else else
*pRalinkIe = 0xf0000000; // Set to non-zero value (can't set bit0-2) to represent this is Ralink Chip. So at linkup, we will set ralinkchip flag. *pRalinkIe = 0xf0000000; // Set to non-zero value (can't set bit0-2) to represent this is Ralink Chip. So at linkup, we will set ralinkchip flag.
} }
#ifdef CONFIG_STA_SUPPORT
#ifdef DOT11_N_SUPPORT #ifdef DOT11_N_SUPPORT
// This HT IE is before IEEE draft set HT IE value.2006-09-28 by Jan. // This HT IE is before IEEE draft set HT IE value.2006-09-28 by Jan.
...@@ -620,7 +608,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity( ...@@ -620,7 +608,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
} }
} }
#endif // DOT11_N_SUPPORT // #endif // DOT11_N_SUPPORT //
#endif // CONFIG_STA_SUPPORT //
else if (NdisEqualMemory(pEid->Octet, WPA_OUI, 4)) else if (NdisEqualMemory(pEid->Octet, WPA_OUI, 4))
{ {
// Copy to pVIE which will report to microsoft bssid list. // Copy to pVIE which will report to microsoft bssid list.
...@@ -687,8 +674,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity( ...@@ -687,8 +674,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
pEdcaParm->Cwmax[QID_AC_VO] = CW_MAX_IN_BITS-1; pEdcaParm->Cwmax[QID_AC_VO] = CW_MAX_IN_BITS-1;
pEdcaParm->Txop[QID_AC_VO] = 48; // AC_VO: 48*32us ~= 1.5ms pEdcaParm->Txop[QID_AC_VO] = 48; // AC_VO: 48*32us ~= 1.5ms
} }
#ifdef CONFIG_STA_SUPPORT
#endif // CONFIG_STA_SUPPORT //
else else
{ {
} }
...@@ -759,7 +744,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity( ...@@ -759,7 +744,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
} }
// For some 11a AP. it did not have the channel EID, patch here // For some 11a AP. it did not have the channel EID, patch here
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
UCHAR LatchRfChannel = MsgChannel; UCHAR LatchRfChannel = MsgChannel;
...@@ -772,7 +756,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity( ...@@ -772,7 +756,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
Sanity |= 0x4; Sanity |= 0x4;
} }
} }
#endif // CONFIG_STA_SUPPORT //
if (Sanity != 0x7) if (Sanity != 0x7)
{ {
...@@ -813,10 +796,8 @@ BOOLEAN MlmeScanReqSanity( ...@@ -813,10 +796,8 @@ BOOLEAN MlmeScanReqSanity(
if ((*pBssType == BSS_INFRA || *pBssType == BSS_ADHOC || *pBssType == BSS_ANY) if ((*pBssType == BSS_INFRA || *pBssType == BSS_ADHOC || *pBssType == BSS_ANY)
&& (*pScanType == SCAN_ACTIVE || *pScanType == SCAN_PASSIVE && (*pScanType == SCAN_ACTIVE || *pScanType == SCAN_PASSIVE
#ifdef CONFIG_STA_SUPPORT
|| *pScanType == SCAN_CISCO_PASSIVE || *pScanType == SCAN_CISCO_ACTIVE || *pScanType == SCAN_CISCO_PASSIVE || *pScanType == SCAN_CISCO_ACTIVE
|| *pScanType == SCAN_CISCO_CHANNEL_LOAD || *pScanType == SCAN_CISCO_NOISE || *pScanType == SCAN_CISCO_CHANNEL_LOAD || *pScanType == SCAN_CISCO_NOISE
#endif // CONFIG_STA_SUPPORT //
)) ))
{ {
return TRUE; return TRUE;
......
...@@ -383,27 +383,21 @@ VOID ScanNextChannel( ...@@ -383,27 +383,21 @@ VOID ScanNextChannel(
NDIS_STATUS NStatus; NDIS_STATUS NStatus;
ULONG FrameLen = 0; ULONG FrameLen = 0;
UCHAR SsidLen = 0, ScanType = pAd->MlmeAux.ScanType, BBPValue = 0; UCHAR SsidLen = 0, ScanType = pAd->MlmeAux.ScanType, BBPValue = 0;
#ifdef CONFIG_STA_SUPPORT
USHORT Status; USHORT Status;
PHEADER_802_11 pHdr80211; PHEADER_802_11 pHdr80211;
#endif // CONFIG_STA_SUPPORT //
UINT ScanTimeIn5gChannel = SHORT_CHANNEL_TIME; UINT ScanTimeIn5gChannel = SHORT_CHANNEL_TIME;
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
if (MONITOR_ON(pAd)) if (MONITOR_ON(pAd))
return; return;
} }
#endif // CONFIG_STA_SUPPORT //
if (pAd->MlmeAux.Channel == 0) if (pAd->MlmeAux.Channel == 0)
{ {
if ((pAd->CommonCfg.BBPCurrentBW == BW_40) if ((pAd->CommonCfg.BBPCurrentBW == BW_40)
#ifdef CONFIG_STA_SUPPORT
&& (INFRA_ON(pAd) && (INFRA_ON(pAd)
|| (pAd->OpMode == OPMODE_AP)) || (pAd->OpMode == OPMODE_AP))
#endif // CONFIG_STA_SUPPORT //
) )
{ {
AsicSwitchChannel(pAd, pAd->CommonCfg.CentralChannel, FALSE); AsicSwitchChannel(pAd, pAd->CommonCfg.CentralChannel, FALSE);
...@@ -421,7 +415,6 @@ VOID ScanNextChannel( ...@@ -421,7 +415,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)); DBGPRINT(RT_DEBUG_TRACE, ("SYNC - End of SCAN, restore to channel %d, Total BSS[%02d]\n",pAd->CommonCfg.Channel, pAd->ScanTab.BssNr));
} }
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
// //
...@@ -452,23 +445,18 @@ VOID ScanNextChannel( ...@@ -452,23 +445,18 @@ VOID ScanNextChannel(
Status = MLME_SUCCESS; Status = MLME_SUCCESS;
MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_SCAN_CONF, 2, &Status); MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_SCAN_CONF, 2, &Status);
} }
#endif // CONFIG_STA_SUPPORT //
RTMP_CLEAR_FLAG(pAd, fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS); RTMP_CLEAR_FLAG(pAd, fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS);
} }
#ifdef RT2870 #ifdef RT2870
#ifdef CONFIG_STA_SUPPORT
else if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST) && (pAd->OpMode == OPMODE_STA)) else if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST) && (pAd->OpMode == OPMODE_STA))
{ {
pAd->Mlme.SyncMachine.CurrState = SYNC_IDLE; pAd->Mlme.SyncMachine.CurrState = SYNC_IDLE;
MlmeCntlConfirm(pAd, MT2_SCAN_CONF, MLME_FAIL_NO_RESOURCE); MlmeCntlConfirm(pAd, MT2_SCAN_CONF, MLME_FAIL_NO_RESOURCE);
} }
#endif // CONFIG_STA_SUPPORT //
#endif // RT2870 // #endif // RT2870 //
else else
{ {
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
// BBP and RF are not accessible in PS mode, we has to wake them up first // BBP and RF are not accessible in PS mode, we has to wake them up first
...@@ -479,12 +467,10 @@ VOID ScanNextChannel( ...@@ -479,12 +467,10 @@ VOID ScanNextChannel(
if (pAd->StaCfg.Psm == PWR_SAVE) if (pAd->StaCfg.Psm == PWR_SAVE)
MlmeSetPsmBit(pAd, PWR_ACTIVE); MlmeSetPsmBit(pAd, PWR_ACTIVE);
} }
#endif // CONFIG_STA_SUPPORT //
AsicSwitchChannel(pAd, pAd->MlmeAux.Channel, TRUE); AsicSwitchChannel(pAd, pAd->MlmeAux.Channel, TRUE);
AsicLockChannel(pAd, pAd->MlmeAux.Channel); AsicLockChannel(pAd, pAd->MlmeAux.Channel);
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
if (pAd->MlmeAux.Channel > 14) if (pAd->MlmeAux.Channel > 14)
...@@ -496,7 +482,6 @@ VOID ScanNextChannel( ...@@ -496,7 +482,6 @@ VOID ScanNextChannel(
} }
} }
} }
#endif // CONFIG_STA_SUPPORT //
//Global country domain(ch1-11:active scan, ch12-14 passive scan) //Global country domain(ch1-11:active scan, ch12-14 passive scan)
if ((pAd->MlmeAux.Channel <= 14) && (pAd->MlmeAux.Channel >= 12) && ((pAd->CommonCfg.CountryRegion & 0x7f) == REGION_31_BG_BAND)) if ((pAd->MlmeAux.Channel <= 14) && (pAd->MlmeAux.Channel >= 12) && ((pAd->CommonCfg.CountryRegion & 0x7f) == REGION_31_BG_BAND))
...@@ -508,7 +493,6 @@ VOID ScanNextChannel( ...@@ -508,7 +493,6 @@ VOID ScanNextChannel(
// Chnage the channel scan time for CISCO stuff based on its IAPP announcement // Chnage the channel scan time for CISCO stuff based on its IAPP announcement
if (ScanType == FAST_SCAN_ACTIVE) if (ScanType == FAST_SCAN_ACTIVE)
RTMPSetTimer(&pAd->MlmeAux.ScanTimer, FAST_ACTIVE_SCAN_TIME); RTMPSetTimer(&pAd->MlmeAux.ScanTimer, FAST_ACTIVE_SCAN_TIME);
#ifdef CONFIG_STA_SUPPORT
else if (((ScanType == SCAN_CISCO_ACTIVE) || else if (((ScanType == SCAN_CISCO_ACTIVE) ||
(ScanType == SCAN_CISCO_PASSIVE) || (ScanType == SCAN_CISCO_PASSIVE) ||
(ScanType == SCAN_CISCO_CHANNEL_LOAD) || (ScanType == SCAN_CISCO_CHANNEL_LOAD) ||
...@@ -519,7 +503,6 @@ VOID ScanNextChannel( ...@@ -519,7 +503,6 @@ VOID ScanNextChannel(
else else
RTMPSetTimer(&pAd->MlmeAux.ScanTimer, pAd->StaCfg.CCXScanTime); RTMPSetTimer(&pAd->MlmeAux.ScanTimer, pAd->StaCfg.CCXScanTime);
} }
#endif // CONFIG_STA_SUPPORT //
else // must be SCAN_PASSIVE or SCAN_ACTIVE else // must be SCAN_PASSIVE or SCAN_ACTIVE
{ {
if ((pAd->CommonCfg.PhyMode == PHY_11ABG_MIXED) if ((pAd->CommonCfg.PhyMode == PHY_11ABG_MIXED)
...@@ -544,14 +527,13 @@ VOID ScanNextChannel( ...@@ -544,14 +527,13 @@ VOID ScanNextChannel(
if (NStatus != NDIS_STATUS_SUCCESS) if (NStatus != NDIS_STATUS_SUCCESS)
{ {
DBGPRINT(RT_DEBUG_TRACE, ("SYNC - ScanNextChannel() allocate memory fail\n")); DBGPRINT(RT_DEBUG_TRACE, ("SYNC - ScanNextChannel() allocate memory fail\n"));
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
pAd->Mlme.SyncMachine.CurrState = SYNC_IDLE; pAd->Mlme.SyncMachine.CurrState = SYNC_IDLE;
Status = MLME_FAIL_NO_RESOURCE; Status = MLME_FAIL_NO_RESOURCE;
MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_SCAN_CONF, 2, &Status); MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_SCAN_CONF, 2, &Status);
} }
#endif // CONFIG_STA_SUPPORT //
return; return;
} }
...@@ -624,11 +606,8 @@ VOID ScanNextChannel( ...@@ -624,11 +606,8 @@ VOID ScanNextChannel(
// For SCAN_CISCO_PASSIVE, do nothing and silently wait for beacon or other probe reponse // For SCAN_CISCO_PASSIVE, do nothing and silently wait for beacon or other probe reponse
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
pAd->Mlme.SyncMachine.CurrState = SCAN_LISTEN; pAd->Mlme.SyncMachine.CurrState = SCAN_LISTEN;
#endif // CONFIG_STA_SUPPORT //
} }
} }
......
...@@ -589,7 +589,6 @@ VOID RTMPMakeRSNIE( ...@@ -589,7 +589,6 @@ VOID RTMPMakeRSNIE(
rsnielen_ex_cur_p = NULL; rsnielen_ex_cur_p = NULL;
{ {
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
#ifdef WPA_SUPPLICANT_SUPPORT #ifdef WPA_SUPPLICANT_SUPPORT
...@@ -622,7 +621,6 @@ VOID RTMPMakeRSNIE( ...@@ -622,7 +621,6 @@ VOID RTMPMakeRSNIE(
bMixCipher = pAd->StaCfg.bMixCipher; bMixCipher = pAd->StaCfg.bMixCipher;
} }
#endif // CONFIG_STA_SUPPORT //
} }
// indicate primary RSNIE as WPA or WPA2 // indicate primary RSNIE as WPA or WPA2
...@@ -1093,11 +1091,6 @@ BOOLEAN RTMPParseEapolKeyData( ...@@ -1093,11 +1091,6 @@ BOOLEAN RTMPParseEapolKeyData(
return FALSE; return FALSE;
} }
#ifdef CONFIG_STA_SUPPORT
// Todo
#endif // CONFIG_STA_SUPPORT //
return TRUE; return TRUE;
} }
......
This diff is collapsed.
...@@ -179,12 +179,9 @@ RTMP_REG_PAIR MACRegTable[] = { ...@@ -179,12 +179,9 @@ RTMP_REG_PAIR MACRegTable[] = {
{TX_TIMEOUT_CFG, 0x000a2090}, {TX_TIMEOUT_CFG, 0x000a2090},
{MAX_LEN_CFG, MAX_AGGREGATION_SIZE | 0x00001000}, // 0x3018, MAX frame length. Max PSDU = 16kbytes. {MAX_LEN_CFG, MAX_AGGREGATION_SIZE | 0x00001000}, // 0x3018, MAX frame length. Max PSDU = 16kbytes.
{LED_CFG, 0x7f031e46}, // Gary, 2006-08-23 {LED_CFG, 0x7f031e46}, // Gary, 2006-08-23
//#ifdef CONFIG_STA_SUPPORT
// {WMM_AIFSN_CFG, 0x00002273}, // {WMM_AIFSN_CFG, 0x00002273},
// {WMM_CWMIN_CFG, 0x00002344}, // {WMM_CWMIN_CFG, 0x00002344},
// {WMM_CWMAX_CFG, 0x000034aa}, // {WMM_CWMAX_CFG, 0x000034aa},
//#endif // CONFIG_STA_SUPPORT //
{PBF_MAX_PCNT, 0x1F3FBF9F}, //0x1F3f7f9f}, //Jan, 2006/04/20 {PBF_MAX_PCNT, 0x1F3FBF9F}, //0x1F3f7f9f}, //Jan, 2006/04/20
//{TX_RTY_CFG, 0x6bb80408}, // Jan, 2006/11/16 //{TX_RTY_CFG, 0x6bb80408}, // Jan, 2006/11/16
{TX_RTY_CFG, 0x47d01f0f}, // Jan, 2006/11/16, Set TxWI->ACK =0 in Probe Rsp Modify for 2860E ,2007-08-03 {TX_RTY_CFG, 0x47d01f0f}, // Jan, 2006/11/16, Set TxWI->ACK =0 in Probe Rsp Modify for 2860E ,2007-08-03
...@@ -193,9 +190,7 @@ RTMP_REG_PAIR MACRegTable[] = { ...@@ -193,9 +190,7 @@ RTMP_REG_PAIR MACRegTable[] = {
{OFDM_PROT_CFG, 0x05740003 /*0x01740003*/}, // Initial Auto_Responder, because QA will turn off Auto-Responder. And RTS threshold is enabled. {OFDM_PROT_CFG, 0x05740003 /*0x01740003*/}, // Initial Auto_Responder, because QA will turn off Auto-Responder. And RTS threshold is enabled.
//PS packets use Tx1Q (for HCCA) when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA) //PS packets use Tx1Q (for HCCA) when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA)
#ifdef RT2870 #ifdef RT2870
#ifdef CONFIG_STA_SUPPORT
{PBF_CFG, 0xf40006}, // Only enable Queue 2 {PBF_CFG, 0xf40006}, // Only enable Queue 2
#endif // CONFIG_STA_SUPPORT //
{MM40_PROT_CFG, 0x3F44084}, // Initial Auto_Responder, because QA will turn off Auto-Responder {MM40_PROT_CFG, 0x3F44084}, // Initial Auto_Responder, because QA will turn off Auto-Responder
{WPDMA_GLO_CFG, 0x00000030}, {WPDMA_GLO_CFG, 0x00000030},
#endif // RT2870 // #endif // RT2870 //
...@@ -219,19 +214,14 @@ RTMP_REG_PAIR MACRegTable[] = { ...@@ -219,19 +214,14 @@ RTMP_REG_PAIR MACRegTable[] = {
{PWR_PIN_CFG, 0x00000003}, // patch for 2880-E {PWR_PIN_CFG, 0x00000003}, // patch for 2880-E
}; };
#ifdef CONFIG_STA_SUPPORT
RTMP_REG_PAIR STAMACRegTable[] = { RTMP_REG_PAIR STAMACRegTable[] = {
{WMM_AIFSN_CFG, 0x00002273}, {WMM_AIFSN_CFG, 0x00002273},
{WMM_CWMIN_CFG, 0x00002344}, {WMM_CWMIN_CFG, 0x00002344},
{WMM_CWMAX_CFG, 0x000034aa}, {WMM_CWMAX_CFG, 0x000034aa},
}; };
#endif // CONFIG_STA_SUPPORT //
#define NUM_MAC_REG_PARMS (sizeof(MACRegTable) / sizeof(RTMP_REG_PAIR)) #define NUM_MAC_REG_PARMS (sizeof(MACRegTable) / sizeof(RTMP_REG_PAIR))
#ifdef CONFIG_STA_SUPPORT
#define NUM_STA_MAC_REG_PARMS (sizeof(STAMACRegTable) / sizeof(RTMP_REG_PAIR)) #define NUM_STA_MAC_REG_PARMS (sizeof(STAMACRegTable) / sizeof(RTMP_REG_PAIR))
#endif // CONFIG_STA_SUPPORT //
#ifdef RT2870 #ifdef RT2870
// //
...@@ -1558,9 +1548,6 @@ VOID NICReadEEPROMParameters( ...@@ -1558,9 +1548,6 @@ VOID NICReadEEPROMParameters(
NicConfig2.word = pAd->EEPROMDefaultValue[1]; NicConfig2.word = pAd->EEPROMDefaultValue[1];
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
if ((NicConfig2.word & 0x00ff) == 0xff) if ((NicConfig2.word & 0x00ff) == 0xff)
...@@ -1573,7 +1560,6 @@ VOID NICReadEEPROMParameters( ...@@ -1573,7 +1560,6 @@ VOID NICReadEEPROMParameters(
NicConfig2.word &= 0x00ff; NicConfig2.word &= 0x00ff;
} }
} }
#endif // CONFIG_STA_SUPPORT //
if (NicConfig2.field.DynamicTxAgcControl == 1) if (NicConfig2.field.DynamicTxAgcControl == 1)
pAd->bAutoTxAgcA = pAd->bAutoTxAgcG = TRUE; pAd->bAutoTxAgcA = pAd->bAutoTxAgcG = TRUE;
...@@ -1792,10 +1778,8 @@ VOID NICReadEEPROMParameters( ...@@ -1792,10 +1778,8 @@ VOID NICReadEEPROMParameters(
VOID NICInitAsicFromEEPROM( VOID NICInitAsicFromEEPROM(
IN PRTMP_ADAPTER pAd) IN PRTMP_ADAPTER pAd)
{ {
#ifdef CONFIG_STA_SUPPORT
UINT32 data = 0; UINT32 data = 0;
UCHAR BBPR1 = 0; UCHAR BBPR1 = 0;
#endif // CONFIG_STA_SUPPORT //
USHORT i; USHORT i;
EEPROM_ANTENNA_STRUC Antenna; EEPROM_ANTENNA_STRUC Antenna;
EEPROM_NIC_CONFIG2_STRUC NicConfig2; EEPROM_NIC_CONFIG2_STRUC NicConfig2;
...@@ -1830,8 +1814,6 @@ VOID NICInitAsicFromEEPROM( ...@@ -1830,8 +1814,6 @@ VOID NICInitAsicFromEEPROM(
NicConfig2.word = pAd->EEPROMDefaultValue[1]; NicConfig2.word = pAd->EEPROMDefaultValue[1];
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
if ((NicConfig2.word & 0x00ff) == 0xff) if ((NicConfig2.word & 0x00ff) == 0xff)
...@@ -1844,7 +1826,6 @@ VOID NICInitAsicFromEEPROM( ...@@ -1844,7 +1826,6 @@ VOID NICInitAsicFromEEPROM(
NicConfig2.word &= 0x00ff; NicConfig2.word &= 0x00ff;
} }
} }
#endif // CONFIG_STA_SUPPORT //
// Save the antenna for future use // Save the antenna for future use
pAd->NicConfig2.word = NicConfig2.word; pAd->NicConfig2.word = NicConfig2.word;
...@@ -1873,7 +1854,6 @@ VOID NICInitAsicFromEEPROM( ...@@ -1873,7 +1854,6 @@ VOID NICInitAsicFromEEPROM(
pAd->LedIndicatorStregth = 0xFF; pAd->LedIndicatorStregth = 0xFF;
RTMPSetSignalLED(pAd, -100); // Force signal strength Led to be turned off, before link up RTMPSetSignalLED(pAd, -100); // Force signal strength Led to be turned off, before link up
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
// Read Hardware controlled Radio state enable bit // Read Hardware controlled Radio state enable bit
...@@ -1903,7 +1883,6 @@ VOID NICInitAsicFromEEPROM( ...@@ -1903,7 +1883,6 @@ VOID NICInitAsicFromEEPROM(
RTMPSetLED(pAd, LED_RADIO_ON); RTMPSetLED(pAd, LED_RADIO_ON);
} }
} }
#endif // CONFIG_STA_SUPPORT //
// Turn off patching for cardbus controller // Turn off patching for cardbus controller
if (NicConfig2.field.CardbusAcceleration == 1) if (NicConfig2.field.CardbusAcceleration == 1)
...@@ -1937,7 +1916,6 @@ VOID NICInitAsicFromEEPROM( ...@@ -1937,7 +1916,6 @@ VOID NICInitAsicFromEEPROM(
} }
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, BBPR3); RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, BBPR3);
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
// Handle the difference when 1T // Handle the difference when 1T
...@@ -1950,7 +1928,7 @@ VOID NICInitAsicFromEEPROM( ...@@ -1950,7 +1928,7 @@ VOID NICInitAsicFromEEPROM(
DBGPRINT(RT_DEBUG_TRACE, ("Use Hw Radio Control Pin=%d; if used Pin=%d;\n", pAd->CommonCfg.bHardwareRadio, pAd->CommonCfg.bHardwareRadio)); DBGPRINT(RT_DEBUG_TRACE, ("Use Hw Radio Control Pin=%d; if used Pin=%d;\n", pAd->CommonCfg.bHardwareRadio, pAd->CommonCfg.bHardwareRadio));
} }
#endif // CONFIG_STA_SUPPORT //
DBGPRINT(RT_DEBUG_TRACE, ("TxPath = %d, RxPath = %d, RFIC=%d, Polar+LED mode=%x\n", pAd->Antenna.field.TxPath, pAd->Antenna.field.RxPath, pAd->RfIcType, pAd->LedCntl.word)); DBGPRINT(RT_DEBUG_TRACE, ("TxPath = %d, RxPath = %d, RFIC=%d, Polar+LED mode=%x\n", pAd->Antenna.field.TxPath, pAd->Antenna.field.RxPath, pAd->RfIcType, pAd->LedCntl.word));
DBGPRINT(RT_DEBUG_TRACE, ("<-- NICInitAsicFromEEPROM\n")); DBGPRINT(RT_DEBUG_TRACE, ("<-- NICInitAsicFromEEPROM\n"));
} }
...@@ -2142,7 +2120,6 @@ NDIS_STATUS NICInitializeAsic( ...@@ -2142,7 +2120,6 @@ NDIS_STATUS NICInitializeAsic(
} }
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
for (Index = 0; Index < NUM_STA_MAC_REG_PARMS; Index++) for (Index = 0; Index < NUM_STA_MAC_REG_PARMS; Index++)
...@@ -2150,7 +2127,6 @@ NDIS_STATUS NICInitializeAsic( ...@@ -2150,7 +2127,6 @@ NDIS_STATUS NICInitializeAsic(
RTMP_IO_WRITE32(pAd, (USHORT)STAMACRegTable[Index].Register, STAMACRegTable[Index].Value); RTMP_IO_WRITE32(pAd, (USHORT)STAMACRegTable[Index].Register, STAMACRegTable[Index].Value);
} }
} }
#endif // CONFIG_STA_SUPPORT //
#endif // RT2870 // #endif // RT2870 //
#ifdef RT30xx #ifdef RT30xx
...@@ -2302,7 +2278,6 @@ NDIS_STATUS NICInitializeAsic( ...@@ -2302,7 +2278,6 @@ NDIS_STATUS NICInitializeAsic(
#endif // RT2870 // #endif // RT2870 //
// Add radio off control // Add radio off control
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
if (pAd->StaCfg.bRadio == FALSE) if (pAd->StaCfg.bRadio == FALSE)
...@@ -2312,7 +2287,6 @@ NDIS_STATUS NICInitializeAsic( ...@@ -2312,7 +2287,6 @@ NDIS_STATUS NICInitializeAsic(
DBGPRINT(RT_DEBUG_TRACE, ("Set Radio Off\n")); DBGPRINT(RT_DEBUG_TRACE, ("Set Radio Off\n"));
} }
} }
#endif // CONFIG_STA_SUPPORT //
// Clear raw counters // Clear raw counters
RTMP_IO_READ32(pAd, RX_STA_CNT0, &Counter); RTMP_IO_READ32(pAd, RX_STA_CNT0, &Counter);
...@@ -2383,14 +2357,12 @@ NDIS_STATUS NICInitializeAsic( ...@@ -2383,14 +2357,12 @@ NDIS_STATUS NICInitializeAsic(
} }
#endif // RT30xx // #endif // RT30xx //
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
// for rt2860E and after, init TXOP_CTRL_CFG with 0x583f. This is for extension channel overlapping IOT. // for rt2860E and after, init TXOP_CTRL_CFG with 0x583f. This is for extension channel overlapping IOT.
if ((pAd->MACVersion&0xffff) != 0x0101) if ((pAd->MACVersion&0xffff) != 0x0101)
RTMP_IO_WRITE32(pAd, TXOP_CTRL_CFG, 0x583f); RTMP_IO_WRITE32(pAd, TXOP_CTRL_CFG, 0x583f);
} }
#endif // CONFIG_STA_SUPPORT //
DBGPRINT(RT_DEBUG_TRACE, ("<-- NICInitializeAsic\n")); DBGPRINT(RT_DEBUG_TRACE, ("<-- NICInitializeAsic\n"));
return NDIS_STATUS_SUCCESS; return NDIS_STATUS_SUCCESS;
...@@ -3336,7 +3308,6 @@ VOID UserCfgInit( ...@@ -3336,7 +3308,6 @@ VOID UserCfgInit(
// //
// part II. intialize STA specific configuration // part II. intialize STA specific configuration
// //
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
RX_FILTER_SET_FLAG(pAd, fRX_FILTER_ACCEPT_DIRECT); RX_FILTER_SET_FLAG(pAd, fRX_FILTER_ACCEPT_DIRECT);
...@@ -3375,7 +3346,6 @@ VOID UserCfgInit( ...@@ -3375,7 +3346,6 @@ VOID UserCfgInit(
pAd->StaCfg.bAutoTxRateSwitch = TRUE; pAd->StaCfg.bAutoTxRateSwitch = TRUE;
pAd->StaCfg.DesiredTransmitSetting.field.MCS = MCS_AUTO; pAd->StaCfg.DesiredTransmitSetting.field.MCS = MCS_AUTO;
} }
#endif // CONFIG_STA_SUPPORT //
// global variables mXXXX used in MAC protocol state machines // global variables mXXXX used in MAC protocol state machines
OPSTATUS_SET_FLAG(pAd, fOP_STATUS_RECEIVE_DTIM); OPSTATUS_SET_FLAG(pAd, fOP_STATUS_RECEIVE_DTIM);
...@@ -3386,7 +3356,6 @@ VOID UserCfgInit( ...@@ -3386,7 +3356,6 @@ VOID UserCfgInit(
pAd->CommonCfg.PhyMode = PHY_11BG_MIXED; // default PHY mode pAd->CommonCfg.PhyMode = PHY_11BG_MIXED; // default PHY mode
OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_SHORT_PREAMBLE_INUSED); // CCK use LONG preamble OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_SHORT_PREAMBLE_INUSED); // CCK use LONG preamble
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
// user desired power mode // user desired power mode
...@@ -3431,7 +3400,6 @@ VOID UserCfgInit( ...@@ -3431,7 +3400,6 @@ VOID UserCfgInit(
#endif // WPA_SUPPLICANT_SUPPORT // #endif // WPA_SUPPLICANT_SUPPORT //
} }
#endif // CONFIG_STA_SUPPORT //
// Default for extra information is not valid // Default for extra information is not valid
pAd->ExtraInfo = EXTRA_INFO_CLEAR; pAd->ExtraInfo = EXTRA_INFO_CLEAR;
......
...@@ -691,9 +691,6 @@ VOID RTMPCalculateMICValue( ...@@ -691,9 +691,6 @@ VOID RTMPCalculateMICValue(
// determine if this is a vlan packet // determine if this is a vlan packet
if (((*(pSrc + 12) << 8) + *(pSrc + 13)) == 0x8100) if (((*(pSrc + 12) << 8) + *(pSrc + 13)) == 0x8100)
vlan_offset = 4; vlan_offset = 4;
#ifdef CONFIG_STA_SUPPORT
#endif // CONFIG_STA_SUPPORT //
{ {
RTMPInitMICEngine( RTMPInitMICEngine(
pAd, pAd,
......
...@@ -153,14 +153,12 @@ VOID RTMPInitWepEngine( ...@@ -153,14 +153,12 @@ VOID RTMPInitWepEngine(
pAd->PrivateInfo.FCSCRC32 = PPPINITFCS32; //Init crc32. pAd->PrivateInfo.FCSCRC32 = PPPINITFCS32; //Init crc32.
#ifdef CONFIG_STA_SUPPORT
if (pAd->StaCfg.bCkipOn && (pAd->StaCfg.CkipFlag & 0x10) && (pAd->OpMode == OPMODE_STA)) if (pAd->StaCfg.bCkipOn && (pAd->StaCfg.CkipFlag & 0x10) && (pAd->OpMode == OPMODE_STA))
{ {
ARCFOUR_INIT(&pAd->PrivateInfo.WEPCONTEXT, pKey, KeyLen); //INIT SBOX, KEYLEN+3(IV) ARCFOUR_INIT(&pAd->PrivateInfo.WEPCONTEXT, pKey, KeyLen); //INIT SBOX, KEYLEN+3(IV)
NdisMoveMemory(pDest, pKey, 3); //Append Init Vector NdisMoveMemory(pDest, pKey, 3); //Append Init Vector
} }
else else
#endif // CONFIG_STA_SUPPORT //
{ {
NdisMoveMemory(WEPKEY + 3, pKey, KeyLen); NdisMoveMemory(WEPKEY + 3, pKey, KeyLen);
......
...@@ -319,7 +319,6 @@ VOID RTUSBBulkOutDataPacket( ...@@ -319,7 +319,6 @@ VOID RTUSBBulkOutDataPacket(
break; break;
} }
//PS packets use HCCA queue when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA) //PS packets use HCCA queue when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA)
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
if (pTxInfo->QSEL != FIFO_EDCA) if (pTxInfo->QSEL != FIFO_EDCA)
...@@ -329,7 +328,6 @@ VOID RTUSBBulkOutDataPacket( ...@@ -329,7 +328,6 @@ VOID RTUSBBulkOutDataPacket(
hex_dump("Wrong QSel Pkt:", (PUCHAR)&pWirelessPkt[TmpBulkEndPos], (pHTTXContext->CurWritePosition - pHTTXContext->NextBulkOutPosition)); hex_dump("Wrong QSel Pkt:", (PUCHAR)&pWirelessPkt[TmpBulkEndPos], (pHTTXContext->CurWritePosition - pHTTXContext->NextBulkOutPosition));
} }
} }
#endif // CONFIG_STA_SUPPORT //
if (pTxInfo->USBDMATxPktLen <= 8) if (pTxInfo->USBDMATxPktLen <= 8)
{ {
...@@ -356,10 +354,8 @@ VOID RTUSBBulkOutDataPacket( ...@@ -356,10 +354,8 @@ VOID RTUSBBulkOutDataPacket(
pLastTxInfo = pTxInfo; pLastTxInfo = pTxInfo;
// Make sure we use EDCA QUEUE. // Make sure we use EDCA QUEUE.
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
pTxInfo->QSEL = FIFO_EDCA; //PS packets use HCCA queue when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA) pTxInfo->QSEL = FIFO_EDCA; //PS packets use HCCA queue when dequeue from PS unicast queue (WiFi WPA2 MA9_DT1 for Marvell B STA)
#endif // CONFIG_STA_SUPPORT //
ThisBulkSize += (pTxInfo->USBDMATxPktLen+4); ThisBulkSize += (pTxInfo->USBDMATxPktLen+4);
TmpBulkEndPos += (pTxInfo->USBDMATxPktLen+4); TmpBulkEndPos += (pTxInfo->USBDMATxPktLen+4);
...@@ -846,10 +842,8 @@ VOID RTUSBBulkReceive( ...@@ -846,10 +842,8 @@ VOID RTUSBBulkReceive(
RTMP_IRQ_UNLOCK(&pAd->BulkInLock, IrqFlags); RTMP_IRQ_UNLOCK(&pAd->BulkInLock, IrqFlags);
// read RxContext, Since not // read RxContext, Since not
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
STARxDoneInterruptHandle(pAd, TRUE); STARxDoneInterruptHandle(pAd, TRUE);
#endif // CONFIG_STA_SUPPORT //
// Finish to handle this bulkIn buffer. // Finish to handle this bulkIn buffer.
RTMP_IRQ_LOCK(&pAd->BulkInLock, IrqFlags); RTMP_IRQ_LOCK(&pAd->BulkInLock, IrqFlags);
......
...@@ -1195,12 +1195,7 @@ VOID CMDHandler( ...@@ -1195,12 +1195,7 @@ VOID CMDHandler(
{ {
case CMDTHREAD_CHECK_GPIO: case CMDTHREAD_CHECK_GPIO:
{ {
#ifdef CONFIG_STA_SUPPORT
UINT32 data; UINT32 data;
#endif // CONFIG_STA_SUPPORT //
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
...@@ -1238,17 +1233,14 @@ VOID CMDHandler( ...@@ -1238,17 +1233,14 @@ VOID CMDHandler(
} }
} }
} }
#endif // CONFIG_STA_SUPPORT //
} }
break; break;
#ifdef CONFIG_STA_SUPPORT
case CMDTHREAD_QKERIODIC_EXECUT: case CMDTHREAD_QKERIODIC_EXECUT:
{ {
StaQuickResponeForRateUpExec(NULL, pAd, NULL, NULL); StaQuickResponeForRateUpExec(NULL, pAd, NULL, NULL);
} }
break; break;
#endif // CONFIG_STA_SUPPORT //
case CMDTHREAD_RESET_BULK_OUT: case CMDTHREAD_RESET_BULK_OUT:
{ {
...@@ -1578,7 +1570,6 @@ VOID CMDHandler( ...@@ -1578,7 +1570,6 @@ VOID CMDHandler(
case CMDTHREAD_SET_ASIC_WCID_CIPHER: case CMDTHREAD_SET_ASIC_WCID_CIPHER:
{ {
#ifdef CONFIG_STA_SUPPORT
RT_SET_ASIC_WCID_ATTRI SetAsicWcidAttri; RT_SET_ASIC_WCID_ATTRI SetAsicWcidAttri;
USHORT offset; USHORT offset;
UINT32 MACRValue = 0; UINT32 MACRValue = 0;
...@@ -1630,7 +1621,6 @@ VOID CMDHandler( ...@@ -1630,7 +1621,6 @@ VOID CMDHandler(
RTUSBWriteMACRegister(pAd, SHARED_KEY_MODE_BASE+4*(0/2), csr1.word); RTUSBWriteMACRegister(pAd, SHARED_KEY_MODE_BASE+4*(0/2), csr1.word);
} }
#endif // CONFIG_STA_SUPPORT //
} }
break; break;
...@@ -1669,8 +1659,6 @@ VOID CMDHandler( ...@@ -1669,8 +1659,6 @@ VOID CMDHandler(
MAC_TABLE_ENTRY *pEntry; MAC_TABLE_ENTRY *pEntry;
pEntry = (MAC_TABLE_ENTRY *)pData; pEntry = (MAC_TABLE_ENTRY *)pData;
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
AsicRemovePairwiseKeyEntry(pAd, pEntry->apidx, (UCHAR)pEntry->Aid); AsicRemovePairwiseKeyEntry(pAd, pEntry->apidx, (UCHAR)pEntry->Aid);
...@@ -1706,7 +1694,6 @@ VOID CMDHandler( ...@@ -1706,7 +1694,6 @@ VOID CMDHandler(
RTUSBWriteMACRegister(pAd, offset, 0); RTUSBWriteMACRegister(pAd, offset, 0);
} }
} }
#endif // CONFIG_STA_SUPPORT //
AsicUpdateRxWCIDTable(pAd, pEntry->Aid, pEntry->Addr); AsicUpdateRxWCIDTable(pAd, pEntry->Aid, pEntry->Addr);
printk("UpdateRxWCIDTable(): Aid=%d, Addr=%02x:%02x:%02x:%02x:%02x:%02x!\n", pEntry->Aid, printk("UpdateRxWCIDTable(): Aid=%d, Addr=%02x:%02x:%02x:%02x:%02x:%02x!\n", pEntry->Aid,
...@@ -1724,7 +1711,6 @@ VOID CMDHandler( ...@@ -1724,7 +1711,6 @@ VOID CMDHandler(
case OID_802_11_ADD_WEP: case OID_802_11_ADD_WEP:
{ {
#ifdef CONFIG_STA_SUPPORT
UINT i; UINT i;
UINT32 KeyIdx; UINT32 KeyIdx;
PNDIS_802_11_WEP pWepKey; PNDIS_802_11_WEP pWepKey;
...@@ -1798,7 +1784,6 @@ VOID CMDHandler( ...@@ -1798,7 +1784,6 @@ VOID CMDHandler(
AsicAddSharedKeyEntry(pAd, BSS0, (UCHAR)KeyIdx, CipherAlg, pWepKey->KeyMaterial, NULL, NULL); AsicAddSharedKeyEntry(pAd, BSS0, (UCHAR)KeyIdx, CipherAlg, pWepKey->KeyMaterial, NULL, NULL);
DBGPRINT(RT_DEBUG_TRACE, ("CmdThread::OID_802_11_ADD_WEP (KeyIdx=%d, Len=%d-byte)\n", KeyIdx, pWepKey->KeyLength)); DBGPRINT(RT_DEBUG_TRACE, ("CmdThread::OID_802_11_ADD_WEP (KeyIdx=%d, Len=%d-byte)\n", KeyIdx, pWepKey->KeyLength));
} }
#endif // CONFIG_STA_SUPPORT //
} }
break; break;
......
...@@ -1453,10 +1453,8 @@ static VOID PeerChSwAnnAction( ...@@ -1453,10 +1453,8 @@ static VOID PeerChSwAnnAction(
{ {
CH_SW_ANN_INFO ChSwAnnInfo; CH_SW_ANN_INFO ChSwAnnInfo;
PFRAME_802_11 pFr = (PFRAME_802_11)Elem->Msg; PFRAME_802_11 pFr = (PFRAME_802_11)Elem->Msg;
#ifdef CONFIG_STA_SUPPORT
UCHAR index = 0, Channel = 0, NewChannel = 0; UCHAR index = 0, Channel = 0, NewChannel = 0;
ULONG Bssidx = 0; ULONG Bssidx = 0;
#endif // CONFIG_STA_SUPPORT //
NdisZeroMemory(&ChSwAnnInfo, sizeof(CH_SW_ANN_INFO)); NdisZeroMemory(&ChSwAnnInfo, sizeof(CH_SW_ANN_INFO));
if (! PeerChSwAnnSanity(pAd, Elem->Msg, Elem->MsgLen, &ChSwAnnInfo)) if (! PeerChSwAnnSanity(pAd, Elem->Msg, Elem->MsgLen, &ChSwAnnInfo))
...@@ -1465,8 +1463,6 @@ static VOID PeerChSwAnnAction( ...@@ -1465,8 +1463,6 @@ static VOID PeerChSwAnnAction(
return; return;
} }
#ifdef CONFIG_STA_SUPPORT
if (pAd->OpMode == OPMODE_STA) if (pAd->OpMode == OPMODE_STA)
{ {
Bssidx = BssTableSearch(&pAd->ScanTab, pFr->Hdr.Addr3, pAd->CommonCfg.Channel); Bssidx = BssTableSearch(&pAd->ScanTab, pFr->Hdr.Addr3, pAd->CommonCfg.Channel);
...@@ -1513,7 +1509,6 @@ static VOID PeerChSwAnnAction( ...@@ -1513,7 +1509,6 @@ static VOID PeerChSwAnnAction(
} }
} }
} }
#endif // CONFIG_STA_SUPPORT //
return; return;
} }
......
...@@ -77,12 +77,9 @@ ...@@ -77,12 +77,9 @@
#define FAST_ACTIVE_SCAN_TIME 30 // Active scan waiting for probe response time #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 #define CW_MIN_IN_BITS 4 // actual CwMin = 2^CW_MIN_IN_BITS - 1
#ifdef CONFIG_STA_SUPPORT
#ifndef CONFIG_AP_SUPPORT #ifndef CONFIG_AP_SUPPORT
#define CW_MAX_IN_BITS 10 // actual CwMax = 2^CW_MAX_IN_BITS - 1 #define CW_MAX_IN_BITS 10 // actual CwMax = 2^CW_MAX_IN_BITS - 1
#endif #endif
#endif // CONFIG_STA_SUPPORT //
// Note: RSSI_TO_DBM_OFFSET has been changed to variable for new RF (2004-0720). // Note: RSSI_TO_DBM_OFFSET has been changed to variable for new RF (2004-0720).
// SHould not refer to this constant anymore // SHould not refer to this constant anymore
...@@ -121,10 +118,7 @@ ...@@ -121,10 +118,7 @@
#define BSS_NOT_FOUND 0xFFFFFFFF #define BSS_NOT_FOUND 0xFFFFFFFF
#ifdef CONFIG_STA_SUPPORT
#define MAX_LEN_OF_MLME_QUEUE 40 //10 #define MAX_LEN_OF_MLME_QUEUE 40 //10
#endif // CONFIG_STA_SUPPORT //
#define SCAN_PASSIVE 18 // scan with no probe request, only wait beacon and probe response #define SCAN_PASSIVE 18 // scan with no probe request, only wait beacon and probe response
#define SCAN_ACTIVE 19 // scan with probe request, and wait beacon and probe response #define SCAN_ACTIVE 19 // scan with probe request, and wait beacon and probe response
...@@ -855,13 +849,10 @@ typedef struct { ...@@ -855,13 +849,10 @@ typedef struct {
UCHAR EdcaUpdateCount; UCHAR EdcaUpdateCount;
} QOS_CAPABILITY_PARM, *PQOS_CAPABILITY_PARM; } QOS_CAPABILITY_PARM, *PQOS_CAPABILITY_PARM;
#ifdef CONFIG_STA_SUPPORT
typedef struct { typedef struct {
UCHAR IELen; UCHAR IELen;
UCHAR IE[MAX_CUSTOM_LEN]; UCHAR IE[MAX_CUSTOM_LEN];
} WPA_IE_; } WPA_IE_;
#endif // CONFIG_STA_SUPPORT //
typedef struct { typedef struct {
UCHAR Bssid[MAC_ADDR_LEN]; UCHAR Bssid[MAC_ADDR_LEN];
...@@ -921,10 +912,8 @@ typedef struct { ...@@ -921,10 +912,8 @@ typedef struct {
EDCA_PARM EdcaParm; EDCA_PARM EdcaParm;
QOS_CAPABILITY_PARM QosCapability; QOS_CAPABILITY_PARM QosCapability;
QBSS_LOAD_PARM QbssLoad; QBSS_LOAD_PARM QbssLoad;
#ifdef CONFIG_STA_SUPPORT
WPA_IE_ WpaIE; WPA_IE_ WpaIE;
WPA_IE_ RsnIE; WPA_IE_ RsnIE;
#endif // CONFIG_STA_SUPPORT //
} BSS_ENTRY, *PBSS_ENTRY; } BSS_ENTRY, *PBSS_ENTRY;
typedef struct { typedef struct {
......
...@@ -387,9 +387,6 @@ typedef struct PACKED _RADIUS_CONF ...@@ -387,9 +387,6 @@ typedef struct PACKED _RADIUS_CONF
RADIUS_KEY_INFO RadiusInfo[8/*MAX_MBSSID_NUM*/]; RADIUS_KEY_INFO RadiusInfo[8/*MAX_MBSSID_NUM*/];
} RADIUS_CONF, *PRADIUS_CONF; } RADIUS_CONF, *PRADIUS_CONF;
#ifdef CONFIG_STA_SUPPORT
// Key mapping keys require a BSSID // Key mapping keys require a BSSID
typedef struct _NDIS_802_11_KEY typedef struct _NDIS_802_11_KEY
{ {
...@@ -400,7 +397,6 @@ typedef struct _NDIS_802_11_KEY ...@@ -400,7 +397,6 @@ typedef struct _NDIS_802_11_KEY
NDIS_802_11_KEY_RSC KeyRSC; NDIS_802_11_KEY_RSC KeyRSC;
UCHAR KeyMaterial[1]; // variable length depending on above field UCHAR KeyMaterial[1]; // variable length depending on above field
} NDIS_802_11_KEY, *PNDIS_802_11_KEY; } NDIS_802_11_KEY, *PNDIS_802_11_KEY;
#endif // CONFIG_STA_SUPPORT //
typedef struct _NDIS_802_11_REMOVE_KEY typedef struct _NDIS_802_11_REMOVE_KEY
{ {
...@@ -615,7 +611,6 @@ typedef enum _NDIS_802_11_MEDIA_STREAM_MODE ...@@ -615,7 +611,6 @@ typedef enum _NDIS_802_11_MEDIA_STREAM_MODE
// PMKID Structures // PMKID Structures
typedef UCHAR NDIS_802_11_PMKID_VALUE[16]; typedef UCHAR NDIS_802_11_PMKID_VALUE[16];
#ifdef CONFIG_STA_SUPPORT
typedef struct _BSSID_INFO typedef struct _BSSID_INFO
{ {
NDIS_802_11_MAC_ADDRESS BSSID; NDIS_802_11_MAC_ADDRESS BSSID;
...@@ -628,8 +623,6 @@ typedef struct _NDIS_802_11_PMKID ...@@ -628,8 +623,6 @@ typedef struct _NDIS_802_11_PMKID
UINT BSSIDInfoCount; UINT BSSIDInfoCount;
BSSID_INFO BSSIDInfo[1]; BSSID_INFO BSSIDInfo[1];
} NDIS_802_11_PMKID, *PNDIS_802_11_PMKID; } NDIS_802_11_PMKID, *PNDIS_802_11_PMKID;
#endif // CONFIG_STA_SUPPORT //
typedef struct _NDIS_802_11_AUTHENTICATION_ENCRYPTION typedef struct _NDIS_802_11_AUTHENTICATION_ENCRYPTION
{ {
...@@ -653,7 +646,6 @@ typedef struct _NDIS_802_11_CAPABILITY ...@@ -653,7 +646,6 @@ typedef struct _NDIS_802_11_CAPABILITY
#define SIOCIWFIRSTPRIV SIOCDEVPRIVATE #define SIOCIWFIRSTPRIV SIOCDEVPRIVATE
#endif #endif
#ifdef CONFIG_STA_SUPPORT
#define RT_PRIV_IOCTL_EXT (SIOCIWFIRSTPRIV + 0x01) // Sync. with AP for wsc upnp daemon #define RT_PRIV_IOCTL_EXT (SIOCIWFIRSTPRIV + 0x01) // Sync. with AP for wsc upnp daemon
#define RTPRIV_IOCTL_SET (SIOCIWFIRSTPRIV + 0x02) #define RTPRIV_IOCTL_SET (SIOCIWFIRSTPRIV + 0x02)
...@@ -686,11 +678,6 @@ enum { ...@@ -686,11 +678,6 @@ enum {
SHOW_CFG_VALUE = 20, SHOW_CFG_VALUE = 20,
}; };
#endif // CONFIG_STA_SUPPORT //
#define OID_802_11_BUILD_CHANNEL_EX 0x0714 #define OID_802_11_BUILD_CHANNEL_EX 0x0714
#define OID_802_11_GET_CH_LIST 0x0715 #define OID_802_11_GET_CH_LIST 0x0715
#define OID_802_11_GET_COUNTRY_CODE 0x0716 #define OID_802_11_GET_COUNTRY_CODE 0x0716
...@@ -698,7 +685,6 @@ enum { ...@@ -698,7 +685,6 @@ enum {
//#define RT_OID_802_11_STATISTICS (OID_GET_SET_TOGGLE | OID_802_11_STATISTICS) //#define RT_OID_802_11_STATISTICS (OID_GET_SET_TOGGLE | OID_802_11_STATISTICS)
#ifdef CONFIG_STA_SUPPORT
#define RT_OID_WSC_SET_PASSPHRASE 0x0740 // passphrase for wpa(2)-psk #define RT_OID_WSC_SET_PASSPHRASE 0x0740 // passphrase for wpa(2)-psk
#define RT_OID_WSC_DRIVER_AUTO_CONNECT 0x0741 #define RT_OID_WSC_DRIVER_AUTO_CONNECT 0x0741
#define RT_OID_WSC_QUERY_DEFAULT_PROFILE 0x0742 #define RT_OID_WSC_QUERY_DEFAULT_PROFILE 0x0742
...@@ -709,7 +695,7 @@ enum { ...@@ -709,7 +695,7 @@ enum {
#define RT_OID_WSC_SET_MODE 0x0747 // PIN or PBC #define RT_OID_WSC_SET_MODE 0x0747 // PIN or PBC
#define RT_OID_WSC_SET_CONF_MODE 0x0748 // Enrollee or Registrar #define RT_OID_WSC_SET_CONF_MODE 0x0748 // Enrollee or Registrar
#define RT_OID_WSC_SET_PROFILE 0x0749 #define RT_OID_WSC_SET_PROFILE 0x0749
#endif // CONFIG_STA_SUPPORT //
#define RT_OID_802_11_WSC_QUERY_PROFILE 0x0750 #define RT_OID_802_11_WSC_QUERY_PROFILE 0x0750
// for consistency with RT61 // for consistency with RT61
#define RT_OID_WSC_QUERY_STATUS 0x0751 #define RT_OID_WSC_QUERY_STATUS 0x0751
...@@ -948,7 +934,6 @@ typedef struct _RT_LLTD_ASSOICATION_TABLE { ...@@ -948,7 +934,6 @@ typedef struct _RT_LLTD_ASSOICATION_TABLE {
} RT_LLTD_ASSOICATION_TABLE, *PRT_LLTD_ASSOICATION_TABLE; } RT_LLTD_ASSOICATION_TABLE, *PRT_LLTD_ASSOICATION_TABLE;
#endif // LLTD_SUPPORT // #endif // LLTD_SUPPORT //
#ifdef CONFIG_STA_SUPPORT
#ifdef WPA_SUPPLICANT_SUPPORT #ifdef WPA_SUPPLICANT_SUPPORT
#ifndef NATIVE_WPA_SUPPLICANT_SUPPORT #ifndef NATIVE_WPA_SUPPLICANT_SUPPORT
#define RT_ASSOC_EVENT_FLAG 0x0101 #define RT_ASSOC_EVENT_FLAG 0x0101
...@@ -961,19 +946,15 @@ typedef struct _RT_LLTD_ASSOICATION_TABLE { ...@@ -961,19 +946,15 @@ typedef struct _RT_LLTD_ASSOICATION_TABLE {
#define RT_INTERFACE_UP 0x0108 #define RT_INTERFACE_UP 0x0108
#endif // NATIVE_WPA_SUPPLICANT_SUPPORT // #endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
#endif // WPA_SUPPLICANT_SUPPORT // #endif // WPA_SUPPLICANT_SUPPORT //
#endif // CONFIG_STA_SUPPORT //
#define MAX_CUSTOM_LEN 128 #define MAX_CUSTOM_LEN 128
#ifdef CONFIG_STA_SUPPORT
typedef enum _RT_802_11_D_CLIENT_MODE typedef enum _RT_802_11_D_CLIENT_MODE
{ {
Rt802_11_D_None, Rt802_11_D_None,
Rt802_11_D_Flexible, Rt802_11_D_Flexible,
Rt802_11_D_Strict, Rt802_11_D_Strict,
} RT_802_11_D_CLIENT_MODE, *PRT_802_11_D_CLIENT_MODE; } RT_802_11_D_CLIENT_MODE, *PRT_802_11_D_CLIENT_MODE;
#endif // CONFIG_STA_SUPPORT //
typedef struct _RT_CHANNEL_LIST_INFO typedef struct _RT_CHANNEL_LIST_INFO
{ {
......
...@@ -62,23 +62,16 @@ ...@@ -62,23 +62,16 @@
#include "chlist.h" #include "chlist.h"
#include "spectrum.h" #include "spectrum.h"
#ifdef CONFIG_STA_SUPPORT
#endif // CONFIG_STA_SUPPORT //
#ifdef IGMP_SNOOP_SUPPORT #ifdef IGMP_SNOOP_SUPPORT
#include "igmp_snoop.h" #include "igmp_snoop.h"
#endif // IGMP_SNOOP_SUPPORT // #endif // IGMP_SNOOP_SUPPORT //
#ifdef CONFIG_STA_SUPPORT
#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT #ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
#ifndef WPA_SUPPLICANT_SUPPORT #ifndef WPA_SUPPLICANT_SUPPORT
#error "Build for being controlled by NetworkManager or wext, please set HAS_WPA_SUPPLICANT=y and HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y" #error "Build for being controlled by NetworkManager or wext, please set HAS_WPA_SUPPLICANT=y and HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y"
#endif // WPA_SUPPLICANT_SUPPORT // #endif // WPA_SUPPLICANT_SUPPORT //
#endif // NATIVE_WPA_SUPPLICANT_SUPPORT // #endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
#endif // CONFIG_STA_SUPPORT //
#ifdef IKANOS_VX_1X0 #ifdef IKANOS_VX_1X0
#include "vr_ikans.h" #include "vr_ikans.h"
#endif // IKANOS_VX_1X0 // #endif // IKANOS_VX_1X0 //
......
...@@ -38,8 +38,6 @@ BUILD_TIMER_FUNCTION(AsicRfTuningExec); ...@@ -38,8 +38,6 @@ BUILD_TIMER_FUNCTION(AsicRfTuningExec);
BUILD_TIMER_FUNCTION(BeaconUpdateExec); BUILD_TIMER_FUNCTION(BeaconUpdateExec);
#endif // RT2870 // #endif // RT2870 //
#ifdef CONFIG_STA_SUPPORT
BUILD_TIMER_FUNCTION(BeaconTimeout); BUILD_TIMER_FUNCTION(BeaconTimeout);
BUILD_TIMER_FUNCTION(ScanTimeout); BUILD_TIMER_FUNCTION(ScanTimeout);
BUILD_TIMER_FUNCTION(AuthTimeout); BUILD_TIMER_FUNCTION(AuthTimeout);
...@@ -49,7 +47,6 @@ BUILD_TIMER_FUNCTION(DisassocTimeout); ...@@ -49,7 +47,6 @@ BUILD_TIMER_FUNCTION(DisassocTimeout);
BUILD_TIMER_FUNCTION(LinkDownExec); BUILD_TIMER_FUNCTION(LinkDownExec);
BUILD_TIMER_FUNCTION(StaQuickResponeForRateUpExec); BUILD_TIMER_FUNCTION(StaQuickResponeForRateUpExec);
BUILD_TIMER_FUNCTION(WpaDisassocApAndBlockAssoc); BUILD_TIMER_FUNCTION(WpaDisassocApAndBlockAssoc);
#endif // CONFIG_STA_SUPPORT //
...@@ -495,13 +492,10 @@ PNET_DEV get_netdev_from_bssid( ...@@ -495,13 +492,10 @@ PNET_DEV get_netdev_from_bssid(
{ {
PNET_DEV dev_p = NULL; PNET_DEV dev_p = NULL;
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
dev_p = pAd->net_dev; dev_p = pAd->net_dev;
} }
#endif // CONFIG_STA_SUPPORT //
ASSERT(dev_p); ASSERT(dev_p);
return dev_p; /* return one of MBSS */ return dev_p; /* return one of MBSS */
...@@ -657,10 +651,8 @@ void wlan_802_11_to_802_3_packet( ...@@ -657,10 +651,8 @@ void wlan_802_11_to_802_3_packet(
// //
// //
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 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);
#endif // CONFIG_STA_SUPPORT //
} }
...@@ -676,9 +668,6 @@ void announce_802_3_packet( ...@@ -676,9 +668,6 @@ void announce_802_3_packet(
pRxPkt = RTPKT_TO_OSPKT(pPacket); pRxPkt = RTPKT_TO_OSPKT(pPacket);
#ifdef CONFIG_STA_SUPPORT
#endif // CONFIG_STA_SUPPORT //
/* Push up the protocol stack */ /* Push up the protocol stack */
#ifdef IKANOS_VX_1X0 #ifdef IKANOS_VX_1X0
IKANOS_DataFrameRx(pAd, pRxPkt->dev, pRxPkt, pRxPkt->len); IKANOS_DataFrameRx(pAd, pRxPkt->dev, pRxPkt, pRxPkt->len);
...@@ -831,8 +820,6 @@ VOID RTMPSendWirelessEvent( ...@@ -831,8 +820,6 @@ VOID RTMPSendWirelessEvent(
#endif /* WIRELESS_EXT >= 15 */ #endif /* WIRELESS_EXT >= 15 */
} }
#ifdef CONFIG_STA_SUPPORT
void send_monitor_packets( void send_monitor_packets(
IN PRTMP_ADAPTER pAd, IN PRTMP_ADAPTER pAd,
IN RX_BLK *pRxBlk) IN RX_BLK *pRxBlk)
...@@ -1003,8 +990,6 @@ void send_monitor_packets( ...@@ -1003,8 +990,6 @@ void send_monitor_packets(
return; return;
} }
#endif // CONFIG_STA_SUPPORT //
void rtmp_os_thread_init(PUCHAR pThreadName, PVOID pNotify) void rtmp_os_thread_init(PUCHAR pThreadName, PVOID pNotify)
{ {
......
...@@ -88,8 +88,6 @@ typedef int (*HARD_START_XMIT_FUNC)(struct sk_buff *skb, struct net_device *net_ ...@@ -88,8 +88,6 @@ typedef int (*HARD_START_XMIT_FUNC)(struct sk_buff *skb, struct net_device *net_
// add by kathy // add by kathy
#ifdef CONFIG_STA_SUPPORT
#ifdef RT2870 #ifdef RT2870
#define STA_PROFILE_PATH "/etc/Wireless/RT2870STA/RT2870STA.dat" #define STA_PROFILE_PATH "/etc/Wireless/RT2870STA/RT2870STA.dat"
#define STA_RT2870_IMAGE_FILE_NAME "/etc/Wireless/RT2870STA/rt2870.bin" #define STA_RT2870_IMAGE_FILE_NAME "/etc/Wireless/RT2870STA/rt2870.bin"
...@@ -97,9 +95,6 @@ typedef int (*HARD_START_XMIT_FUNC)(struct sk_buff *skb, struct net_device *net_ ...@@ -97,9 +95,6 @@ typedef int (*HARD_START_XMIT_FUNC)(struct sk_buff *skb, struct net_device *net_
#define STA_DRIVER_VERSION "2.0.1.0" #define STA_DRIVER_VERSION "2.0.1.0"
#endif // RT2870 // #endif // RT2870 //
#endif // CONFIG_STA_SUPPORT //
#define RTMP_TIME_AFTER(a,b) \ #define RTMP_TIME_AFTER(a,b) \
(typecheck(unsigned long, (unsigned long)a) && \ (typecheck(unsigned long, (unsigned long)a) && \
typecheck(unsigned long, (unsigned long)b) && \ typecheck(unsigned long, (unsigned long)b) && \
...@@ -138,17 +133,12 @@ typedef int (*HARD_START_XMIT_FUNC)(struct sk_buff *skb, struct net_device *net_ ...@@ -138,17 +133,12 @@ typedef int (*HARD_START_XMIT_FUNC)(struct sk_buff *skb, struct net_device *net_
#define MIN_NET_DEVICE_FOR_WDS 0x10 //0x40,0x50,0x60,0x70 #define MIN_NET_DEVICE_FOR_WDS 0x10 //0x40,0x50,0x60,0x70
#define MIN_NET_DEVICE_FOR_APCLI 0x20 #define MIN_NET_DEVICE_FOR_APCLI 0x20
#define MIN_NET_DEVICE_FOR_MESH 0x30 #define MIN_NET_DEVICE_FOR_MESH 0x30
#ifdef CONFIG_STA_SUPPORT
#define MIN_NET_DEVICE_FOR_DLS 0x40 #define MIN_NET_DEVICE_FOR_DLS 0x40
#endif // CONFIG_STA_SUPPORT //
#ifdef CONFIG_STA_SUPPORT
#define NDIS_PACKET_TYPE_DIRECTED 0 #define NDIS_PACKET_TYPE_DIRECTED 0
#define NDIS_PACKET_TYPE_MULTICAST 1 #define NDIS_PACKET_TYPE_MULTICAST 1
#define NDIS_PACKET_TYPE_BROADCAST 2 #define NDIS_PACKET_TYPE_BROADCAST 2
#define NDIS_PACKET_TYPE_ALL_MULTICAST 3 #define NDIS_PACKET_TYPE_ALL_MULTICAST 3
#endif // CONFIG_STA_SUPPORT //
struct os_lock { struct os_lock {
spinlock_t lock; spinlock_t lock;
...@@ -513,8 +503,6 @@ DECLARE_TIMER_FUNCTION(AsicRfTuningExec); ...@@ -513,8 +503,6 @@ DECLARE_TIMER_FUNCTION(AsicRfTuningExec);
DECLARE_TIMER_FUNCTION(BeaconUpdateExec); DECLARE_TIMER_FUNCTION(BeaconUpdateExec);
#endif // RT2870 // #endif // RT2870 //
#ifdef CONFIG_STA_SUPPORT
DECLARE_TIMER_FUNCTION(BeaconTimeout); DECLARE_TIMER_FUNCTION(BeaconTimeout);
DECLARE_TIMER_FUNCTION(ScanTimeout); DECLARE_TIMER_FUNCTION(ScanTimeout);
DECLARE_TIMER_FUNCTION(AuthTimeout); DECLARE_TIMER_FUNCTION(AuthTimeout);
...@@ -526,7 +514,6 @@ DECLARE_TIMER_FUNCTION(StaQuickResponeForRateUpExec); ...@@ -526,7 +514,6 @@ DECLARE_TIMER_FUNCTION(StaQuickResponeForRateUpExec);
DECLARE_TIMER_FUNCTION(WpaDisassocApAndBlockAssoc); DECLARE_TIMER_FUNCTION(WpaDisassocApAndBlockAssoc);
DECLARE_TIMER_FUNCTION(PsPollWakeExec); DECLARE_TIMER_FUNCTION(PsPollWakeExec);
DECLARE_TIMER_FUNCTION(RadioOnExec); DECLARE_TIMER_FUNCTION(RadioOnExec);
#endif // CONFIG_STA_SUPPORT //
void RTMP_GetCurrentSystemTime(LARGE_INTEGER *time); void RTMP_GetCurrentSystemTime(LARGE_INTEGER *time);
......
...@@ -72,9 +72,7 @@ INT rt28xx_send_packets(IN struct sk_buff *skb_p, IN struct net_device *net_dev) ...@@ -72,9 +72,7 @@ INT rt28xx_send_packets(IN struct sk_buff *skb_p, IN struct net_device *net_dev)
static void CfgInitHook(PRTMP_ADAPTER pAd); static void CfgInitHook(PRTMP_ADAPTER pAd);
//static BOOLEAN RT28XXAvailRANameAssign(IN CHAR *name_p); //static BOOLEAN RT28XXAvailRANameAssign(IN CHAR *name_p);
#ifdef CONFIG_STA_SUPPORT
extern const struct iw_handler_def rt28xx_iw_handler_def; extern const struct iw_handler_def rt28xx_iw_handler_def;
#endif // CONFIG_STA_SUPPORT //
#if WIRELESS_EXT >= 12 #if WIRELESS_EXT >= 12
// This function will be called when query /proc // This function will be called when query /proc
...@@ -206,7 +204,6 @@ int rt28xx_close(IN PNET_DEV dev) ...@@ -206,7 +204,6 @@ int rt28xx_close(IN PNET_DEV dev)
if (pAd == NULL) if (pAd == NULL)
return 0; // close ok return 0; // close ok
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
...@@ -267,7 +264,6 @@ int rt28xx_close(IN PNET_DEV dev) ...@@ -267,7 +264,6 @@ int rt28xx_close(IN PNET_DEV dev)
MlmeRadioOff(pAd); MlmeRadioOff(pAd);
} }
#endif // CONFIG_STA_SUPPORT //
RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS); RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS);
...@@ -323,13 +319,10 @@ int rt28xx_close(IN PNET_DEV dev) ...@@ -323,13 +319,10 @@ int rt28xx_close(IN PNET_DEV dev)
// Close kernel threads or tasklets // Close kernel threads or tasklets
kill_thread_task(pAd); kill_thread_task(pAd);
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
MacTableReset(pAd); MacTableReset(pAd);
} }
#endif // CONFIG_STA_SUPPORT //
MeasureReqTabExit(pAd); MeasureReqTabExit(pAd);
...@@ -439,10 +432,8 @@ static int rt28xx_init(IN struct net_device *net_dev) ...@@ -439,10 +432,8 @@ static int rt28xx_init(IN struct net_device *net_dev)
CfgInitHook(pAd); CfgInitHook(pAd);
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
NdisAllocateSpinLock(&pAd->MacTabLock); NdisAllocateSpinLock(&pAd->MacTabLock);
#endif // CONFIG_STA_SUPPORT //
MeasureReqTabInit(pAd); MeasureReqTabInit(pAd);
TpcReqTabInit(pAd); TpcReqTabInit(pAd);
...@@ -502,8 +493,6 @@ static int rt28xx_init(IN struct net_device *net_dev) ...@@ -502,8 +493,6 @@ static int rt28xx_init(IN struct net_device *net_dev)
// We should read EEPROM for all cases. rt2860b // We should read EEPROM for all cases. rt2860b
NICReadEEPROMParameters(pAd, mac); NICReadEEPROMParameters(pAd, mac);
#ifdef CONFIG_STA_SUPPORT
#endif // CONFIG_STA_SUPPORT //
printk("3. Phy Mode = %d\n", pAd->CommonCfg.PhyMode); printk("3. Phy Mode = %d\n", pAd->CommonCfg.PhyMode);
...@@ -643,9 +632,6 @@ int rt28xx_open(IN PNET_DEV dev) ...@@ -643,9 +632,6 @@ int rt28xx_open(IN PNET_DEV dev)
return -1; return -1;
} }
#ifdef CONFIG_STA_SUPPORT
#endif // CONFIG_STA_SUPPORT //
// Init // Init
pObj = (POS_COOKIE)pAd->OS_Cookie; pObj = (POS_COOKIE)pAd->OS_Cookie;
...@@ -664,13 +650,11 @@ int rt28xx_open(IN PNET_DEV dev) ...@@ -664,13 +650,11 @@ int rt28xx_open(IN PNET_DEV dev)
if (rt28xx_init(net_dev) == FALSE) if (rt28xx_init(net_dev) == FALSE)
goto err; goto err;
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
NdisZeroMemory(pAd->StaCfg.dev_name, 16); NdisZeroMemory(pAd->StaCfg.dev_name, 16);
NdisMoveMemory(pAd->StaCfg.dev_name, net_dev->name, strlen(net_dev->name)); NdisMoveMemory(pAd->StaCfg.dev_name, net_dev->name, strlen(net_dev->name));
} }
#endif // CONFIG_STA_SUPPORT //
// Set up the Mac address // Set up the Mac address
NdisMoveMemory(net_dev->dev_addr, (void *) pAd->CurrentAddress, 6); NdisMoveMemory(net_dev->dev_addr, (void *) pAd->CurrentAddress, 6);
...@@ -682,7 +666,6 @@ int rt28xx_open(IN PNET_DEV dev) ...@@ -682,7 +666,6 @@ int rt28xx_open(IN PNET_DEV dev)
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
#ifdef WPA_SUPPLICANT_SUPPORT #ifdef WPA_SUPPLICANT_SUPPORT
...@@ -698,7 +681,6 @@ int rt28xx_open(IN PNET_DEV dev) ...@@ -698,7 +681,6 @@ int rt28xx_open(IN PNET_DEV dev)
#endif // WPA_SUPPLICANT_SUPPORT // #endif // WPA_SUPPLICANT_SUPPORT //
} }
#endif // CONFIG_STA_SUPPORT //
// Enable Interrupt // Enable Interrupt
RT28XX_IRQ_ENABLE(pAd); RT28XX_IRQ_ENABLE(pAd);
...@@ -726,9 +708,6 @@ int rt28xx_open(IN PNET_DEV dev) ...@@ -726,9 +708,6 @@ int rt28xx_open(IN PNET_DEV dev)
} }
#ifdef CONFIG_STA_SUPPORT
#endif // CONFIG_STA_SUPPORT //
return (retval); return (retval);
err: err:
...@@ -762,14 +741,12 @@ static NDIS_STATUS rt_ieee80211_if_setup(struct net_device *dev, PRTMP_ADAPTER p ...@@ -762,14 +741,12 @@ static NDIS_STATUS rt_ieee80211_if_setup(struct net_device *dev, PRTMP_ADAPTER p
//ether_setup(dev); //ether_setup(dev);
// dev->set_multicast_list = ieee80211_set_multicast_list; // dev->set_multicast_list = ieee80211_set_multicast_list;
// dev->change_mtu = ieee80211_change_mtu; // dev->change_mtu = ieee80211_change_mtu;
#ifdef CONFIG_STA_SUPPORT
#if WIRELESS_EXT >= 12 #if WIRELESS_EXT >= 12
if (pAd->OpMode == OPMODE_STA) if (pAd->OpMode == OPMODE_STA)
{ {
dev->wireless_handlers = &rt28xx_iw_handler_def; dev->wireless_handlers = &rt28xx_iw_handler_def;
} }
#endif //WIRELESS_EXT >= 12 #endif //WIRELESS_EXT >= 12
#endif // CONFIG_STA_SUPPORT //
#if WIRELESS_EXT < 21 #if WIRELESS_EXT < 21
dev->get_wireless_stats = rt28xx_get_wireless_stats; dev->get_wireless_stats = rt28xx_get_wireless_stats;
...@@ -840,9 +817,7 @@ INT __devinit rt28xx_probe( ...@@ -840,9 +817,7 @@ INT __devinit rt28xx_probe(
#endif // RT2870 // #endif // RT2870 //
#ifdef CONFIG_STA_SUPPORT
DBGPRINT(RT_DEBUG_TRACE, ("STA Driver version-%s\n", STA_DRIVER_VERSION)); DBGPRINT(RT_DEBUG_TRACE, ("STA Driver version-%s\n", STA_DRIVER_VERSION));
#endif // CONFIG_STA_SUPPORT //
// Check chipset vendor/product ID // Check chipset vendor/product ID
// if (RT28XXChipsetCheck(_dev_p) == FALSE) // if (RT28XXChipsetCheck(_dev_p) == FALSE)
...@@ -882,9 +857,7 @@ INT __devinit rt28xx_probe( ...@@ -882,9 +857,7 @@ INT __devinit rt28xx_probe(
RT28XXNetDevInit(_dev_p, net_dev, pAd); RT28XXNetDevInit(_dev_p, net_dev, pAd);
#ifdef CONFIG_STA_SUPPORT
pAd->StaCfg.OriDevType = net_dev->type; pAd->StaCfg.OriDevType = net_dev->type;
#endif // CONFIG_STA_SUPPORT //
// Find and assign a free interface name, raxx // Find and assign a free interface name, raxx
// RT28XXAvailRANameAssign(net_dev->name); // RT28XXAvailRANameAssign(net_dev->name);
...@@ -893,9 +866,7 @@ INT __devinit rt28xx_probe( ...@@ -893,9 +866,7 @@ INT __devinit rt28xx_probe(
if (RT28XXProbePostConfig(_dev_p, pAd, 0) == FALSE) if (RT28XXProbePostConfig(_dev_p, pAd, 0) == FALSE)
goto err_out_unmap; goto err_out_unmap;
#ifdef CONFIG_STA_SUPPORT
pAd->OpMode = OPMODE_STA; pAd->OpMode = OPMODE_STA;
#endif // CONFIG_STA_SUPPORT //
// sample move // sample move
if (rt_ieee80211_if_setup(net_dev, pAd) != NDIS_STATUS_SUCCESS) if (rt_ieee80211_if_setup(net_dev, pAd) != NDIS_STATUS_SUCCESS)
...@@ -954,7 +925,6 @@ int rt28xx_packet_xmit(struct sk_buff *skb) ...@@ -954,7 +925,6 @@ int rt28xx_packet_xmit(struct sk_buff *skb)
int status = 0; int status = 0;
PNDIS_PACKET pPacket = (PNDIS_PACKET) skb; PNDIS_PACKET pPacket = (PNDIS_PACKET) skb;
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
// Drop send request since we are in monitor mode // Drop send request since we are in monitor mode
...@@ -964,7 +934,6 @@ int rt28xx_packet_xmit(struct sk_buff *skb) ...@@ -964,7 +934,6 @@ int rt28xx_packet_xmit(struct sk_buff *skb)
goto done; goto done;
} }
} }
#endif // CONFIG_STA_SUPPORT //
// EapolStart size is 18 // EapolStart size is 18
if (skb->len < 14) if (skb->len < 14)
...@@ -983,17 +952,12 @@ int rt28xx_packet_xmit(struct sk_buff *skb) ...@@ -983,17 +952,12 @@ int rt28xx_packet_xmit(struct sk_buff *skb)
} }
#endif #endif
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
STASendPackets((NDIS_HANDLE)pAd, (PPNDIS_PACKET) &pPacket, 1); STASendPackets((NDIS_HANDLE)pAd, (PPNDIS_PACKET) &pPacket, 1);
} }
#endif // CONFIG_STA_SUPPORT //
status = 0; status = 0;
done: done:
...@@ -1061,10 +1025,8 @@ struct iw_statistics *rt28xx_get_wireless_stats( ...@@ -1061,10 +1025,8 @@ struct iw_statistics *rt28xx_get_wireless_stats(
if(pAd->iw_stats.qual.qual > 100) if(pAd->iw_stats.qual.qual > 100)
pAd->iw_stats.qual.qual = 100; pAd->iw_stats.qual.qual = 100;
#ifdef CONFIG_STA_SUPPORT
if (pAd->OpMode == OPMODE_STA) if (pAd->OpMode == OPMODE_STA)
pAd->iw_stats.qual.level = RTMPMaxRssi(pAd, pAd->StaCfg.RssiSample.LastRssi0, pAd->StaCfg.RssiSample.LastRssi1, pAd->StaCfg.RssiSample.LastRssi2); pAd->iw_stats.qual.level = RTMPMaxRssi(pAd, pAd->StaCfg.RssiSample.LastRssi0, pAd->StaCfg.RssiSample.LastRssi1, pAd->StaCfg.RssiSample.LastRssi2);
#endif // CONFIG_STA_SUPPORT //
pAd->iw_stats.qual.noise = pAd->BbpWriteLatch[66]; // noise level (dBm) pAd->iw_stats.qual.noise = pAd->BbpWriteLatch[66]; // noise level (dBm)
...@@ -1116,13 +1078,10 @@ INT rt28xx_ioctl( ...@@ -1116,13 +1078,10 @@ INT rt28xx_ioctl(
return -ENETDOWN; return -ENETDOWN;
} }
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
ret = rt28xx_sta_ioctl(net_dev, rq, cmd); ret = rt28xx_sta_ioctl(net_dev, rq, cmd);
} }
#endif // CONFIG_STA_SUPPORT //
return ret; return ret;
} }
......
...@@ -756,8 +756,6 @@ static void rtmp_read_key_parms_from_file(IN PRTMP_ADAPTER pAd, char *tmpbuf, c ...@@ -756,8 +756,6 @@ static void rtmp_read_key_parms_from_file(IN PRTMP_ADAPTER pAd, char *tmpbuf, c
//DefaultKeyID //DefaultKeyID
if(RTMPGetKeyParameter("DefaultKeyID", tmpbuf, 25, buffer)) if(RTMPGetKeyParameter("DefaultKeyID", tmpbuf, 25, buffer))
{ {
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
KeyIdx = simple_strtol(tmpbuf, 0, 10); KeyIdx = simple_strtol(tmpbuf, 0, 10);
...@@ -768,7 +766,6 @@ static void rtmp_read_key_parms_from_file(IN PRTMP_ADAPTER pAd, char *tmpbuf, c ...@@ -768,7 +766,6 @@ static void rtmp_read_key_parms_from_file(IN PRTMP_ADAPTER pAd, char *tmpbuf, c
DBGPRINT(RT_DEBUG_TRACE, ("DefaultKeyID(0~3)=%d\n", pAd->StaCfg.DefaultKeyId)); DBGPRINT(RT_DEBUG_TRACE, ("DefaultKeyID(0~3)=%d\n", pAd->StaCfg.DefaultKeyId));
} }
#endif // CONFIG_STA_SUPPORT //
} }
...@@ -783,7 +780,6 @@ static void rtmp_read_key_parms_from_file(IN PRTMP_ADAPTER pAd, char *tmpbuf, c ...@@ -783,7 +780,6 @@ static void rtmp_read_key_parms_from_file(IN PRTMP_ADAPTER pAd, char *tmpbuf, c
KeyType[i] = simple_strtol(macptr, 0, 10); KeyType[i] = simple_strtol(macptr, 0, 10);
} }
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
sprintf(tok_str, "Key%dStr", idx + 1); sprintf(tok_str, "Key%dStr", idx + 1);
...@@ -792,13 +788,10 @@ static void rtmp_read_key_parms_from_file(IN PRTMP_ADAPTER pAd, char *tmpbuf, c ...@@ -792,13 +788,10 @@ static void rtmp_read_key_parms_from_file(IN PRTMP_ADAPTER pAd, char *tmpbuf, c
rtmp_parse_key_buffer_from_file(pAd, tmpbuf, KeyType[BSS0], BSS0, idx); rtmp_parse_key_buffer_from_file(pAd, tmpbuf, KeyType[BSS0], BSS0, idx);
} }
} }
#endif // CONFIG_STA_SUPPORT //
} }
} }
} }
#ifdef CONFIG_STA_SUPPORT
static void rtmp_read_sta_wmm_parms_from_file(IN PRTMP_ADAPTER pAd, char *tmpbuf, char *buffer) static void rtmp_read_sta_wmm_parms_from_file(IN PRTMP_ADAPTER pAd, char *tmpbuf, char *buffer)
{ {
PUCHAR macptr; PUCHAR macptr;
...@@ -865,8 +858,6 @@ static void rtmp_read_sta_wmm_parms_from_file(IN PRTMP_ADAPTER pAd, char *tmpbu ...@@ -865,8 +858,6 @@ static void rtmp_read_sta_wmm_parms_from_file(IN PRTMP_ADAPTER pAd, char *tmpbu
} }
} }
#endif // CONFIG_STA_SUPPORT //
NDIS_STATUS RTMPReadParametersHook( NDIS_STATUS RTMPReadParametersHook(
IN PRTMP_ADAPTER pAd) IN PRTMP_ADAPTER pAd)
...@@ -879,10 +870,7 @@ NDIS_STATUS RTMPReadParametersHook( ...@@ -879,10 +870,7 @@ NDIS_STATUS RTMPReadParametersHook(
CHAR *tmpbuf; CHAR *tmpbuf;
ULONG RtsThresh; ULONG RtsThresh;
ULONG FragThresh; ULONG FragThresh;
#ifdef CONFIG_STA_SUPPORT
UCHAR keyMaterial[40]; UCHAR keyMaterial[40];
#endif // CONFIG_STA_SUPPORT //
PUCHAR macptr; PUCHAR macptr;
INT i = 0; INT i = 0;
...@@ -898,10 +886,8 @@ NDIS_STATUS RTMPReadParametersHook( ...@@ -898,10 +886,8 @@ NDIS_STATUS RTMPReadParametersHook(
return NDIS_STATUS_FAILURE; return NDIS_STATUS_FAILURE;
} }
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
src = STA_PROFILE_PATH; src = STA_PROFILE_PATH;
#endif // CONFIG_STA_SUPPORT //
// Save uid and gid used for filesystem access. // Save uid and gid used for filesystem access.
// Set user and group to 0 (root) // Set user and group to 0 (root)
...@@ -975,8 +961,6 @@ NDIS_STATUS RTMPReadParametersHook( ...@@ -975,8 +961,6 @@ NDIS_STATUS RTMPReadParametersHook(
pAd->CommonCfg.CountryCode[2] = ' '; pAd->CommonCfg.CountryCode[2] = ' ';
} }
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
//SSID //SSID
...@@ -997,9 +981,7 @@ NDIS_STATUS RTMPReadParametersHook( ...@@ -997,9 +981,7 @@ NDIS_STATUS RTMPReadParametersHook(
} }
} }
} }
#endif // CONFIG_STA_SUPPORT //
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
//NetworkType //NetworkType
...@@ -1015,7 +997,7 @@ NDIS_STATUS RTMPReadParametersHook( ...@@ -1015,7 +997,7 @@ NDIS_STATUS RTMPReadParametersHook(
DBGPRINT(RT_DEBUG_TRACE, ("%s::(NetworkType=%d)\n", __func__, pAd->StaCfg.BssType)); DBGPRINT(RT_DEBUG_TRACE, ("%s::(NetworkType=%d)\n", __func__, pAd->StaCfg.BssType));
} }
} }
#endif // CONFIG_STA_SUPPORT //
//Channel //Channel
if(RTMPGetKeyParameter("Channel", tmpbuf, 10, buffer)) if(RTMPGetKeyParameter("Channel", tmpbuf, 10, buffer))
{ {
...@@ -1055,10 +1037,10 @@ NDIS_STATUS RTMPReadParametersHook( ...@@ -1055,10 +1037,10 @@ NDIS_STATUS RTMPReadParametersHook(
if(RTMPGetKeyParameter("TxPower", tmpbuf, 10, buffer)) if(RTMPGetKeyParameter("TxPower", tmpbuf, 10, buffer))
{ {
pAd->CommonCfg.TxPowerPercentage = (ULONG) simple_strtol(tmpbuf, 0, 10); pAd->CommonCfg.TxPowerPercentage = (ULONG) simple_strtol(tmpbuf, 0, 10);
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
pAd->CommonCfg.TxPowerDefault = pAd->CommonCfg.TxPowerPercentage; pAd->CommonCfg.TxPowerDefault = pAd->CommonCfg.TxPowerPercentage;
#endif // CONFIG_STA_SUPPORT //
DBGPRINT(RT_DEBUG_TRACE, ("TxPower=%ld\n", pAd->CommonCfg.TxPowerPercentage)); DBGPRINT(RT_DEBUG_TRACE, ("TxPower=%ld\n", pAd->CommonCfg.TxPowerPercentage));
} }
//BGProtection //BGProtection
...@@ -1179,11 +1161,8 @@ NDIS_STATUS RTMPReadParametersHook( ...@@ -1179,11 +1161,8 @@ NDIS_STATUS RTMPReadParametersHook(
#endif // AGGREGATION_SUPPORT // #endif // AGGREGATION_SUPPORT //
// WmmCapable // WmmCapable
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 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);
#endif // CONFIG_STA_SUPPORT //
//ShortSlot //ShortSlot
if(RTMPGetKeyParameter("ShortSlot", tmpbuf, 10, buffer)) if(RTMPGetKeyParameter("ShortSlot", tmpbuf, 10, buffer))
...@@ -1286,7 +1265,6 @@ NDIS_STATUS RTMPReadParametersHook( ...@@ -1286,7 +1265,6 @@ NDIS_STATUS RTMPReadParametersHook(
//AuthMode //AuthMode
if(RTMPGetKeyParameter("AuthMode", tmpbuf, 128, buffer)) if(RTMPGetKeyParameter("AuthMode", tmpbuf, 128, buffer))
{ {
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
if ((strcmp(tmpbuf, "WEPAUTO") == 0) || (strcmp(tmpbuf, "wepauto") == 0)) if ((strcmp(tmpbuf, "WEPAUTO") == 0) || (strcmp(tmpbuf, "wepauto") == 0))
...@@ -1312,13 +1290,10 @@ NDIS_STATUS RTMPReadParametersHook( ...@@ -1312,13 +1290,10 @@ NDIS_STATUS RTMPReadParametersHook(
DBGPRINT(RT_DEBUG_TRACE, ("%s::(EncrypType=%d)\n", __func__, pAd->StaCfg.WepStatus)); DBGPRINT(RT_DEBUG_TRACE, ("%s::(EncrypType=%d)\n", __func__, pAd->StaCfg.WepStatus));
} }
#endif // CONFIG_STA_SUPPORT //
} }
//EncrypType //EncrypType
if(RTMPGetKeyParameter("EncrypType", tmpbuf, 128, buffer)) if(RTMPGetKeyParameter("EncrypType", tmpbuf, 128, buffer))
{ {
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
if ((strcmp(tmpbuf, "WEP") == 0) || (strcmp(tmpbuf, "wep") == 0)) if ((strcmp(tmpbuf, "WEP") == 0) || (strcmp(tmpbuf, "wep") == 0))
...@@ -1339,12 +1314,8 @@ NDIS_STATUS RTMPReadParametersHook( ...@@ -1339,12 +1314,8 @@ NDIS_STATUS RTMPReadParametersHook(
//RTMPMakeRSNIE(pAd, pAd->StaCfg.AuthMode, pAd->StaCfg.WepStatus, 0); //RTMPMakeRSNIE(pAd, pAd->StaCfg.AuthMode, pAd->StaCfg.WepStatus, 0);
DBGPRINT(RT_DEBUG_TRACE, ("%s::(EncrypType=%d)\n", __func__, pAd->StaCfg.WepStatus)); DBGPRINT(RT_DEBUG_TRACE, ("%s::(EncrypType=%d)\n", __func__, pAd->StaCfg.WepStatus));
} }
#endif // CONFIG_STA_SUPPORT //
} }
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
if(RTMPGetCriticalParameter("WPAPSK", tmpbuf, 512, buffer)) if(RTMPGetCriticalParameter("WPAPSK", tmpbuf, 512, buffer))
...@@ -1409,7 +1380,6 @@ NDIS_STATUS RTMPReadParametersHook( ...@@ -1409,7 +1380,6 @@ NDIS_STATUS RTMPReadParametersHook(
} }
} }
} }
#endif // CONFIG_STA_SUPPORT //
//DefaultKeyID, KeyType, KeyStr //DefaultKeyID, KeyType, KeyStr
rtmp_read_key_parms_from_file(pAd, tmpbuf, buffer); rtmp_read_key_parms_from_file(pAd, tmpbuf, buffer);
...@@ -1435,7 +1405,6 @@ NDIS_STATUS RTMPReadParametersHook( ...@@ -1435,7 +1405,6 @@ NDIS_STATUS RTMPReadParametersHook(
HTParametersHook(pAd, tmpbuf, buffer); HTParametersHook(pAd, tmpbuf, buffer);
#endif // DOT11_N_SUPPORT // #endif // DOT11_N_SUPPORT //
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
//PSMode //PSMode
...@@ -1522,11 +1491,8 @@ NDIS_STATUS RTMPReadParametersHook( ...@@ -1522,11 +1491,8 @@ NDIS_STATUS RTMPReadParametersHook(
DBGPRINT(RT_DEBUG_TRACE, ("TGnWifiTest=%d\n", pAd->StaCfg.bTGnWifiTest)); DBGPRINT(RT_DEBUG_TRACE, ("TGnWifiTest=%d\n", pAd->StaCfg.bTGnWifiTest));
} }
} }
#endif // CONFIG_STA_SUPPORT //
#ifdef RT30xx #ifdef RT30xx
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
if(RTMPGetKeyParameter("AntDiversity", tmpbuf, 10, buffer)) if(RTMPGetKeyParameter("AntDiversity", tmpbuf, 10, buffer))
...@@ -1542,7 +1508,6 @@ NDIS_STATUS RTMPReadParametersHook( ...@@ -1542,7 +1508,6 @@ NDIS_STATUS RTMPReadParametersHook(
} }
} }
} }
#endif // CONFIG_STA_SUPPORT //
#endif // RT30xx // #endif // RT30xx //
} }
} }
...@@ -1814,7 +1779,6 @@ static void HTParametersHook( ...@@ -1814,7 +1779,6 @@ static void HTParametersHook(
{ {
UCHAR fix_tx_mode; UCHAR fix_tx_mode;
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
fix_tx_mode = FIXED_TXMODE_HT; fix_tx_mode = FIXED_TXMODE_HT;
...@@ -1847,7 +1811,6 @@ static void HTParametersHook( ...@@ -1847,7 +1811,6 @@ static void HTParametersHook(
DBGPRINT(RT_DEBUG_TRACE, ("Fixed Tx Mode = %d\n", fix_tx_mode)); DBGPRINT(RT_DEBUG_TRACE, ("Fixed Tx Mode = %d\n", fix_tx_mode));
} }
#endif // CONFIG_STA_SUPPORT //
} }
...@@ -1892,8 +1855,6 @@ static void HTParametersHook( ...@@ -1892,8 +1855,6 @@ static void HTParametersHook(
// MSC // MSC
if (RTMPGetKeyParameter("HT_MCS", pValueStr, 50, pInput)) if (RTMPGetKeyParameter("HT_MCS", pValueStr, 50, pInput))
{ {
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd) IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{ {
Value = simple_strtol(pValueStr, 0, 10); Value = simple_strtol(pValueStr, 0, 10);
...@@ -1912,7 +1873,6 @@ static void HTParametersHook( ...@@ -1912,7 +1873,6 @@ static void HTParametersHook(
DBGPRINT(RT_DEBUG_TRACE, ("HT: MCS = AUTO\n")); DBGPRINT(RT_DEBUG_TRACE, ("HT: MCS = AUTO\n"));
} }
} }
#endif // CONFIG_STA_SUPPORT //
} }
// STBC // STBC
......
This diff is collapsed.
...@@ -1392,7 +1392,6 @@ ...@@ -1392,7 +1392,6 @@
// End - WIRELESS EVENTS definition // End - WIRELESS EVENTS definition
#ifdef CONFIG_STA_SUPPORT
// definition for DLS, kathy // definition for DLS, kathy
#define MAX_NUM_OF_INIT_DLS_ENTRY 1 #define MAX_NUM_OF_INIT_DLS_ENTRY 1
#define MAX_NUM_OF_DLS_ENTRY MAX_NUMBER_OF_DLS_ENTRY #define MAX_NUM_OF_DLS_ENTRY MAX_NUMBER_OF_DLS_ENTRY
...@@ -1410,7 +1409,6 @@ ...@@ -1410,7 +1409,6 @@
/* Maximum size of the ESSID and pAd->nickname strings */ /* Maximum size of the ESSID and pAd->nickname strings */
#define IW_ESSID_MAX_SIZE 32 #define IW_ESSID_MAX_SIZE 32
#endif #endif
#endif // CONFIG_STA_SUPPORT //
#ifdef MCAST_RATE_SPECIFIC #ifdef MCAST_RATE_SPECIFIC
#define MCAST_DISABLE 0 #define MCAST_DISABLE 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment