aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rt3070/common/cmm_sanity.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-04-26 16:05:49 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-19 11:00:47 -0700
commit84717059b36187025c6483566de6873661787c74 (patch)
treead52a5cb4c1d8a77f68150ea2b4550799aec30ef /drivers/staging/rt3070/common/cmm_sanity.c
parentStaging: rt2870: remove CONFIG_STA_SUPPORT ifdefs (diff)
downloadlinux-dev-84717059b36187025c6483566de6873661787c74.tar.xz
linux-dev-84717059b36187025c6483566de6873661787c74.zip
Staging: rt3070: remove CONFIG_STA_SUPPORT ifdefs
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rt3070/common/cmm_sanity.c')
-rw-r--r--drivers/staging/rt3070/common/cmm_sanity.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/drivers/staging/rt3070/common/cmm_sanity.c b/drivers/staging/rt3070/common/cmm_sanity.c
index 4df3580180af..8cc74009ade3 100644
--- a/drivers/staging/rt3070/common/cmm_sanity.c
+++ b/drivers/staging/rt3070/common/cmm_sanity.c
@@ -284,9 +284,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
OUT PQOS_CAPABILITY_PARM pQosCapability,
OUT ULONG *pRalinkIe,
OUT UCHAR *pHtCapabilityLen,
-#ifdef CONFIG_STA_SUPPORT
OUT UCHAR *pPreNHtCapabilityLen,
-#endif // CONFIG_STA_SUPPORT //
OUT HT_CAPABILITY_IE *pHtCapability,
OUT UCHAR *AddHtInfoLen,
OUT ADD_HT_INFO_IE *AddHtInfo,
@@ -295,9 +293,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
OUT PNDIS_802_11_VARIABLE_IEs pVIE)
{
CHAR *Ptr;
-#ifdef CONFIG_STA_SUPPORT
CHAR TimLen;
-#endif // CONFIG_STA_SUPPORT //
PFRAME_802_11 pFrame;
PEID_STRUCT pEid;
UCHAR SubType;
@@ -325,10 +321,8 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
*pAironetCellPowerLimit = 0xFF; // Default of AironetCellPowerLimit is 0xFF
*LengthVIE = 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)
*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
*pRalinkIe = 0;
*pNewChannel = 0;
@@ -439,7 +433,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
*(USHORT *)(&pHtCapability->HtCapInfo) = cpu2le16(*(USHORT *)(&pHtCapability->HtCapInfo));
*(USHORT *)(&pHtCapability->ExtHtCapInfo) = cpu2le16(*(USHORT *)(&pHtCapability->ExtHtCapInfo));
-#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{
*pPreNHtCapabilityLen = 0; // Nnow we only support 26 bytes.
@@ -448,7 +441,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
NdisMoveMemory(Ptr + *LengthVIE, &pEid->Eid, pEid->Len + 2);
*LengthVIE += (pEid->Len + 2);
}
-#endif // CONFIG_STA_SUPPORT //
}
else
{
@@ -469,14 +461,12 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
*(USHORT *)(&AddHtInfo->AddHtInfo2) = cpu2le16(*(USHORT *)(&AddHtInfo->AddHtInfo2));
*(USHORT *)(&AddHtInfo->AddHtInfo3) = cpu2le16(*(USHORT *)(&AddHtInfo->AddHtInfo3));
-#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{
Ptr = (PUCHAR) pVIE;
NdisMoveMemory(Ptr + *LengthVIE, &pEid->Eid, pEid->Len + 2);
*LengthVIE += (pEid->Len + 2);
}
-#endif // CONFIG_STA_SUPPORT //
}
else
{
@@ -503,7 +493,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
if(pEid->Len == 1)
{
*pChannel = *pEid->Octet;
-#ifdef CONFIG_STA_SUPPORT
+
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{
if (ChannelSanity(pAd, *pChannel) == 0)
@@ -512,7 +502,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
return FALSE;
}
}
-#endif // CONFIG_STA_SUPPORT //
+
Sanity |= 0x4;
}
else
@@ -550,14 +540,13 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
}
break;
-#ifdef CONFIG_STA_SUPPORT
case IE_TIM:
if(INFRA_ON(pAd) && SubType == SUBTYPE_BEACON)
{
GetTimBit((PUCHAR)pEid, pAd->StaActive.Aid, &TimLen, pBcastFlag, pDtimCount, pDtimPeriod, pMessageToMe);
}
break;
-#endif // CONFIG_STA_SUPPORT //
+
case IE_CHANNEL_SWITCH_ANNOUNCEMENT:
if(pEid->Len == 3)
{
@@ -599,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 CONFIG_STA_SUPPORT
#ifdef DOT11_N_SUPPORT
// This HT IE is before IEEE draft set HT IE value.2006-09-28 by Jan.
@@ -620,7 +608,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
}
}
#endif // DOT11_N_SUPPORT //
-#endif // CONFIG_STA_SUPPORT //
else if (NdisEqualMemory(pEid->Octet, WPA_OUI, 4))
{
// Copy to pVIE which will report to microsoft bssid list.
@@ -687,8 +674,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
pEdcaParm->Cwmax[QID_AC_VO] = CW_MAX_IN_BITS-1;
pEdcaParm->Txop[QID_AC_VO] = 48; // AC_VO: 48*32us ~= 1.5ms
}
-#ifdef CONFIG_STA_SUPPORT
-#endif // CONFIG_STA_SUPPORT //
else
{
}
@@ -759,7 +744,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
}
// For some 11a AP. it did not have the channel EID, patch here
-#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{
UCHAR LatchRfChannel = MsgChannel;
@@ -772,7 +756,6 @@ BOOLEAN PeerBeaconAndProbeRspSanity(
Sanity |= 0x4;
}
}
-#endif // CONFIG_STA_SUPPORT //
if (Sanity != 0x7)
{
@@ -813,10 +796,8 @@ BOOLEAN MlmeScanReqSanity(
if ((*pBssType == BSS_INFRA || *pBssType == BSS_ADHOC || *pBssType == BSS_ANY)
&& (*pScanType == SCAN_ACTIVE || *pScanType == SCAN_PASSIVE
-#ifdef CONFIG_STA_SUPPORT
|| *pScanType == SCAN_CISCO_PASSIVE || *pScanType == SCAN_CISCO_ACTIVE
|| *pScanType == SCAN_CISCO_CHANNEL_LOAD || *pScanType == SCAN_CISCO_NOISE
-#endif // CONFIG_STA_SUPPORT //
))
{
return TRUE;