summaryrefslogtreecommitdiff
path: root/drivers/staging/rt2870/sta_ioctl.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-04-26 16:06:02 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-19 11:00:48 -0700
commitfa46aa71d7362798956d11f794971b50054d19b7 (patch)
treeed1110660a1f1155c3fc218f608d61b766a99400 /drivers/staging/rt2870/sta_ioctl.c
parent1623267ab40fb52e33b889cdb5c8b796be454a20 (diff)
Staging: rt2870: remove DOT11_N_SUPPORT ifdefs
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rt2870/sta_ioctl.c')
-rw-r--r--drivers/staging/rt2870/sta_ioctl.c46
1 files changed, 2 insertions, 44 deletions
diff --git a/drivers/staging/rt2870/sta_ioctl.c b/drivers/staging/rt2870/sta_ioctl.c
index d02488a6a291..e3294bee43c3 100644
--- a/drivers/staging/rt2870/sta_ioctl.c
+++ b/drivers/staging/rt2870/sta_ioctl.c
@@ -190,11 +190,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,
@@ -224,7 +222,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},
@@ -238,8 +235,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
@@ -264,10 +259,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},
{NULL,}
@@ -1888,7 +1881,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)
@@ -1935,7 +1927,6 @@ void getBaInfo(
return;
}
-#endif // DOT11_N_SUPPORT //
static int
rt_private_show(struct net_device *dev, struct iw_request_info *info,
@@ -1981,12 +1972,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
@@ -2020,12 +2009,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);
@@ -2868,9 +2855,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
{
@@ -2883,9 +2868,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));
}
@@ -2933,14 +2916,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)
@@ -3105,18 +3086,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) {
@@ -3136,9 +3112,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));
}
@@ -3316,9 +3290,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));
}
@@ -3596,10 +3568,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;
@@ -3743,7 +3715,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;
@@ -3762,7 +3733,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;
@@ -3845,8 +3815,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;
@@ -4001,8 +3969,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);
@@ -5342,19 +5308,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)
@@ -5405,7 +5366,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);
@@ -6426,9 +6386,7 @@ INT Show_Adhoc_MacTable_Proc(
sprintf(extra, "\n");
-#ifdef DOT11_N_SUPPORT
sprintf(extra + strlen(extra), "HT Operating Mode : %d\n", pAd->CommonCfg.AddHTInfo.AddHtInfo2.OperaionMode);
-#endif // DOT11_N_SUPPORT //
sprintf(extra + strlen(extra), "\n%-19s%-4s%-4s%-7s%-7s%-7s%-10s%-6s%-6s%-6s%-6s\n",
"MAC", "AID", "BSS", "RSSI0", "RSSI1", "RSSI2", "PhMd", "BW", "MCS", "SGI", "STBC");