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

Staging: rt3070: remove DOT11_N_SUPPORT ifdefs

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent fa46aa71
......@@ -718,7 +718,6 @@ VOID RT2870_WatchDog(IN RTMP_ADAPTER *pAd)
}
}
#ifdef DOT11_N_SUPPORT
// For Sigma debug, dump the ba_reordering sequence.
if((needDumpSeq == TRUE) && (pAd->CommonCfg.bDisableReordering == 0))
{
......@@ -746,7 +745,6 @@ VOID RT2870_WatchDog(IN RTMP_ADAPTER *pAd)
NdisReleaseSpinLock(&pBAEntry->RxReRingLock);
}
}
#endif // DOT11_N_SUPPORT //
}
/*
......
......@@ -4,7 +4,6 @@ obj-$(CONFIG_RT3070) += rt3070sta.o
EXTRA_CFLAGS += -DLINUX -DAGGREGATION_SUPPORT -DPIGGYBACK_SUPPORT -DWMM_SUPPORT
EXTRA_CFLAGS += -DRT2870 -DRT30xx -DRT3070
EXTRA_CFLAGS += -DDBG
EXTRA_CFLAGS += -DDOT11_N_SUPPORT
rt3070sta-objs := \
common/md5.o \
......
......@@ -419,10 +419,8 @@ VOID ApLogEvent(
IN PUCHAR pAddr,
IN USHORT Event);
#ifdef DOT11_N_SUPPORT
VOID APUpdateOperationMode(
IN PRTMP_ADAPTER pAd);
#endif // DOT11_N_SUPPORT //
VOID APUpdateCapabilityAndErpIe(
IN PRTMP_ADAPTER pAd);
......
......@@ -957,16 +957,12 @@ static inline VOID ChBandCheck(
switch(PhyMode)
{
case PHY_11A:
#ifdef DOT11_N_SUPPORT
case PHY_11AN_MIXED:
#endif // DOT11_N_SUPPORT //
*pChType = BAND_5G;
break;
case PHY_11ABG_MIXED:
#ifdef DOT11_N_SUPPORT
case PHY_11AGN_MIXED:
case PHY_11ABGN_MIXED:
#endif // DOT11_N_SUPPORT //
*pChType = BAND_BOTH;
break;
......@@ -1114,8 +1110,6 @@ static inline VOID BuildBeaconChList(
}
}
#ifdef DOT11_N_SUPPORT
static inline BOOLEAN IsValidChannel(
IN PRTMP_ADAPTER pAd,
IN UCHAR channel)
......@@ -1230,8 +1224,6 @@ static inline VOID N_SetCenCh(
pAd->CommonCfg.CentralChannel = pAd->CommonCfg.Channel;
}
}
#endif // DOT11_N_SUPPORT //
static inline UINT8 GetCuntryMaxTxPwr(
IN PRTMP_ADAPTER pAd,
......
......@@ -237,7 +237,6 @@ NDIS_STATUS NICInitTransmit(
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
for(acidx=0; acidx<4; acidx++)
{
#if 1 //def DOT11_N_SUPPORT
PHT_TX_CONTEXT pHTTXContext = &(pAd->TxContext[acidx]);
NdisZeroMemory(pHTTXContext, sizeof(HT_TX_CONTEXT));
......@@ -260,7 +259,6 @@ NDIS_STATUS NICInitTransmit(
pHTTXContext->BulkOutPipeId = acidx;
pHTTXContext->bRingEmpty = TRUE;
pHTTXContext->bCopySavePad = FALSE;
#endif // DOT11_N_SUPPORT //
pAd->BulkOutPending[acidx] = FALSE;
}
......
......@@ -73,13 +73,11 @@ VOID ActionStateMachineInit(
StateMachineSetAction(S, ACT_IDLE, MT2_PEER_DLS_CATE, (STATE_MACHINE_FUNC)ReservedAction);
#ifdef DOT11_N_SUPPORT
StateMachineSetAction(S, ACT_IDLE, MT2_PEER_BA_CATE, (STATE_MACHINE_FUNC)PeerBAAction);
StateMachineSetAction(S, ACT_IDLE, MT2_PEER_HT_CATE, (STATE_MACHINE_FUNC)PeerHTAction);
StateMachineSetAction(S, ACT_IDLE, MT2_MLME_ADD_BA_CATE, (STATE_MACHINE_FUNC)MlmeADDBAAction);
StateMachineSetAction(S, ACT_IDLE, MT2_MLME_ORI_DELBA_CATE, (STATE_MACHINE_FUNC)MlmeDELBAAction);
StateMachineSetAction(S, ACT_IDLE, MT2_MLME_REC_DELBA_CATE, (STATE_MACHINE_FUNC)MlmeDELBAAction);
#endif // DOT11_N_SUPPORT //
StateMachineSetAction(S, ACT_IDLE, MT2_PEER_PUBLIC_CATE, (STATE_MACHINE_FUNC)PeerPublicAction);
StateMachineSetAction(S, ACT_IDLE, MT2_PEER_RM_CATE, (STATE_MACHINE_FUNC)PeerRMAction);
......@@ -89,7 +87,6 @@ VOID ActionStateMachineInit(
StateMachineSetAction(S, ACT_IDLE, MT2_ACT_INVALID, (STATE_MACHINE_FUNC)MlmeInvalidAction);
}
#ifdef DOT11_N_SUPPORT
VOID MlmeADDBAAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
......@@ -256,7 +253,6 @@ VOID MlmeDELBAAction(
DBGPRINT(RT_DEBUG_TRACE, ("BA - MlmeDELBAAction() . 3 DELBA sent. Initiator(%d)\n", pInfo->Initiator));
}
}
#endif // DOT11_N_SUPPORT //
VOID MlmeQOSAction(
IN PRTMP_ADAPTER pAd,
......@@ -284,7 +280,6 @@ VOID PeerQOSAction(
{
}
#ifdef DOT11_N_SUPPORT
VOID PeerBAAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
......@@ -304,7 +299,6 @@ VOID PeerBAAction(
break;
}
}
#endif // DOT11_N_SUPPORT //
VOID PeerPublicAction(
IN PRTMP_ADAPTER pAd,
......@@ -339,7 +333,6 @@ VOID PeerRMAction(
return;
}
#ifdef DOT11_N_SUPPORT
static VOID respond_ht_information_exchange_action(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
......@@ -560,7 +553,6 @@ VOID SendRefreshBAR(
}
}
}
#endif // DOT11_N_SUPPORT //
VOID ActHeaderInit(
IN PRTMP_ADAPTER pAd,
......
......@@ -26,8 +26,6 @@
*/
#ifdef DOT11_N_SUPPORT
#include "../rt_config.h"
......@@ -1781,6 +1779,3 @@ VOID Indicate_AMPDU_Packet(
}
}
}
#endif // DOT11_N_SUPPORT //
......@@ -410,9 +410,7 @@ NDIS_STATUS MlmeHardTransmitMgmtRing(
{
// Fixed W52 with Activity scan issue in ABG_MIXED and ABGN_MIXED mode.
if (pAd->CommonCfg.PhyMode == PHY_11ABG_MIXED
#ifdef DOT11_N_SUPPORT
|| pAd->CommonCfg.PhyMode == PHY_11ABGN_MIXED
#endif // DOT11_N_SUPPORT //
)
{
if (pAd->LatchRfRegs.Channel > 14)
......@@ -596,9 +594,7 @@ static UCHAR TxPktClassification(
UCHAR TxFrameType = TX_UNKOWN_FRAME;
UCHAR Wcid;
MAC_TABLE_ENTRY *pMacEntry = NULL;
#ifdef DOT11_N_SUPPORT
BOOLEAN bHTRate = FALSE;
#endif // DOT11_N_SUPPORT //
Wcid = RTMP_GET_PACKET_WCID(pPacket);
if (Wcid == MCAST_WCID)
......@@ -612,7 +608,6 @@ static UCHAR TxPktClassification(
{ // It's a specific packet need to force low rate, i.e., bDHCPFrame, bEAPOLFrame, bWAIFrame
TxFrameType = TX_LEGACY_FRAME;
}
#ifdef DOT11_N_SUPPORT
else if (IS_HT_RATE(pMacEntry))
{ // it's a 11n capable packet
......@@ -632,7 +627,6 @@ static UCHAR TxPktClassification(
else
TxFrameType = TX_LEGACY_FRAME;
}
#endif // DOT11_N_SUPPORT //
else
{ // it's a legacy b/g packet.
if ((CLIENT_STATUS_TEST_FLAG(pMacEntry, fCLIENT_STATUS_AGGREGATION_CAPABLE) && pAd->CommonCfg.bAggregationCapable) &&
......@@ -737,7 +731,7 @@ BOOLEAN RTMP_FillTxBlkInfo(
((pAd->OpMode == OPMODE_AP) && (pMacEntry->MaxHTPhyMode.field.MODE == MODE_CCK) && (pMacEntry->MaxHTPhyMode.field.MCS == RATE_1)))
{ // Specific packet, i.e., bDHCPFrame, bEAPOLFrame, bWAIFrame, need force low rate.
pTxBlk->pTransmit = &pAd->MacTab.Content[MCAST_WCID].HTPhyMode;
#ifdef DOT11_N_SUPPORT
// Modify the WMM bit for ICV issue. If we have a packet with EOSP field need to set as 1, how to handle it???
if (IS_HT_STA(pTxBlk->pMacEntry) &&
(CLIENT_STATUS_TEST_FLAG(pMacEntry, fCLIENT_STATUS_RALINK_CHIPSET)) &&
......@@ -746,16 +740,13 @@ BOOLEAN RTMP_FillTxBlkInfo(
TX_BLK_CLEAR_FLAG(pTxBlk, fTX_bWMM);
TX_BLK_SET_FLAG(pTxBlk, fTX_bForceNonQoS);
}
#endif // DOT11_N_SUPPORT //
}
#ifdef DOT11_N_SUPPORT
if ( (IS_HT_RATE(pMacEntry) == FALSE) &&
(CLIENT_STATUS_TEST_FLAG(pMacEntry, fCLIENT_STATUS_PIGGYBACK_CAPABLE)))
{ // Currently piggy-back only support when peer is operate in b/g mode.
TX_BLK_SET_FLAG(pTxBlk, fTX_bPiggyBack);
}
#endif // DOT11_N_SUPPORT //
if (RTMP_GET_PACKET_MOREDATA(pPacket))
{
......@@ -1133,7 +1124,6 @@ VOID RTMPWriteTxWI(
pTxWI->NSEQ = NSeq;
// John tune the performace with Intel Client in 20 MHz performance
#ifdef DOT11_N_SUPPORT
BASize = pAd->CommonCfg.TxBASize;
if( BASize >7 )
......@@ -1141,7 +1131,6 @@ VOID RTMPWriteTxWI(
pTxWI->BAWinSize = BASize;
pTxWI->ShortGI = pTransmit->field.ShortGI;
pTxWI->STBC = pTransmit->field.STBC;
#endif // DOT11_N_SUPPORT //
pTxWI->WirelessCliID = WCID;
pTxWI->MPDUtotalByteCount = Length;
......@@ -1154,7 +1143,6 @@ VOID RTMPWriteTxWI(
pTxWI->PHYMODE = pTransmit->field.MODE;
pTxWI->CFACK = CfAck;
#ifdef DOT11_N_SUPPORT
if (pMac)
{
if (pAd->CommonCfg.bMIMOPSEnable)
......@@ -1184,7 +1172,6 @@ VOID RTMPWriteTxWI(
pTxWI->MpduDensity = pMac->MpduDensity;
}
}
#endif // DOT11_N_SUPPORT //
pTxWI->PacketId = pTxWI->MCS;
NdisMoveMemory(pOutTxWI, &TxWI, sizeof(TXWI_STRUC));
......@@ -1198,10 +1185,7 @@ VOID RTMPWriteTxWI_Data(
{
HTTRANSMIT_SETTING *pTransmit;
PMAC_TABLE_ENTRY pMacEntry;
#ifdef DOT11_N_SUPPORT
UCHAR BASize;
#endif // DOT11_N_SUPPORT //
ASSERT(pTxWI);
......@@ -1227,7 +1211,6 @@ VOID RTMPWriteTxWI_Data(
// If CCK or OFDM, BW must be 20
pTxWI->BW = (pTransmit->field.MODE <= MODE_OFDM) ? (BW_20) : (pTransmit->field.BW);
#ifdef DOT11_N_SUPPORT
pTxWI->AMPDU = ((pTxBlk->TxFrameType == TX_AMPDU_FRAME) ? TRUE : FALSE);
// John tune the performace with Intel Client in 20 MHz performance
......@@ -1244,12 +1227,10 @@ VOID RTMPWriteTxWI_Data(
pTxWI->BAWinSize = BASize;
pTxWI->ShortGI = pTransmit->field.ShortGI;
pTxWI->STBC = pTransmit->field.STBC;
#endif // DOT11_N_SUPPORT //
pTxWI->MCS = pTransmit->field.MCS;
pTxWI->PHYMODE = pTransmit->field.MODE;
#ifdef DOT11_N_SUPPORT
if (pMacEntry)
{
if ((pMacEntry->MmpsMode == MMPS_DYNAMIC) && (pTransmit->field.MCS > 7))
......@@ -1276,7 +1257,6 @@ VOID RTMPWriteTxWI_Data(
pTxWI->MpduDensity = pMacEntry->MpduDensity;
}
}
#endif // DOT11_N_SUPPORT //
#ifdef DBG_DIAGNOSE
if (pTxBlk->QueIdx== 0)
......@@ -1324,7 +1304,6 @@ VOID RTMPWriteTxWI_Cache(
pTxWI->PacketId = pTransmit->field.MCS;
}
#ifdef DOT11_N_SUPPORT
pTxWI->AMPDU = ((pMacEntry->NoBADataCountDown == 0) ? TRUE: FALSE);
pTxWI->MIMOps = 0;
......@@ -1346,7 +1325,6 @@ VOID RTMPWriteTxWI_Cache(
}
}
}
#endif // DOT11_N_SUPPORT //
#ifdef DBG_DIAGNOSE
if (pTxBlk->QueIdx== 0)
......@@ -1461,12 +1439,10 @@ BOOLEAN PeerIsAggreOn(
if (pMacEntry != NULL && CLIENT_STATUS_TEST_FLAG(pMacEntry, AFlags))
{
#ifdef DOT11_N_SUPPORT
if (pMacEntry->HTPhyMode.field.MODE >= MODE_HTMIX)
{
return TRUE;
}
#endif // DOT11_N_SUPPORT //
#ifdef AGGREGATION_SUPPORT
if (TxRate >= RATE_6 && pAd->CommonCfg.bAggregationCapable && (!(OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_WMM_INUSED) && CLIENT_STATUS_TEST_FLAG(pMacEntry, fCLIENT_STATUS_WMM_CAPABLE))))
......@@ -1946,11 +1922,8 @@ BOOLEAN MacTableDeleteEntry(
// Delete this entry from ASIC on-chip WCID Table
RT28XX_STA_ENTRY_MAC_RESET(pAd, wcid);
#ifdef DOT11_N_SUPPORT
// free resources of BA
BASessionTearDownALL(pAd, pEntry->Aid);
#endif // DOT11_N_SUPPORT //
pPrevEntry = NULL;
pProbeEntry = pAd->MacTab.Hash[HashIdx];
......@@ -2004,9 +1977,7 @@ BOOLEAN MacTableDeleteEntry(
//Reset operating mode when no Sta.
if (pAd->MacTab.Size == 0)
{
#ifdef DOT11_N_SUPPORT
pAd->CommonCfg.AddHTInfo.AddHtInfo2.OperaionMode = 0;
#endif // DOT11_N_SUPPORT //
//AsicUpdateProtect(pAd, 0 /*pAd->CommonCfg.AddHTInfo.AddHtInfo2.OperaionMode*/, (ALLN_SETPROTECT), TRUE, 0 /*pAd->MacTab.fAnyStationNonGF*/);
RT28XX_UPDATE_PROTECT(pAd); // edit by johnli, fix "in_interrupt" error when call "MacTableDeleteEntry" in Rx tasklet
}
......@@ -2034,11 +2005,8 @@ VOID MacTableReset(
{
if (pAd->MacTab.Content[i].ValidAsCLI == TRUE)
{
#ifdef DOT11_N_SUPPORT
// free resources of BA
BASessionTearDownALL(pAd, i);
#endif // DOT11_N_SUPPORT //
pAd->MacTab.Content[i].ValidAsCLI = FALSE;
......@@ -2361,7 +2329,6 @@ VOID Indicate_Legacy_Packet(
STATS_INC_RX_PACKETS(pAd, FromWhichBSSID);
#ifdef RT2870
#ifdef DOT11_N_SUPPORT
if (pAd->CommonCfg.bDisableReordering == 0)
{
PBA_REC_ENTRY pBAEntry;
......@@ -2391,7 +2358,6 @@ VOID Indicate_Legacy_Packet(
}
}
}
#endif // DOT11_N_SUPPORT //
#endif // RT2870 //
wlan_802_11_to_802_3_packet(pAd, pRxBlk, Header802_3, FromWhichBSSID);
......@@ -2410,22 +2376,18 @@ VOID CmmRxnonRalinkFrameIndicate(
IN RX_BLK *pRxBlk,
IN UCHAR FromWhichBSSID)
{
#ifdef DOT11_N_SUPPORT
if (RX_BLK_TEST_FLAG(pRxBlk, fRX_AMPDU) && (pAd->CommonCfg.bDisableReordering == 0))
{
Indicate_AMPDU_Packet(pAd, pRxBlk, FromWhichBSSID);
}
else
#endif // DOT11_N_SUPPORT //
{
#ifdef DOT11_N_SUPPORT
if (RX_BLK_TEST_FLAG(pRxBlk, fRX_AMSDU))
{
// handle A-MSDU
Indicate_AMSDU_Packet(pAd, pRxBlk, FromWhichBSSID);
}
else
#endif // DOT11_N_SUPPORT //
{
Indicate_Legacy_Packet(pAd, pRxBlk, FromWhichBSSID);
}
......
......@@ -63,7 +63,6 @@ INT Show_FragThreshold_Proc(
IN PRTMP_ADAPTER pAd,
OUT PUCHAR pBuf);
#ifdef DOT11_N_SUPPORT
INT Show_HtBw_Proc(
IN PRTMP_ADAPTER pAd,
OUT PUCHAR pBuf);
......@@ -103,7 +102,6 @@ INT Show_HtAmsdu_Proc(
INT Show_HtAutoBa_Proc(
IN PRTMP_ADAPTER pAd,
OUT PUCHAR pBuf);
#endif // DOT11_N_SUPPORT //
INT Show_CountryRegion_Proc(
IN PRTMP_ADAPTER pAd,
......@@ -182,7 +180,6 @@ static struct {
{"BGProtection", Show_BGProtection_Proc},
{"RTSThreshold", Show_RTSThreshold_Proc},
{"FragThreshold", Show_FragThreshold_Proc},
#ifdef DOT11_N_SUPPORT
{"HtBw", Show_HtBw_Proc},
{"HtMcs", Show_HtMcs_Proc},
{"HtGi", Show_HtGi_Proc},
......@@ -193,7 +190,6 @@ static struct {
{"HtRdg", Show_HtRdg_Proc},
{"HtAmsdu", Show_HtAmsdu_Proc},
{"HtAutoBa", Show_HtAutoBa_Proc},
#endif // DOT11_N_SUPPORT //
{"CountryRegion", Show_CountryRegion_Proc},
{"CountryRegionABand", Show_CountryRegionABand_Proc},
{"CountryCode", Show_CountryCode_Proc},
......@@ -344,14 +340,12 @@ INT Set_WirelessMode_Proc(
{
INT MaxPhyMode = PHY_11G;
#ifdef DOT11_N_SUPPORT
MaxPhyMode = PHY_11N_5G;
#endif // DOT11_N_SUPPORT //
if (WirelessMode <= MaxPhyMode)
{
RTMPSetPhyMode(pAd, WirelessMode);
#ifdef DOT11_N_SUPPORT
if (WirelessMode >= PHY_11ABGN_MIXED)
{
pAd->CommonCfg.BACapability.field.AutoBA = TRUE;
......@@ -362,7 +356,7 @@ INT Set_WirelessMode_Proc(
pAd->CommonCfg.BACapability.field.AutoBA = FALSE;
pAd->CommonCfg.REGBACapability.field.AutoBA = FALSE;
}
#endif // DOT11_N_SUPPORT //
// Set AdhocMode rates
if (pAd->StaCfg.BssType == BSS_ADHOC)
{
......@@ -380,9 +374,7 @@ INT Set_WirelessMode_Proc(
// it is needed to set SSID to take effect
if (success == TRUE)
{
#ifdef DOT11_N_SUPPORT
SetCommonHT(pAd);
#endif // DOT11_N_SUPPORT //
DBGPRINT(RT_DEBUG_TRACE, ("Set_WirelessMode_Proc::(=%ld)\n", WirelessMode));
}
else
......@@ -419,7 +411,6 @@ INT Set_Channel_Proc(
if (MONITOR_ON(pAd))
{
#ifdef DOT11_N_SUPPORT
N_ChannelCheck(pAd);
if (pAd->CommonCfg.PhyMode >= PHY_11ABGN_MIXED &&
pAd->CommonCfg.RegTransmitSetting.field.BW == BW_40)
......@@ -431,7 +422,6 @@ INT Set_Channel_Proc(
pAd->CommonCfg.Channel, pAd->CommonCfg.CentralChannel));
}
else
#endif // DOT11_N_SUPPORT //
{
AsicSwitchChannel(pAd, pAd->CommonCfg.Channel, FALSE);
AsicLockChannel(pAd, pAd->CommonCfg.Channel);
......@@ -1177,12 +1167,10 @@ VOID RTMPSetPhyMode(
case PHY_11G:
case PHY_11BG_MIXED:
case PHY_11ABG_MIXED:
#ifdef DOT11_N_SUPPORT
case PHY_11N_2_4G:
case PHY_11ABGN_MIXED:
case PHY_11BGN_MIXED:
case PHY_11GN_MIXED:
#endif // DOT11_N_SUPPORT //
pAd->CommonCfg.SupRate[0] = 0x82; // 1 mbps, in units of 0.5 Mbps, basic rate
pAd->CommonCfg.SupRate[1] = 0x84; // 2 mbps, in units of 0.5 Mbps, basic rate
pAd->CommonCfg.SupRate[2] = 0x8B; // 5.5 mbps, in units of 0.5 Mbps, basic rate
......@@ -1212,11 +1200,9 @@ VOID RTMPSetPhyMode(
break;
case PHY_11A:
#ifdef DOT11_N_SUPPORT
case PHY_11AN_MIXED:
case PHY_11AGN_MIXED:
case PHY_11N_5G:
#endif // DOT11_N_SUPPORT //
pAd->CommonCfg.SupRate[0] = 0x8C; // 6 mbps, in units of 0.5 Mbps, basic rate
pAd->CommonCfg.SupRate[1] = 0x12; // 9 mbps, in units of 0.5 Mbps
pAd->CommonCfg.SupRate[2] = 0x98; // 12 mbps, in units of 0.5 Mbps, basic rate
......@@ -1246,8 +1232,6 @@ VOID RTMPSetPhyMode(
pAd->CommonCfg.BandState = UNKNOWN_BAND;
}
#ifdef DOT11_N_SUPPORT
/*
========================================================================
Routine Description:
......@@ -1626,7 +1610,6 @@ VOID RTMPUpdateHTIE(
DBGPRINT(RT_DEBUG_TRACE,("RTMPUpdateHTIE <== \n"));
}
#endif // DOT11_N_SUPPORT //
/*
========================================================================
......@@ -1907,9 +1890,7 @@ VOID RTMPIoctlGetMacTable(
COPY_MAC_ADDR(MacTab.Entry[MacTab.Num].Addr, &pAd->MacTab.Content[i].Addr);
MacTab.Entry[MacTab.Num].Aid = (UCHAR)pAd->MacTab.Content[i].Aid;
MacTab.Entry[MacTab.Num].Psm = pAd->MacTab.Content[i].PsMode;
#ifdef DOT11_N_SUPPORT
MacTab.Entry[MacTab.Num].MimoPs = pAd->MacTab.Content[i].MmpsMode;
#endif // DOT11_N_SUPPORT //
// Fill in RSSI per entry
MacTab.Entry[MacTab.Num].AvgRssi0 = pAd->MacTab.Content[i].RssiSample.AvgRssi0;
......@@ -1970,7 +1951,6 @@ VOID RTMPIoctlGetMacTable(
kfree(msg);
}
#ifdef DOT11_N_SUPPORT
INT Set_BASetup_Proc(
IN PRTMP_ADAPTER pAd,
IN PUCHAR arg)
......@@ -2662,10 +2642,7 @@ INT Set_HtMimoPs_Proc(
return TRUE;
}
#endif // DOT11_N_SUPPORT //
#ifdef DOT11_N_SUPPORT
INT SetCommonHT(
IN PRTMP_ADAPTER pAd)
{
......@@ -2687,7 +2664,6 @@ INT SetCommonHT(
return TRUE;
}
#endif // DOT11_N_SUPPORT //
INT Set_FixedTxMode_Proc(
IN PRTMP_ADAPTER pAd,
......@@ -2814,7 +2790,6 @@ INT Show_WirelessMode_Proc(
case PHY_11G:
sprintf(pBuf, "\t11G");
break;
#ifdef DOT11_N_SUPPORT
case PHY_11ABGN_MIXED:
sprintf(pBuf, "\t11A/B/G/N");
break;
......@@ -2836,7 +2811,6 @@ INT Show_WirelessMode_Proc(
case PHY_11N_5G:
sprintf(pBuf, "\t11N only with 5G");
break;
#endif // DOT11_N_SUPPORT //
default:
sprintf(pBuf, "\tUnknow Value(%d)", pAd->CommonCfg.PhyMode);
break;
......@@ -2930,7 +2904,6 @@ INT Show_FragThreshold_Proc(
return 0;
}
#ifdef DOT11_N_SUPPORT
INT Show_HtBw_Proc(
IN PRTMP_ADAPTER pAd,
OUT PUCHAR pBuf)
......@@ -3052,7 +3025,6 @@ INT Show_HtAutoBa_Proc(
sprintf(pBuf, "\t%s", pAd->CommonCfg.BACapability.field.AutoBA ? "TRUE":"FALSE");
return 0;
}
#endif // DOT11_N_SUPPORT //
INT Show_CountryRegion_Proc(
IN PRTMP_ADAPTER pAd,
......
......@@ -588,7 +588,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
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.
}
#ifdef DOT11_N_SUPPORT
// This HT IE is before IEEE draft set HT IE value.2006-09-28 by Jan.
// Other vendors had production before IE_HT_CAP value is assigned. To backward support those old-firmware AP,
......@@ -607,7 +606,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
*AddHtInfoLen = SIZE_ADD_HT_INFO_IE;
}
}
#endif // DOT11_N_SUPPORT //
else if (NdisEqualMemory(pEid->Octet, WPA_OUI, 4))
{
// Copy to pVIE which will report to microsoft bssid list.
......
......@@ -95,9 +95,7 @@ VOID BuildChannelList(
// if not 11a-only mode, channel list starts from 2.4Ghz band
if ((pAd->CommonCfg.PhyMode != PHY_11A)
#ifdef DOT11_N_SUPPORT
&& (pAd->CommonCfg.PhyMode != PHY_11AN_MIXED) && (pAd->CommonCfg.PhyMode != PHY_11N_5G)
#endif // DOT11_N_SUPPORT //
)
{
switch (pAd->CommonCfg.CountryRegion & 0x7f)
......@@ -146,10 +144,8 @@ VOID BuildChannelList(
}
if ((pAd->CommonCfg.PhyMode == PHY_11A) || (pAd->CommonCfg.PhyMode == PHY_11ABG_MIXED)
#ifdef DOT11_N_SUPPORT
|| (pAd->CommonCfg.PhyMode == PHY_11ABGN_MIXED) || (pAd->CommonCfg.PhyMode == PHY_11AN_MIXED)
|| (pAd->CommonCfg.PhyMode == PHY_11AGN_MIXED) || (pAd->CommonCfg.PhyMode == PHY_11N_5G)
#endif // DOT11_N_SUPPORT //
)
{
switch (pAd->CommonCfg.CountryRegionForABand & 0x7f)
......@@ -506,9 +502,7 @@ VOID ScanNextChannel(
else // must be SCAN_PASSIVE or SCAN_ACTIVE
{
if ((pAd->CommonCfg.PhyMode == PHY_11ABG_MIXED)
#ifdef DOT11_N_SUPPORT
|| (pAd->CommonCfg.PhyMode == PHY_11ABGN_MIXED) || (pAd->CommonCfg.PhyMode == PHY_11AGN_MIXED)
#endif // DOT11_N_SUPPORT //
)
{
if (pAd->MlmeAux.Channel > 14)
......@@ -567,7 +561,6 @@ VOID ScanNextChannel(
FrameLen += Tmp;
}
#ifdef DOT11_N_SUPPORT
if (pAd->CommonCfg.PhyMode >= PHY_11ABGN_MIXED)
{
ULONG Tmp;
......@@ -597,8 +590,6 @@ VOID ScanNextChannel(
}
FrameLen += Tmp;
}
#endif // DOT11_N_SUPPORT //
MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen);
MlmeFreeMemory(pAd, pOutBuffer);
......
This diff is collapsed.
......@@ -1580,13 +1580,11 @@ VOID NICReadEEPROMParameters(
if ((pAd->CommonCfg.PhyMode == PHY_11ABG_MIXED) ||
(pAd->CommonCfg.PhyMode == PHY_11A))
pAd->CommonCfg.PhyMode = PHY_11BG_MIXED;
#ifdef DOT11_N_SUPPORT
else if ((pAd->CommonCfg.PhyMode == PHY_11ABGN_MIXED) ||
(pAd->CommonCfg.PhyMode == PHY_11AN_MIXED) ||
(pAd->CommonCfg.PhyMode == PHY_11AGN_MIXED) ||
(pAd->CommonCfg.PhyMode == PHY_11N_5G))
pAd->CommonCfg.PhyMode = PHY_11BGN_MIXED;
#endif // DOT11_N_SUPPORT //
}
// Read TSSI reference and TSSI boundary for temperature compensation. This is ugly
......@@ -1677,9 +1675,7 @@ VOID NICReadEEPROMParameters(
TmpPhy = pAd->CommonCfg.PhyMode;
pAd->CommonCfg.PhyMode = 0xff;
RTMPSetPhyMode(pAd, TmpPhy);
#ifdef DOT11_N_SUPPORT
SetCommonHT(pAd);
#endif // DOT11_N_SUPPORT //
}
//
......@@ -2464,10 +2460,8 @@ VOID NICUpdateFifoStaCounters(
pEntry->DebugFIFOCount++;
#ifdef DOT11_N_SUPPORT
if (StaFifo.field.TxBF) // 3*3
pEntry->TxBFCount++;
#endif // DOT11_N_SUPPORT //
#ifdef UAPSD_AP_SUPPORT
UAPSD_SP_AUE_Handle(pAd, pEntry, StaFifo.field.TxSuccess);
......@@ -2481,19 +2475,15 @@ VOID NICUpdateFifoStaCounters(
if (pEntry->FIFOCount >= 1)
{
DBGPRINT(RT_DEBUG_TRACE, ("#"));
#ifdef DOT11_N_SUPPORT
pEntry->NoBADataCountDown = 64;
#endif // DOT11_N_SUPPORT //
if(pEntry->PsMode == PWR_ACTIVE)
{
#ifdef DOT11_N_SUPPORT
int tid;
for (tid=0; tid<NUM_OF_TID; tid++)
{
BAOriSessionTearDown(pAd, pEntry->Aid, tid, FALSE, FALSE);
}
#endif // DOT11_N_SUPPORT //
// Update the continuous transmission counter except PS mode
pEntry->ContinueTxFailCnt++;
......@@ -2511,7 +2501,6 @@ VOID NICUpdateFifoStaCounters(
}
else
{
#ifdef DOT11_N_SUPPORT
if ((pEntry->PsMode != PWR_SAVE) && (pEntry->NoBADataCountDown > 0))
{
pEntry->NoBADataCountDown--;
......@@ -2520,7 +2509,7 @@ VOID NICUpdateFifoStaCounters(
DBGPRINT(RT_DEBUG_TRACE, ("@\n"));
}
}
#endif // DOT11_N_SUPPORT //
pEntry->FIFOCount = 0;
pEntry->OneSecTxNoRetryOkCount++;
// update NoDataIdleCount when sucessful send packet to STA.
......@@ -3265,7 +3254,6 @@ VOID UserCfgInit(
NdisZeroMemory(&pAd->BeaconTxWI, sizeof(pAd->BeaconTxWI));
#ifdef DOT11_N_SUPPORT
NdisZeroMemory(&pAd->CommonCfg.HtCapability, sizeof(pAd->CommonCfg.HtCapability));
pAd->HTCEnable = FALSE;
pAd->bBroadComHT = FALSE;
......@@ -3291,7 +3279,6 @@ VOID UserCfgInit(
pAd->CommonCfg.TxBASize = 7;
pAd->CommonCfg.REGBACapability.word = pAd->CommonCfg.BACapability.word;
#endif // DOT11_N_SUPPORT //
//pAd->CommonCfg.HTPhyMode.field.BW = BW_20;
//pAd->CommonCfg.HTPhyMode.field.MCS = MCS_AUTO;
......
......@@ -1068,9 +1068,9 @@ static VOID StartDFSProcedure(
{
// start DFS procedure
pAd->CommonCfg.Channel = Channel;
#ifdef DOT11_N_SUPPORT
N_ChannelCheck(pAd);
#endif // DOT11_N_SUPPORT //
pAd->CommonCfg.RadarDetect.RDMode = RD_SWITCHING_MODE;
pAd->CommonCfg.RadarDetect.CSCount = 0;
}
......
......@@ -750,7 +750,6 @@ typedef enum _RT_802_11_PHY_MODE {
PHY_11A,
PHY_11ABG_MIXED,
PHY_11G,
#ifdef DOT11_N_SUPPORT
PHY_11ABGN_MIXED, // both band 5
PHY_11N_2_4G, // 11n-only with 2.4G band 6
PHY_11GN_MIXED, // 2.4G band 7
......@@ -758,7 +757,6 @@ typedef enum _RT_802_11_PHY_MODE {
PHY_11BGN_MIXED, // if check 802.11b. 9
PHY_11AGN_MIXED, // if check 802.11b. 10
PHY_11N_5G, // 11n-only with 5G band 11
#endif // DOT11_N_SUPPORT //
} RT_802_11_PHY_MODE;
// put all proprietery for-query objects here to reduce # of Query_OID
......
......@@ -951,13 +951,11 @@ void send_monitor_packets(
ph->noise.len = 4;
ph->noise.data = 0;
#ifdef DOT11_N_SUPPORT
if (pRxBlk->pRxWI->PHYMODE >= MODE_HTMIX)
{
rate_index = 16 + ((UCHAR)pRxBlk->pRxWI->BW *16) + ((UCHAR)pRxBlk->pRxWI->ShortGI *32) + ((UCHAR)pRxBlk->pRxWI->MCS);
}
else
#endif // DOT11_N_SUPPORT //
if (pRxBlk->pRxWI->PHYMODE == MODE_OFDM)
rate_index = (UCHAR)(pRxBlk->pRxWI->MCS) + 4;
else
......
......@@ -54,10 +54,8 @@ MODULE_PARM_DESC (mac, "rt28xx: wireless mac addr");
/*---------------------------------------------------------------------*/
/* Prototypes of Functions Used */
/*---------------------------------------------------------------------*/
#ifdef DOT11_N_SUPPORT
extern BOOLEAN ba_reordering_resource_init(PRTMP_ADAPTER pAd, int num);
extern void ba_reordering_resource_release(PRTMP_ADAPTER pAd);
#endif // DOT11_N_SUPPORT //
extern NDIS_STATUS NICLoadRateSwitchingParams(IN PRTMP_ADAPTER pAd);
......@@ -324,10 +322,8 @@ int rt28xx_close(IN PNET_DEV dev)
RTMP_CLEAR_FLAG(pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS);
#ifdef DOT11_N_SUPPORT
// Free BA reorder resource
ba_reordering_resource_release(pAd);
#endif // DOT11_N_SUPPORT //
RTMP_CLEAR_FLAG(pAd, fRTMP_ADAPTER_START_UP);
......@@ -345,10 +341,8 @@ static int rt28xx_init(IN struct net_device *net_dev)
// WPDMA_GLO_CFG_STRUC GloCfg;
UINT32 MacCsr0 = 0;
#ifdef DOT11_N_SUPPORT
// Allocate BA Reordering memory
ba_reordering_resource_init(pAd, MAX_REORDERING_MPDU_NUM);
#endif // DOT11_N_SUPPORT //
// Make sure MAC gets ready.
index = 0;
......@@ -459,7 +453,6 @@ static int rt28xx_init(IN struct net_device *net_dev)
//Init Ba Capability parameters.
// RT28XX_BA_INIT(pAd);
#ifdef DOT11_N_SUPPORT
pAd->CommonCfg.DesiredHtPhy.MpduDensity = (UCHAR)pAd->CommonCfg.BACapability.field.MpduDensity;
pAd->CommonCfg.DesiredHtPhy.AmsduEnable = (USHORT)pAd->CommonCfg.BACapability.field.AmsduEnable;
pAd->CommonCfg.DesiredHtPhy.AmsduSize = (USHORT)pAd->CommonCfg.BACapability.field.AmsduSize;
......@@ -468,7 +461,6 @@ static int rt28xx_init(IN struct net_device *net_dev)
pAd->CommonCfg.HtCapability.HtCapInfo.MimoPs = (USHORT)pAd->CommonCfg.BACapability.field.MMPSmode;
pAd->CommonCfg.HtCapability.HtCapInfo.AMsduSize = (USHORT)pAd->CommonCfg.BACapability.field.AmsduSize;
pAd->CommonCfg.HtCapability.HtCapParm.MpduDensity = (UCHAR)pAd->CommonCfg.BACapability.field.MpduDensity;
#endif // DOT11_N_SUPPORT //
// after reading Registry, we now know if in AP mode or STA mode
......@@ -490,9 +482,7 @@ static int rt28xx_init(IN struct net_device *net_dev)
TmpPhy = pAd->CommonCfg.PhyMode;
pAd->CommonCfg.PhyMode = 0xff;
RTMPSetPhyMode(pAd, TmpPhy);
#ifdef DOT11_N_SUPPORT
SetCommonHT(pAd);
#endif // DOT11_N_SUPPORT //
// No valid channels.
if (pAd->ChannelListNum == 0)
......@@ -501,11 +491,9 @@ static int rt28xx_init(IN struct net_device *net_dev)
goto err4;
}
#ifdef DOT11_N_SUPPORT
printk("MCS Set = %02x %02x %02x %02x %02x\n", pAd->CommonCfg.HtCapability.MCSSet[0],
pAd->CommonCfg.HtCapability.MCSSet[1], pAd->CommonCfg.HtCapability.MCSSet[2],
pAd->CommonCfg.HtCapability.MCSSet[3], pAd->CommonCfg.HtCapability.MCSSet[4]);
#endif // DOT11_N_SUPPORT //
#ifdef RT30xx
//Init RT30xx RFRegisters after read RFIC type from EEPROM
......@@ -575,10 +563,7 @@ static int rt28xx_init(IN struct net_device *net_dev)
RTMPFreeTxRxRingMemory(pAd);
// RTMPFreeAdapter(pAd);
err1:
#ifdef DOT11_N_SUPPORT
os_free_mem(pAd, pAd->mpdu_blk_pool.mem); // free BA pool
#endif // DOT11_N_SUPPORT //
RT28XX_IRQ_RELEASE(net_dev);
// shall not set priv to NULL here because the priv didn't been free yet.
......
......@@ -27,12 +27,10 @@
#include "rt_config.h"
#ifdef DOT11_N_SUPPORT
static void HTParametersHook(
IN PRTMP_ADAPTER pAd,
IN CHAR *pValueStr,
IN CHAR *pInput);
#endif // DOT11_N_SUPPORT //
#define ETH_MAC_ADDR_STR_LEN 17 // in format of xx:xx:xx:xx:xx:xx
......@@ -1009,9 +1007,7 @@ NDIS_STATUS RTMPReadParametersHook(
{
int value = 0, maxPhyMode = PHY_11G;
#ifdef DOT11_N_SUPPORT
maxPhyMode = PHY_11N_5G;
#endif // DOT11_N_SUPPORT //
value = simple_strtol(tmpbuf, 0, 10);
......@@ -1399,9 +1395,7 @@ NDIS_STATUS RTMPReadParametersHook(
DBGPRINT(RT_DEBUG_TRACE, "HSCounter=%d\n", pAd->CommonCfg.bEnableHSCounter);
}*/
#ifdef DOT11_N_SUPPORT
HTParametersHook(pAd, tmpbuf, buffer);
#endif // DOT11_N_SUPPORT //
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{
......@@ -1535,7 +1529,6 @@ NDIS_STATUS RTMPReadParametersHook(
return (NDIS_STATUS_SUCCESS);
}
#ifdef DOT11_N_SUPPORT
static void HTParametersHook(
IN PRTMP_ADAPTER pAd,
IN CHAR *pValueStr,
......@@ -1946,5 +1939,3 @@ static void HTParametersHook(
}
}
#endif // DOT11_N_SUPPORT //
This diff is collapsed.
......@@ -1028,10 +1028,9 @@
// Preamble MODE in TxD
#define MODE_CCK 0
#define MODE_OFDM 1
#ifdef DOT11_N_SUPPORT
#define MODE_HTMIX 2
#define MODE_HTGREENFIELD 3
#endif // DOT11_N_SUPPORT //
// MCS for CCK. BW.SGI.STBC are reserved
#define MCS_LONGP_RATE_1 0 // long preamble CCK 1Mbps
#define MCS_LONGP_RATE_2 1 // long preamble CCK 1Mbps
......@@ -1078,12 +1077,10 @@
#define MCS_32 32
#define MCS_AUTO 33
#ifdef DOT11_N_SUPPORT
// OID_HTPHYMODE
// MODE
#define HTMODE_MM 0
#define HTMODE_GF 1
#endif // DOT11_N_SUPPORT //
// Fixed Tx MODE - HT, CCK or OFDM
#define FIXED_TXMODE_HT 0
......@@ -1095,15 +1092,12 @@
#define BW_BOTH BAND_WIDTH_BOTH
#define BW_10 BAND_WIDTH_10 // 802.11j has 10MHz. This definition is for internal usage. doesn't fill in the IE or other field.
#ifdef DOT11_N_SUPPORT
// SHORTGI
#define GI_400 GAP_INTERVAL_400 // only support in HT mode
#define GI_BOTH GAP_INTERVAL_BOTH
#endif // DOT11_N_SUPPORT //
#define GI_800 GAP_INTERVAL_800
// STBC
#define STBC_NONE 0
#ifdef DOT11_N_SUPPORT
#define STBC_USE 1 // limited use in rt2860b phy
#define RXSTBC_ONE 1 // rx support of one spatial stream
#define RXSTBC_TWO 2 // rx support of 1 and 2 spatial stream
......@@ -1125,8 +1119,6 @@
#define AMSDU_0 0
#define AMSDU_1 1
#endif // DOT11_N_SUPPORT //
// MCS use 7 bits
#define TXRATEMIMO 0x80
#define TXRATEMCS 0x7F
......
......@@ -341,7 +341,6 @@ VOID MlmeAssocReqAction(
FrameLen += tmp;
}
#ifdef DOT11_N_SUPPORT
// HT
if ((pAd->MlmeAux.HtCapabilityLen > 0) && (pAd->CommonCfg.PhyMode >= PHY_11ABGN_MIXED))
{
......@@ -368,7 +367,6 @@ VOID MlmeAssocReqAction(
}
FrameLen += TmpLen;
}
#endif // DOT11_N_SUPPORT //
// add Ralink proprietary IE to inform AP this STA is going to use AGGREGATION or PIGGY-BACK+AGGREGATION
// Case I: (Aggregation + Piggy-Back)
......@@ -691,7 +689,6 @@ VOID MlmeReassocReqAction(
FrameLen += tmp;
}
#ifdef DOT11_N_SUPPORT
// HT
if ((pAd->MlmeAux.HtCapabilityLen > 0) && (pAd->CommonCfg.PhyMode >= PHY_11ABGN_MIXED))
{
......@@ -718,7 +715,6 @@ VOID MlmeReassocReqAction(
}
FrameLen += TmpLen;
}
#endif // DOT11_N_SUPPORT //
// add Ralink proprietary IE to inform AP this STA is going to use AGGREGATION or PIGGY-BACK+AGGREGATION
// Case I: (Aggregation + Piggy-Back)
......@@ -897,9 +893,7 @@ VOID PeerAssocRspAction(
if(MAC_ADDR_EQUAL(Addr2, pAd->MlmeAux.Bssid))
{
DBGPRINT(RT_DEBUG_TRACE, ("PeerAssocRspAction():ASSOC - receive ASSOC_RSP to me (status=%d)\n", Status));
#ifdef DOT11_N_SUPPORT
DBGPRINT(RT_DEBUG_TRACE, ("PeerAssocRspAction():MacTable [%d].AMsduSize = %d. ClientStatusFlags = 0x%lx \n",Elem->Wcid, pAd->MacTab.Content[BSSID_WCID].AMsduSize, pAd->MacTab.Content[BSSID_WCID].ClientStatusFlags));
#endif // DOT11_N_SUPPORT //
RTMPCancelTimer(&pAd->MlmeAux.AssocTimer, &TimerCancelled);
if(Status == MLME_SUCCESS)
{
......@@ -1050,7 +1044,7 @@ VOID AssocPostProc(
COPY_MAC_ADDR(pAd->MlmeAux.Bssid, pAddr2);
pAd->MlmeAux.Aid = Aid;
pAd->MlmeAux.CapabilityInfo = CapabilityInfo & SUPPORTED_CAPABILITY_INFO;
#ifdef DOT11_N_SUPPORT
// Some HT AP might lost WMM IE. We add WMM ourselves. beacuase HT requires QoS on.
if ((HtCapabilityLen > 0) && (pEdcaParm->bValid == FALSE))
{
......@@ -1076,7 +1070,6 @@ VOID AssocPostProc(
pEdcaParm->Txop[3] = 48;
}
#endif // DOT11_N_SUPPORT //
NdisMoveMemory(&pAd->MlmeAux.APEdcaParm, pEdcaParm, sizeof(EDCA_PARM));
......@@ -1090,7 +1083,6 @@ VOID AssocPostProc(
NdisMoveMemory(pAd->MlmeAux.ExtRate, ExtRate, ExtRateLen);
RTMPCheckRates(pAd, pAd->MlmeAux.ExtRate, &pAd->MlmeAux.ExtRateLen);
#ifdef DOT11_N_SUPPORT
if (HtCapabilityLen > 0)
{
RTMPCheckHt(pAd, BSSID_WCID, pHtCapability, pAddHtInfo);
......@@ -1099,7 +1091,6 @@ VOID AssocPostProc(
DBGPRINT(RT_DEBUG_TRACE, ("AssocPostProc===> (Mmps=%d, AmsduSize=%d, )\n",
pAd->MacTab.Content[BSSID_WCID].MmpsMode, pAd->MacTab.Content[BSSID_WCID].AMsduSize));
#endif // DOT11_N_SUPPORT //
// Set New WPA information
Idx = BssTableSearch(&pAd->ScanTab, pAddr2, pAd->MlmeAux.Channel);
......@@ -1550,11 +1541,9 @@ BOOLEAN StaAddMacTableEntry(
if ((pAd->CommonCfg.PhyMode == PHY_11G) && (MaxSupportedRate < RATE_FIRST_OFDM_RATE))
return FALSE;
#ifdef DOT11_N_SUPPORT
// 11n only
if (((pAd->CommonCfg.PhyMode == PHY_11N_2_4G) || (pAd->CommonCfg.PhyMode == PHY_11N_5G))&& (HtCapabilityLen == 0))
return FALSE;
#endif // DOT11_N_SUPPORT //
if (!pEntry)
return FALSE;
......@@ -1600,7 +1589,6 @@ BOOLEAN StaAddMacTableEntry(
CLIENT_STATUS_CLEAR_FLAG(pEntry, fCLIENT_STATUS_PIGGYBACK_CAPABLE);
}
#ifdef DOT11_N_SUPPORT
// If this Entry supports 802.11n, upgrade to HT rate.
if ((HtCapabilityLen != 0) && (pAd->CommonCfg.PhyMode >= PHY_11ABGN_MIXED))
{
......@@ -1699,7 +1687,6 @@ BOOLEAN StaAddMacTableEntry(
}
NdisMoveMemory(&pEntry->HTCapability, pHtCapability, sizeof(HT_CAPABILITY_IE));
#endif // DOT11_N_SUPPORT //
pEntry->HTPhyMode.word = pEntry->MaxHTPhyMode.word;
pEntry->CurrTxRate = pEntry->MaxSupportedRate;
......
......@@ -818,7 +818,7 @@ VOID CntlWaitStartProc(
DBGPRINT(RT_DEBUG_TRACE, ("CNTL - Channel=%d, Start adhoc on W53(52,56,60,64) Channels are not accepted\n", pAd->CommonCfg.Channel));
return;
}
#ifdef DOT11_N_SUPPORT
if (pAd->CommonCfg.PhyMode >= PHY_11ABGN_MIXED)
{
N_ChannelCheck(pAd);
......@@ -842,7 +842,6 @@ VOID CntlWaitStartProc(
}
}
else
#endif // DOT11_N_SUPPORT //
{
pAd->StaActive.SupportedPhyInfo.bHtEnable = FALSE;
}
......@@ -1129,9 +1128,8 @@ VOID LinkUp(
COPY_SETTINGS_FROM_MLME_AUX_TO_ACTIVE_CFG(pAd);
#ifdef DOT11_N_SUPPORT
COPY_HTSETTINGS_FROM_MLME_AUX_TO_ACTIVE_CFG(pAd);
#endif // DOT11_N_SUPPORT //
// It's quite difficult to tell if a newly added KEY is WEP or CKIP until a new BSS
// is formed (either ASSOC/RE-ASSOC done or IBSS started. LinkUP should be a safe place
// to examine if cipher algorithm switching is required.
......@@ -1144,7 +1142,6 @@ VOID LinkUp(
OPSTATUS_SET_FLAG(pAd, fOP_STATUS_ADHOC_ON);
OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_INFRA_ON);
#ifdef DOT11_N_SUPPORT
if ((pAd->CommonCfg.HtCapability.HtCapInfo.ChannelWidth == BW_40) &&
(pAd->CommonCfg.AddHTInfo.AddHtInfo.ExtChanOffset == EXTCHA_ABOVE))
{
......@@ -1156,12 +1153,9 @@ VOID LinkUp(
{
pAd->CommonCfg.CentralChannel = pAd->CommonCfg.Channel - 2;
}
#endif // DOT11_N_SUPPORT //
#ifdef DOT11_N_SUPPORT
if (pAd->CommonCfg.PhyMode >= PHY_11ABGN_MIXED)
AdhocTurnOnQos(pAd);
#endif // DOT11_N_SUPPORT //
DBGPRINT(RT_DEBUG_TRACE, ("!!!Adhoc LINK UP !!! \n" ));
}
......@@ -1180,7 +1174,6 @@ VOID LinkUp(
Value |= pAd->CommonCfg.RegTransmitSetting.field.TxBF;
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R4, Value);
#ifdef DOT11_N_SUPPORT
// Change to AP channel
if ((pAd->CommonCfg.CentralChannel > pAd->CommonCfg.Channel) && (pAd->MlmeAux.HtCapability.HtCapInfo.ChannelWidth == BW_40))
{
......@@ -1244,7 +1237,6 @@ VOID LinkUp(
DBGPRINT(RT_DEBUG_TRACE, ("!!! 40MHz Upper LINK UP !!! Control Channel at UpperCentral = %d \n", pAd->CommonCfg.CentralChannel ));
}
else
#endif // DOT11_N_SUPPORT //
{
pAd->CommonCfg.BBPCurrentBW = BW_20;
pAd->CommonCfg.CentralChannel = pAd->CommonCfg.Channel;
......@@ -1283,9 +1275,7 @@ VOID LinkUp(
DBGPRINT(RT_DEBUG_TRACE, ("!!! LINK UP !!! (BssType=%d, AID=%d, ssid=%s, Channel=%d, CentralChannel = %d)\n",
BssType, pAd->StaActive.Aid, pAd->CommonCfg.Ssid, pAd->CommonCfg.Channel, pAd->CommonCfg.CentralChannel));
#ifdef DOT11_N_SUPPORT
DBGPRINT(RT_DEBUG_TRACE, ("!!! LINK UP !!! (Density =%d, )\n", pAd->MacTab.Content[BSSID_WCID].MpduDensity));
#endif // DOT11_N_SUPPORT //
AsicSetBssid(pAd, pAd->CommonCfg.Bssid);
......@@ -1295,7 +1285,6 @@ VOID LinkUp(
// Call this for RTS protectionfor legacy rate, we will always enable RTS threshold, but normally it will not hit
AsicUpdateProtect(pAd, 0, (OFDMSETPROTECT | CCKSETPROTECT), TRUE, FALSE);
#ifdef DOT11_N_SUPPORT
if ((pAd->StaActive.SupportedPhyInfo.bHtEnable == TRUE))
{
// Update HT protectionfor based on AP's operating mode.
......@@ -1306,7 +1295,6 @@ VOID LinkUp(
else
AsicUpdateProtect(pAd, pAd->MlmeAux.AddHtInfo.AddHtInfo2.OperaionMode, ALLN_SETPROTECT, FALSE, FALSE);
}
#endif // DOT11_N_SUPPORT //
NdisZeroMemory(&pAd->DrsCounters, sizeof(COUNTER_DRS));
......@@ -1555,10 +1543,8 @@ VOID LinkUp(
pAd->MacTab.Content[BSSID_WCID].ClientStatusFlags));
MlmeUpdateTxRates(pAd, TRUE, BSS0);
#ifdef DOT11_N_SUPPORT
MlmeUpdateHtTxRates(pAd, BSS0);
DBGPRINT(RT_DEBUG_TRACE, ("!!! LINK UP !! (StaActive.bHtEnable =%d, )\n", pAd->StaActive.SupportedPhyInfo.bHtEnable));
#endif // DOT11_N_SUPPORT //
if (pAd->CommonCfg.bAggregationCapable)
{
......@@ -1578,12 +1564,11 @@ VOID LinkUp(
if (pAd->MlmeAux.APRalinkIe != 0x0)
{
#ifdef DOT11_N_SUPPORT
if (CLIENT_STATUS_TEST_FLAG(&pAd->MacTab.Content[BSSID_WCID], fCLIENT_STATUS_RDG_CAPABLE))
{
AsicEnableRDG(pAd);
}
#endif // DOT11_N_SUPPORT //
OPSTATUS_SET_FLAG(pAd, fCLIENT_STATUS_RALINK_CHIPSET);
CLIENT_STATUS_SET_FLAG(&pAd->MacTab.Content[BSSID_WCID], fCLIENT_STATUS_RALINK_CHIPSET);
}
......@@ -1594,9 +1579,7 @@ VOID LinkUp(
}
}
#ifdef DOT11_N_SUPPORT
DBGPRINT(RT_DEBUG_TRACE, ("NDIS_STATUS_MEDIA_CONNECT Event B!.BACapability = %x. ClientStatusFlags = %lx\n", pAd->CommonCfg.BACapability.word, pAd->MacTab.Content[BSSID_WCID].ClientStatusFlags));
#endif // DOT11_N_SUPPORT //
// Set LED
RTMPSetLED(pAd, LED_LINK_UP);
......@@ -1621,13 +1604,13 @@ VOID LinkUp(
if (pAd->StaCfg.bAutoTxRateSwitch == FALSE)
{
pEntry->bAutoTxRateSwitch = FALSE;
#ifdef DOT11_N_SUPPORT
if (pEntry->HTPhyMode.field.MCS == 32)
pEntry->HTPhyMode.field.ShortGI = GI_800;
if ((pEntry->HTPhyMode.field.MCS > MCS_7) || (pEntry->HTPhyMode.field.MCS == 32))
pEntry->HTPhyMode.field.STBC = STBC_NONE;
#endif // DOT11_N_SUPPORT //
// If the legacy mode is set, overwrite the transmit setting of this entry.
if (pEntry->HTPhyMode.field.MODE <= MODE_OFDM)
RTMPUpdateLegacyTxSetting((UCHAR)pAd->StaCfg.DesiredTransmitSetting.field.FixedTxMode, pEntry);
......@@ -1656,7 +1639,6 @@ VOID LinkUp(
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R1, Value);
}
#ifdef DOT11_N_SUPPORT
if (pAd->StaActive.SupportedPhyInfo.bHtEnable == FALSE)
{
}
......@@ -1666,7 +1648,6 @@ VOID LinkUp(
// Because our Init value is 1 at MACRegTable.
RTMP_IO_WRITE32(pAd, MAX_LEN_CFG, 0x0fff);
}
#endif // DOT11_N_SUPPORT //
// Patch for Marvel AP to gain high throughput
// Need to set as following,
......@@ -1678,7 +1659,6 @@ VOID LinkUp(
// Txop can only be modified when RDG is off, WMM is disable and TxBurst is enable
//
// if 1. Legacy AP WMM on, or 2. 11n AP, AMPDU disable. Force turn off burst no matter what bEnableTxBurst is.
#ifdef DOT11_N_SUPPORT
// if ((!IS_RT30xx(pAd)) &&
if (!((pAd->CommonCfg.RxStream == 1)&&(pAd->CommonCfg.TxStream == 1)) &&
(((pAd->StaActive.SupportedPhyInfo.bHtEnable == FALSE) && OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_WMM_INUSED))
......@@ -1692,7 +1672,6 @@ VOID LinkUp(
DBGPRINT(RT_DEBUG_TRACE, ("Txburst 1\n"));
}
else
#endif // DOT11_N_SUPPORT //
if (pAd->CommonCfg.bEnableTxBurst)
{
RTMP_IO_READ32(pAd, EDCA_AC0_CFG, &Data);
......@@ -1714,7 +1693,6 @@ VOID LinkUp(
DBGPRINT(RT_DEBUG_TRACE, ("Txburst 3\n"));
}
#ifdef DOT11_N_SUPPORT
// Re-check to turn on TX burst or not.
if ((pAd->CommonCfg.IOTestParm.bLastAtheros == TRUE) && ((STA_WEP_ON(pAd))||(STA_TKIP_ON(pAd))))
{
......@@ -1734,7 +1712,6 @@ VOID LinkUp(
{
pAd->CommonCfg.IOTestParm.bNextDisableRxBA = FALSE;
}
#endif // DOT11_N_SUPPORT //
pAd->CommonCfg.IOTestParm.bLastAtheros = FALSE;
COPY_MAC_ADDR(pAd->CommonCfg.LastBssid, pAd->CommonCfg.Bssid);
......@@ -1902,12 +1879,11 @@ VOID LinkDown(
NdisZeroMemory(pAd->CommonCfg.Ssid, MAX_LEN_OF_SSID);
pAd->CommonCfg.SsidLen = 0;
}
#ifdef DOT11_N_SUPPORT
NdisZeroMemory(&pAd->MlmeAux.HtCapability, sizeof(HT_CAPABILITY_IE));
NdisZeroMemory(&pAd->MlmeAux.AddHtInfo, sizeof(ADD_HT_INFO_IE));
pAd->MlmeAux.HtCapabilityLen = 0;
pAd->MlmeAux.NewExtChannelOffset = 0xff;
#endif // DOT11_N_SUPPORT //
// Reset WPA-PSK state. Only reset when supplicant enabled
if (pAd->StaCfg.WpaState != SS_NOTUSE)
......@@ -1989,7 +1965,6 @@ VOID LinkDown(
pAd->CommonCfg.MlmeRate = pAd->CommonCfg.BasicMlmeRate;
pAd->CommonCfg.RtsRate = pAd->CommonCfg.BasicMlmeRate;
#ifdef DOT11_N_SUPPORT
//
// After Link down, reset piggy-back setting in ASIC. Disable RDG.
//
......@@ -2000,7 +1975,7 @@ VOID LinkDown(
ByteValue &= (~0x18);
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R4, ByteValue);
}
#endif // DOT11_N_SUPPORT //
// Reset DAC
RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R1, &ByteValue);
ByteValue &= (~0x18);
......@@ -2013,9 +1988,7 @@ VOID LinkDown(
RTMPSetPiggyBack(pAd,FALSE);
OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_PIGGYBACK_INUSED);
#ifdef DOT11_N_SUPPORT
pAd->CommonCfg.BACapability.word = pAd->CommonCfg.REGBACapability.word;
#endif // DOT11_N_SUPPORT //
// Restore all settings in the following.
AsicUpdateProtect(pAd, 0, (ALLN_SETPROTECT|CCKSETPROTECT|OFDMSETPROTECT), TRUE, FALSE);
......@@ -2456,7 +2429,6 @@ ULONG MakeIbssBeacon(
FrameLen += tmp;
}
#ifdef DOT11_N_SUPPORT
if ((pAd->CommonCfg.PhyMode >= PHY_11ABGN_MIXED))
{
ULONG TmpLen;
......@@ -2477,7 +2449,6 @@ ULONG MakeIbssBeacon(
FrameLen += TmpLen;
}
#endif // DOT11_N_SUPPORT //
//beacon use reserved WCID 0xff
if (pAd->CommonCfg.Channel > 14)
......
......@@ -185,13 +185,12 @@ VOID STARxDataFrameAnnounce(
else
{
RX_BLK_SET_FLAG(pRxBlk, fRX_EAP);
#ifdef DOT11_N_SUPPORT
if (RX_BLK_TEST_FLAG(pRxBlk, fRX_AMPDU) && (pAd->CommonCfg.bDisableReordering == 0))
{
Indicate_AMPDU_Packet(pAd, pRxBlk, FromWhichBSSID);
}
else
#endif // DOT11_N_SUPPORT //
{
// Determin the destination of the EAP frame
// to WPA state machine or upper layer
......@@ -442,12 +441,10 @@ VOID STAHandleRxDataFrame(
else
#endif
{
#ifdef DOT11_N_SUPPORT
RX_BLK_SET_FLAG(pRxBlk, fRX_HTC);
// skip HTC contorl field
pRxBlk->pData += 4;
pRxBlk->DataSize -= 4;
#endif // DOT11_N_SUPPORT //
}
}
......@@ -460,13 +457,10 @@ VOID STAHandleRxDataFrame(
pRxBlk->pData += 2;
}
#ifdef DOT11_N_SUPPORT
if (pRxD->BA)
{
RX_BLK_SET_FLAG(pRxBlk, fRX_AMPDU);
}
#endif // DOT11_N_SUPPORT //
//
// Case I Process Broadcast & Multicast data frame
......@@ -608,21 +602,17 @@ VOID STAHandleRxControlFrame(
IN PRTMP_ADAPTER pAd,
IN RX_BLK *pRxBlk)
{
#ifdef DOT11_N_SUPPORT
PRXWI_STRUC pRxWI = pRxBlk->pRxWI;
#endif // DOT11_N_SUPPORT //
PHEADER_802_11 pHeader = pRxBlk->pHeader;
PNDIS_PACKET pRxPacket = pRxBlk->pRxPacket;
switch (pHeader->FC.SubType)
{
case SUBTYPE_BLOCK_ACK_REQ:
#ifdef DOT11_N_SUPPORT
{
CntlEnqueueForRecv(pAd, pRxWI->WirelessCliID, (pRxWI->MPDUtotalByteCount), (PFRAME_BA_REQ)pHeader);
}
break;
#endif // DOT11_N_SUPPORT //
case SUBTYPE_BLOCK_ACK:
case SUBTYPE_ACK:
default:
......@@ -1000,10 +990,8 @@ NDIS_STATUS STASendPacket(
NumberOfFrag = 1; // Aggregation overwhelms fragmentation
else if (CLIENT_STATUS_TEST_FLAG(pEntry, fCLIENT_STATUS_AMSDU_INUSED))
NumberOfFrag = 1; // Aggregation overwhelms fragmentation
#ifdef DOT11_N_SUPPORT
else if ((pAd->StaCfg.HTPhyMode.field.MODE == MODE_HTMIX) || (pAd->StaCfg.HTPhyMode.field.MODE == MODE_HTGREENFIELD))
NumberOfFrag = 1; // MIMO RATE overwhelms fragmentation
#endif // DOT11_N_SUPPORT //
else
{
// The calculated "NumberOfFrag" is a rough estimation because of various
......@@ -1104,7 +1092,6 @@ NDIS_STATUS STASendPacket(
}
RTMP_IRQ_UNLOCK(&pAd->irq_lock, IrqFlags);
#ifdef DOT11_N_SUPPORT
if ((pAd->CommonCfg.BACapability.field.AutoBA == TRUE)&&
IS_HT_STA(pEntry))
{
......@@ -1123,7 +1110,6 @@ NDIS_STATUS STASendPacket(
BAOriSessionSetUp(pAd, pEntry, 0, 0, 10, FALSE);
}
}
#endif // DOT11_N_SUPPORT //
pAd->RalinkCounters.OneSecOsTxCount[QueIdx]++; // TODO: for debug only. to be removed
return NDIS_STATUS_SUCCESS;
......@@ -1445,7 +1431,6 @@ VOID STABuildCommon802_11Header(
pHeader_802_11->FC.PwrMgmt = (pAd->StaCfg.Psm == PWR_SAVE);
}
#ifdef DOT11_N_SUPPORT
VOID STABuildCache802_11Header(
IN RTMP_ADAPTER *pAd,
IN TX_BLK *pTxBlk,
......@@ -1487,7 +1472,6 @@ VOID STABuildCache802_11Header(
else
pHeader80211->FC.PwrMgmt = (pAd->StaCfg.Psm == PWR_SAVE);
}
#endif // DOT11_N_SUPPORT //
static inline PUCHAR STA_Build_ARalink_Frame_Header(
IN RTMP_ADAPTER *pAd,
......@@ -1547,7 +1531,6 @@ static inline PUCHAR STA_Build_ARalink_Frame_Header(
}
#ifdef DOT11_N_SUPPORT
static inline PUCHAR STA_Build_AMSDU_Frame_Header(
IN RTMP_ADAPTER *pAd,
IN TX_BLK *pTxBlk)
......@@ -1869,7 +1852,6 @@ VOID STA_AMSDU_Frame_Tx(
//
HAL_KickOutTx(pAd, pTxBlk, pTxBlk->QueIdx);
}
#endif // DOT11_N_SUPPORT //
VOID STA_Legacy_Frame_Tx(
IN PRTMP_ADAPTER pAd,
......@@ -2380,14 +2362,12 @@ NDIS_STATUS STAHardTransmit(
switch (pTxBlk->TxFrameType)
{
#ifdef DOT11_N_SUPPORT
case TX_AMPDU_FRAME:
STA_AMPDU_Frame_Tx(pAd, pTxBlk);
break;
case TX_AMSDU_FRAME:
STA_AMSDU_Frame_Tx(pAd, pTxBlk);
break;
#endif // DOT11_N_SUPPORT //
case TX_LEGACY_FRAME:
STA_Legacy_Frame_Tx(pAd, pTxBlk);
break;
......
......@@ -184,7 +184,6 @@ BOOLEAN PeerAssocRspSanity(
}
break;
#ifdef DOT11_N_SUPPORT
case IE_ADD_HT:
case IE_ADD_HT2:
if (pEid->Len >= sizeof(ADD_HT_INFO_IE))
......@@ -213,7 +212,6 @@ BOOLEAN PeerAssocRspSanity(
{
DBGPRINT(RT_DEBUG_WARN, ("PeerAssocRspSanity - wrong IE_SECONDARY_CH_OFFSET. \n"));
}
#endif // DOT11_N_SUPPORT //
break;
case IE_AIRONET_CKIP:
// 0. Check Aironet IE length, it must be larger or equal to 28
......
......@@ -108,7 +108,6 @@ VOID BeaconTimeout(
if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS))
return;
#ifdef DOT11_N_SUPPORT
if ((pAd->CommonCfg.BBPCurrentBW == BW_40)
)
{
......@@ -121,7 +120,6 @@ VOID BeaconTimeout(
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R4, BBPValue);
DBGPRINT(RT_DEBUG_TRACE, ("SYNC - End of SCAN, restore to 40MHz channel %d, Total BSS[%02d]\n",pAd->CommonCfg.CentralChannel, pAd->ScanTab.BssNr));
}
#endif // DOT11_N_SUPPORT //
MlmeEnqueue(pAd, SYNC_STATE_MACHINE, MT2_BEACON_TIMEOUT, 0, NULL);
RT28XX_MLME_HANDLER(pAd);
......@@ -475,7 +473,7 @@ VOID MlmeStartReqAction(
pAd->MlmeAux.ExtRateLen = pAd->CommonCfg.ExtRateLen;
NdisMoveMemory(pAd->MlmeAux.ExtRate, pAd->CommonCfg.ExtRate, MAX_LEN_OF_SUPPORTED_RATES);
RTMPCheckRates(pAd, pAd->MlmeAux.ExtRate, &pAd->MlmeAux.ExtRateLen);
#ifdef DOT11_N_SUPPORT
if (pAd->CommonCfg.PhyMode >= PHY_11ABGN_MIXED)
{
RTMPUpdateHTIE(&pAd->CommonCfg.DesiredHtPhy, &pAd->StaCfg.DesiredHtPhyInfo.MCSSet[0], &pAd->MlmeAux.HtCapability, &pAd->MlmeAux.AddHtInfo);
......@@ -484,7 +482,6 @@ VOID MlmeStartReqAction(
DBGPRINT(RT_DEBUG_TRACE, ("SYNC -pAd->StaActive.SupportedHtPhy.bHtEnable = TRUE\n"));
}
else
#endif // DOT11_N_SUPPORT //
{
pAd->MlmeAux.HtCapabilityLen = 0;
pAd->StaActive.SupportedPhyInfo.bHtEnable = FALSE;
......@@ -554,10 +551,9 @@ VOID PeerBeaconAtScanAction(
// Init Variable IE structure
pVIE = (PNDIS_802_11_VARIABLE_IEs) VarIE;
pVIE->Length = 0;
#ifdef DOT11_N_SUPPORT
RTMPZeroMemory(&HtCapability, sizeof(HtCapability));
RTMPZeroMemory(&AddHtInfo, sizeof(ADD_HT_INFO_IE));
#endif // DOT11_N_SUPPORT //
if (PeerBeaconAndProbeRspSanity(pAd,
Elem->Msg,
......@@ -608,11 +604,9 @@ VOID PeerBeaconAtScanAction(
Rssi = RTMPMaxRssi(pAd, ConvertToRssi(pAd, Elem->Rssi0, RSSI_0), ConvertToRssi(pAd, Elem->Rssi1, RSSI_1), ConvertToRssi(pAd, Elem->Rssi2, RSSI_2));
#ifdef DOT11_N_SUPPORT
if ((HtCapabilityLen > 0) || (PreNHtCapabilityLen > 0))
HtCapabilityLen = SIZE_HT_CAP_IE;
#endif // DOT11_N_SUPPORT //
if ((pAd->StaCfg.CCXReqType != MSRN_TYPE_UNUSED) && (Channel == pAd->StaCfg.CCXScanChannel))
{
Idx = BssTableSetEntry(pAd, &pAd->StaCfg.CCXBssTab, Bssid, Ssid, SsidLen, BssType, BeaconPeriod,
......@@ -682,9 +676,7 @@ VOID PeerBeaconAtJoinAction(
UCHAR HtCapabilityLen = 0, PreNHtCapabilityLen = 0;
UCHAR AddHtInfoLen;
UCHAR NewExtChannelOffset = 0xff;
#ifdef DOT11_N_SUPPORT
UCHAR CentralChannel;
#endif // DOT11_N_SUPPORT //
// Init Variable IE structure
pVIE = (PNDIS_802_11_VARIABLE_IEs) VarIE;
......@@ -800,7 +792,7 @@ VOID PeerBeaconAtJoinAction(
RTMPCheckRates(pAd, pAd->MlmeAux.ExtRate, &pAd->MlmeAux.ExtRateLen);
NdisZeroMemory(pAd->StaActive.SupportedPhyInfo.MCSSet, 16);
#ifdef DOT11_N_SUPPORT
pAd->MlmeAux.NewExtChannelOffset = NewExtChannelOffset;
pAd->MlmeAux.HtCapabilityLen = HtCapabilityLen;
......@@ -845,7 +837,6 @@ VOID PeerBeaconAtJoinAction(
}
else
#endif // DOT11_N_SUPPORT //
{
// To prevent error, let legacy AP must have same CentralChannel and Channel.
if ((HtCapabilityLen == 0) && (PreNHtCapabilityLen == 0))
......@@ -860,9 +851,7 @@ VOID PeerBeaconAtJoinAction(
// copy QOS related information
if ((pAd->CommonCfg.bWmmCapable)
#ifdef DOT11_N_SUPPORT
|| (pAd->CommonCfg.PhyMode >= PHY_11ABGN_MIXED)
#endif // DOT11_N_SUPPORT //
)
{
NdisMoveMemory(&pAd->MlmeAux.APEdcaParm, &EdcaParm, sizeof(EDCA_PARM));
......@@ -1003,14 +992,12 @@ VOID PeerBeacon(
if (pAd->Mlme.CntlMachine.CurrState == CNTL_WAIT_DISASSOC)
return;
#ifdef DOT11_N_SUPPORT
// Copy Control channel for this BSSID.
if (AddHtInfoLen != 0)
Channel = AddHtInfo.ControlChan;
if ((HtCapabilityLen > 0) || (PreNHtCapabilityLen > 0))
HtCapabilityLen = SIZE_HT_CAP_IE;
#endif // DOT11_N_SUPPORT //
//
// Housekeeping "SsidBssTab" table for later-on ROAMing usage.
......@@ -1250,7 +1237,6 @@ VOID PeerBeacon(
DBGPRINT(RT_DEBUG_WARN, ("SYNC - AP changed B/G protection to %d\n", bUseBGProtection));
}
#ifdef DOT11_N_SUPPORT
// check Ht protection mode. and adhere to the Non-GF device indication by AP.
if ((AddHtInfoLen != 0) &&
((AddHtInfo.AddHtInfo2.OperaionMode != pAd->MlmeAux.AddHtInfo.AddHtInfo2.OperaionMode) ||
......@@ -1267,7 +1253,6 @@ VOID PeerBeacon(
DBGPRINT(RT_DEBUG_TRACE, ("SYNC - AP changed N OperaionMode to %d\n", pAd->MlmeAux.AddHtInfo.AddHtInfo2.OperaionMode));
}
#endif // DOT11_N_SUPPORT //
if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_SHORT_PREAMBLE_INUSED) &&
ERP_IS_USE_BARKER_PREAMBLE(Erp))
......@@ -1362,9 +1347,7 @@ VOID PeerProbeReqAction(
UCHAR Addr2[MAC_ADDR_LEN];
CHAR Ssid[MAX_LEN_OF_SSID];
UCHAR SsidLen;
#ifdef DOT11_N_SUPPORT
UCHAR HtLen, AddHtLen, NewExtLen;
#endif // DOT11_N_SUPPORT //
HEADER_802_11 ProbeRspHdr;
NDIS_STATUS NStatus;
PUCHAR pOutBuffer = NULL;
......@@ -1437,7 +1420,7 @@ VOID PeerProbeReqAction(
END_OF_ARGS);
FrameLen += tmp;
}
#ifdef DOT11_N_SUPPORT
if (pAd->CommonCfg.PhyMode >= PHY_11ABGN_MIXED)
{
ULONG TmpLen;
......@@ -1470,7 +1453,7 @@ VOID PeerProbeReqAction(
}
FrameLen += TmpLen;
}
#endif // DOT11_N_SUPPORT //
MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen);
MlmeFreeMemory(pAd, pOutBuffer);
}
......
......@@ -197,11 +197,9 @@ INT Set_FragTest_Proc(
IN PRTMP_ADAPTER pAdapter,
IN PUCHAR arg);
#ifdef DOT11_N_SUPPORT
INT Set_TGnWifiTest_Proc(
IN PRTMP_ADAPTER pAd,
IN PUCHAR arg);
#endif // DOT11_N_SUPPORT //
INT Set_LongRetryLimit_Proc(
IN PRTMP_ADAPTER pAdapter,
......@@ -227,7 +225,6 @@ static struct {
{"BGProtection", Set_BGProtection_Proc},
{"RTSThreshold", Set_RTSThreshold_Proc},
{"FragThreshold", Set_FragThreshold_Proc},
#ifdef DOT11_N_SUPPORT
{"HtBw", Set_HtBw_Proc},
{"HtMcs", Set_HtMcs_Proc},
{"HtGi", Set_HtGi_Proc},
......@@ -241,8 +238,6 @@ static struct {
{"HtBaDecline", Set_BADecline_Proc},
{"HtProtect", Set_HtProtect_Proc},
{"HtMimoPs", Set_HtMimoPs_Proc},
#endif // DOT11_N_SUPPORT //
#ifdef AGGREGATION_SUPPORT
{"PktAggregate", Set_PktAggregate_Proc},
#endif
......@@ -267,10 +262,8 @@ static struct {
#endif
{"WpaSupport", Set_Wpa_Support},
{"FixedTxMode", Set_FixedTxMode_Proc},
#ifdef DOT11_N_SUPPORT
{"TGnWifiTest", Set_TGnWifiTest_Proc},
{"ForceGF", Set_ForceGF_Proc},
#endif // DOT11_N_SUPPORT //
{"LongRetry", Set_LongRetryLimit_Proc},
{"ShortRetry", Set_ShortRetryLimit_Proc},
//2008/09/11:KH add to support efuse<--
......@@ -1828,7 +1821,6 @@ rt_private_get_statistics(struct net_device *dev, struct iw_request_info *info,
return Status;
}
#ifdef DOT11_N_SUPPORT
void getBaInfo(
IN PRTMP_ADAPTER pAd,
IN PUCHAR pOutBuf)
......@@ -1876,7 +1868,6 @@ void getBaInfo(
return;
}
#endif // DOT11_N_SUPPORT //
static int
rt_private_show(struct net_device *dev, struct iw_request_info *info,
......@@ -1922,12 +1913,10 @@ rt_private_show(struct net_device *dev, struct iw_request_info *info,
case SHOW_CONN_STATUS:
if (MONITOR_ON(pAd))
{
#ifdef DOT11_N_SUPPORT
if (pAd->CommonCfg.PhyMode >= PHY_11ABGN_MIXED &&
pAd->CommonCfg.RegTransmitSetting.field.BW)
sprintf(extra, "Monitor Mode(CentralChannel %d)\n", pAd->CommonCfg.CentralChannel);
else
#endif // DOT11_N_SUPPORT //
sprintf(extra, "Monitor Mode(Channel %d)\n", pAd->CommonCfg.Channel);
}
else
......@@ -1961,12 +1950,10 @@ rt_private_show(struct net_device *dev, struct iw_request_info *info,
sprintf(extra, "Driver version-%s, %s %s\n", STA_DRIVER_VERSION, __DATE__, __TIME__ );
wrq->length = strlen(extra) + 1; // 1: size of '\0'
break;
#ifdef DOT11_N_SUPPORT
case SHOW_BA_INFO:
getBaInfo(pAd, extra);
wrq->length = strlen(extra) + 1; // 1: size of '\0'
break;
#endif // DOT11_N_SUPPORT //
case SHOW_DESC_INFO:
{
Show_DescInfo_Proc(pAd, NULL);
......@@ -2808,9 +2795,7 @@ int rt_ioctl_siwrate(struct net_device *dev,
(pAd->MacTab.Content[BSSID_WCID].HTPhyMode.field.MODE <= MODE_OFDM))
RTMPSetDesiredRates(pAd, -1);
#ifdef DOT11_N_SUPPORT
SetCommonHT(pAd);
#endif // DOT11_N_SUPPORT //
}
else
{
......@@ -2823,9 +2808,7 @@ int rt_ioctl_siwrate(struct net_device *dev,
else
{
pAd->StaCfg.DesiredTransmitSetting.field.MCS = MCS_AUTO;
#ifdef DOT11_N_SUPPORT
SetCommonHT(pAd);
#endif // DOT11_N_SUPPORT //
}
DBGPRINT(RT_DEBUG_TRACE, ("rt_ioctl_siwrate::(HtMcs=%d)\n",pAd->StaCfg.DesiredTransmitSetting.field.MCS));
}
......@@ -2873,14 +2856,12 @@ int rt_ioctl_giwrate(struct net_device *dev,
else
ht_setting.word = pAd->MacTab.Content[BSSID_WCID].HTPhyMode.word;
#ifdef DOT11_N_SUPPORT
if (ht_setting.field.MODE >= MODE_HTMIX)
{
// rate_index = 12 + ((UCHAR)ht_setting.field.BW *16) + ((UCHAR)ht_setting.field.ShortGI *32) + ((UCHAR)ht_setting.field.MCS);
rate_index = 12 + ((UCHAR)ht_setting.field.BW *24) + ((UCHAR)ht_setting.field.ShortGI *48) + ((UCHAR)ht_setting.field.MCS);
}
else
#endif // DOT11_N_SUPPORT //
if (ht_setting.field.MODE == MODE_OFDM)
rate_index = (UCHAR)(ht_setting.field.MCS) + 4;
else if (ht_setting.field.MODE == MODE_CCK)
......@@ -3045,18 +3026,13 @@ INT RTMPSetInformation(
ULONG PowerTemp;
BOOLEAN RadioState;
BOOLEAN StateMachineTouched = FALSE;
#ifdef DOT11_N_SUPPORT
OID_SET_HT_PHYMODE HT_PhyMode; //11n ,kathy
#endif // DOT11_N_SUPPORT //
PNDIS_802_11_PMKID pPmkId = NULL;
BOOLEAN IEEE8021xState = FALSE;
BOOLEAN IEEE8021x_required_keys = FALSE;
UCHAR wpa_supplicant_enable = 0;
#ifdef DOT11_N_SUPPORT
MaxPhyMode = PHY_11N_5G;
#endif // DOT11_N_SUPPORT //
DBGPRINT(RT_DEBUG_TRACE, ("-->RTMPSetInformation(), 0x%08x\n", cmd&0x7FFF));
switch(cmd & 0x7FFF) {
......@@ -3076,9 +3052,7 @@ INT RTMPSetInformation(
pAdapter->CommonCfg.PhyMode = 0xff;
// Build all corresponding channel information
RTMPSetPhyMode(pAdapter, TmpPhy);
#ifdef DOT11_N_SUPPORT
SetCommonHT(pAdapter);
#endif // DOT11_N_SUPPORT //
DBGPRINT(RT_DEBUG_TRACE, ("Set::RT_OID_802_11_COUNTRY_REGION (A:%d B/G:%d)\n", pAdapter->CommonCfg.CountryRegionForABand,
pAdapter->CommonCfg.CountryRegion));
}
......@@ -3256,9 +3230,7 @@ INT RTMPSetInformation(
if (PhyMode <= MaxPhyMode)
{
RTMPSetPhyMode(pAdapter, PhyMode);
#ifdef DOT11_N_SUPPORT
SetCommonHT(pAdapter);
#endif // DOT11_N_SUPPORT //
}
DBGPRINT(RT_DEBUG_TRACE, ("Set::RT_OID_802_11_PHY_MODE (=%d)\n", PhyMode));
}
......@@ -3536,10 +3508,10 @@ INT RTMPSetInformation(
RTMPSetPhyMode(pAdapter, PHY_11A);
else
Status = -EINVAL;
#ifdef DOT11_N_SUPPORT
if (Status == NDIS_STATUS_SUCCESS)
SetCommonHT(pAdapter);
#endif // DOT11_N_SUPPORT //
DBGPRINT(RT_DEBUG_TRACE, ("Set::OID_802_11_NETWORK_TYPE_IN_USE (=%d)\n",NetType));
}
break;
......@@ -3683,7 +3655,6 @@ INT RTMPSetInformation(
pAdapter->bConfigChanged = TRUE;
}
break;
#ifdef DOT11_N_SUPPORT
case RT_OID_802_11_SET_HT_PHYMODE:
if (wrq->u.data.length != sizeof(OID_SET_HT_PHYMODE))
Status = -EINVAL;
......@@ -3702,7 +3673,6 @@ INT RTMPSetInformation(
pAdapter->StaCfg.HTPhyMode.field.MCS, pAdapter->StaCfg.HTPhyMode.field.BW, pAdapter->StaCfg.HTPhyMode.field.ShortGI,
pAdapter->StaCfg.HTPhyMode.field.STBC));
break;
#endif // DOT11_N_SUPPORT //
case RT_OID_802_11_SET_APSD_SETTING:
if (wrq->u.data.length != sizeof(ULONG))
Status = -EINVAL;
......@@ -3785,8 +3755,6 @@ INT RTMPSetInformation(
StateMachineTouched = TRUE;
}
break;
#ifdef DOT11_N_SUPPORT
case RT_OID_802_11_SET_IMME_BA_CAP:
if (wrq->u.data.length != sizeof(OID_BACAP_STRUC))
Status = -EINVAL;
......@@ -3941,8 +3909,6 @@ INT RTMPSetInformation(
}
}
break;
#endif // DOT11_N_SUPPORT //
// For WPA_SUPPLICANT to set static wep key
case OID_802_11_ADD_WEP:
pWepKey = kmalloc(wrq->u.data.length, MEM_ALLOC_FLAG);
......@@ -5272,19 +5238,14 @@ INT Set_NetworkType_Proc(
DBGPRINT(RT_DEBUG_TRACE, ("fOP_STATUS_MEDIA_STATE_CONNECTED \n"));
if (pAdapter->CommonCfg.CentralChannel == 0)
{
#ifdef DOT11_N_SUPPORT
if (pAdapter->CommonCfg.PhyMode == PHY_11AN_MIXED)
pAdapter->CommonCfg.CentralChannel = 36;
else
#endif // DOT11_N_SUPPORT //
pAdapter->CommonCfg.CentralChannel = 6;
}
#ifdef DOT11_N_SUPPORT
else
N_ChannelCheck(pAdapter);
#endif // DOT11_N_SUPPORT //
#ifdef DOT11_N_SUPPORT
if (pAdapter->CommonCfg.PhyMode >= PHY_11ABGN_MIXED &&
pAdapter->CommonCfg.RegTransmitSetting.field.BW == BW_40 &&
pAdapter->CommonCfg.RegTransmitSetting.field.EXTCHA == EXTCHA_ABOVE)
......@@ -5335,7 +5296,6 @@ INT Set_NetworkType_Proc(
pAdapter->CommonCfg.CentralChannel));
}
else
#endif // DOT11_N_SUPPORT //
{
// 20MHz
RTMP_BBP_IO_READ8_BY_REG_ID(pAdapter, BBP_R4, &bbpValue);
......
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