X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=drivers%2Fstaging%2Frt3070%2Fsta_ioctl.c;h=080ec88ef472402d8f988f7b54170eaad62d58fa;hb=8f78dfebb8fc14c94900e8f6939c21f8f826c764;hp=079454835a43fc902c4f2978acf282f7e5b9a8c4;hpb=3a20ac2c52b1317f5a5f0bd9cd3cbe8495ddd026;p=firefly-linux-kernel-4.4.55.git diff --git a/drivers/staging/rt3070/sta_ioctl.c b/drivers/staging/rt3070/sta_ioctl.c index 079454835a43..080ec88ef472 100644 --- a/drivers/staging/rt3070/sta_ioctl.c +++ b/drivers/staging/rt3070/sta_ioctl.c @@ -85,10 +85,6 @@ struct iw_priv_args privtab[] = { 0, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "radio_off" }, { RAIO_ON, 0, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "radio_on" }, -#ifdef QOS_DLS_SUPPORT - { SHOW_DLS_ENTRY_INFO, - 0, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "dlsentryinfo" }, -#endif // QOS_DLS_SUPPORT // { SHOW_CFG_VALUE, IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "show" }, /* --- sub-ioctls relations --- */ @@ -171,11 +167,9 @@ INT Set_PSMode_Proc( IN PRTMP_ADAPTER pAdapter, IN PUCHAR arg); -#ifdef WPA_SUPPLICANT_SUPPORT INT Set_Wpa_Support( IN PRTMP_ADAPTER pAd, IN PUCHAR arg); -#endif // WPA_SUPPLICANT_SUPPORT // #ifdef DBG @@ -203,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, @@ -217,18 +209,6 @@ INT Set_ShortRetryLimit_Proc( IN PRTMP_ADAPTER pAdapter, IN PUCHAR arg); -#ifdef EXT_BUILD_CHANNEL_LIST -INT Set_Ieee80211dClientMode_Proc( - IN PRTMP_ADAPTER pAdapter, - IN PUCHAR arg); -#endif // EXT_BUILD_CHANNEL_LIST // - -#ifdef CARRIER_DETECTION_SUPPORT -INT Set_CarrierDetect_Proc( - IN PRTMP_ADAPTER pAd, - IN PUCHAR arg); -#endif // CARRIER_DETECTION_SUPPORT // - static struct { CHAR *name; INT (*set_proc)(PRTMP_ADAPTER pAdapter, PUCHAR arg); @@ -245,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}, @@ -259,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 @@ -283,67 +260,12 @@ static struct { #ifdef DBG {"Debug", Set_Debug_Proc}, #endif - -#ifdef RALINK_ATE - {"ATE", Set_ATE_Proc}, - {"ATEDA", Set_ATE_DA_Proc}, - {"ATESA", Set_ATE_SA_Proc}, - {"ATEBSSID", Set_ATE_BSSID_Proc}, - {"ATECHANNEL", Set_ATE_CHANNEL_Proc}, - {"ATETXPOW0", Set_ATE_TX_POWER0_Proc}, - {"ATETXPOW1", Set_ATE_TX_POWER1_Proc}, - {"ATETXANT", Set_ATE_TX_Antenna_Proc}, - {"ATERXANT", Set_ATE_RX_Antenna_Proc}, - {"ATETXFREQOFFSET", Set_ATE_TX_FREQOFFSET_Proc}, - {"ATETXBW", Set_ATE_TX_BW_Proc}, - {"ATETXLEN", Set_ATE_TX_LENGTH_Proc}, - {"ATETXCNT", Set_ATE_TX_COUNT_Proc}, - {"ATETXMCS", Set_ATE_TX_MCS_Proc}, - {"ATETXMODE", Set_ATE_TX_MODE_Proc}, - {"ATETXGI", Set_ATE_TX_GI_Proc}, - {"ATERXFER", Set_ATE_RX_FER_Proc}, - {"ATERRF", Set_ATE_Read_RF_Proc}, - {"ATEWRF1", Set_ATE_Write_RF1_Proc}, - {"ATEWRF2", Set_ATE_Write_RF2_Proc}, - {"ATEWRF3", Set_ATE_Write_RF3_Proc}, - {"ATEWRF4", Set_ATE_Write_RF4_Proc}, - {"ATELDE2P", Set_ATE_Load_E2P_Proc}, - {"ATERE2P", Set_ATE_Read_E2P_Proc}, - {"ATESHOW", Set_ATE_Show_Proc}, - {"ATEHELP", Set_ATE_Help_Proc}, - -#ifdef RALINK_28xx_QA - {"TxStop", Set_TxStop_Proc}, - {"RxStop", Set_RxStop_Proc}, -#endif // RALINK_28xx_QA // -#endif // RALINK_ATE // - -#ifdef WPA_SUPPLICANT_SUPPORT {"WpaSupport", Set_Wpa_Support}, -#endif // WPA_SUPPLICANT_SUPPORT // - - - {"FixedTxMode", Set_FixedTxMode_Proc}, -#ifdef CONFIG_APSTA_MIXED_SUPPORT - {"OpMode", Set_OpMode_Proc}, -#endif // CONFIG_APSTA_MIXED_SUPPORT // -#ifdef DOT11_N_SUPPORT {"TGnWifiTest", Set_TGnWifiTest_Proc}, {"ForceGF", Set_ForceGF_Proc}, -#endif // DOT11_N_SUPPORT // -#ifdef QOS_DLS_SUPPORT - {"DlsAddEntry", Set_DlsAddEntry_Proc}, - {"DlsTearDownEntry", Set_DlsTearDownEntry_Proc}, -#endif // QOS_DLS_SUPPORT // {"LongRetry", Set_LongRetryLimit_Proc}, {"ShortRetry", Set_ShortRetryLimit_Proc}, -#ifdef EXT_BUILD_CHANNEL_LIST - {"11dClientMode", Set_Ieee80211dClientMode_Proc}, -#endif // EXT_BUILD_CHANNEL_LIST // -#ifdef CARRIER_DETECTION_SUPPORT - {"CarrierDetect", Set_CarrierDetect_Proc}, -#endif // CARRIER_DETECTION_SUPPORT // //2008/09/11:KH add to support efuse<-- #ifdef RT30xx {"efuseFreeNumber", set_eFuseGetFreeBlockCount_Proc}, @@ -378,14 +300,13 @@ VOID RTMPAddKey( NdisZeroMemory(&pAd->SharedKey[BSS0][0], sizeof(CIPHER_KEY)); pAd->SharedKey[BSS0][0].KeyLen = LEN_TKIP_EK; NdisMoveMemory(pAd->SharedKey[BSS0][0].Key, pKey->KeyMaterial, LEN_TKIP_EK); -#ifdef WPA_SUPPLICANT_SUPPORT + if (pAd->StaCfg.PairCipher == Ndis802_11Encryption2Enabled) { NdisMoveMemory(pAd->SharedKey[BSS0][0].RxMic, pKey->KeyMaterial + LEN_TKIP_EK, LEN_TKIP_TXMICK); NdisMoveMemory(pAd->SharedKey[BSS0][0].TxMic, pKey->KeyMaterial + LEN_TKIP_EK + LEN_TKIP_TXMICK, LEN_TKIP_RXMICK); } else -#endif // WPA_SUPPLICANT_SUPPORT // { NdisMoveMemory(pAd->SharedKey[BSS0][0].TxMic, pKey->KeyMaterial + LEN_TKIP_EK, LEN_TKIP_TXMICK); NdisMoveMemory(pAd->SharedKey[BSS0][0].RxMic, pKey->KeyMaterial + LEN_TKIP_EK + LEN_TKIP_TXMICK, LEN_TKIP_RXMICK); @@ -439,14 +360,13 @@ VOID RTMPAddKey( NdisZeroMemory(&pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId], sizeof(CIPHER_KEY)); pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].KeyLen = LEN_TKIP_EK; NdisMoveMemory(pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].Key, pKey->KeyMaterial, LEN_TKIP_EK); -#ifdef WPA_SUPPLICANT_SUPPORT + if (pAd->StaCfg.GroupCipher == Ndis802_11Encryption2Enabled) { NdisMoveMemory(pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].RxMic, pKey->KeyMaterial + LEN_TKIP_EK, LEN_TKIP_TXMICK); NdisMoveMemory(pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].TxMic, pKey->KeyMaterial + LEN_TKIP_EK + LEN_TKIP_TXMICK, LEN_TKIP_RXMICK); } else -#endif // WPA_SUPPLICANT_SUPPORT // { NdisMoveMemory(pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].TxMic, pKey->KeyMaterial + LEN_TKIP_EK, LEN_TKIP_TXMICK); NdisMoveMemory(pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].RxMic, pKey->KeyMaterial + LEN_TKIP_EK + LEN_TKIP_TXMICK, LEN_TKIP_RXMICK); @@ -677,11 +597,9 @@ int rt_ioctl_siwmode(struct net_device *dev, case IW_MODE_INFRA: Set_NetworkType_Proc(pAdapter, "Infra"); break; -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,4,20)) case IW_MODE_MONITOR: Set_NetworkType_Proc(pAdapter, "Monitor"); break; -#endif default: DBGPRINT(RT_DEBUG_TRACE, ("===>rt_ioctl_siwmode::SIOCSIWMODE (unknown %d)\n", *mode)); return -EINVAL; @@ -703,12 +621,10 @@ int rt_ioctl_giwmode(struct net_device *dev, *mode = IW_MODE_ADHOC; else if (INFRA_ON(pAdapter)) *mode = IW_MODE_INFRA; -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,4,20)) else if (MONITOR_ON(pAdapter)) { *mode = IW_MODE_MONITOR; } -#endif else *mode = IW_MODE_AUTO; @@ -874,14 +790,12 @@ int rt_ioctl_giwap(struct net_device *dev, ap_addr->sa_family = ARPHRD_ETHER; memcpy(ap_addr->sa_data, &pAdapter->CommonCfg.Bssid, ETH_ALEN); } -#ifdef WPA_SUPPLICANT_SUPPORT // Add for RT2870 else if (pAdapter->StaCfg.WpaSupplicantUP != WPA_SUPPLICANT_DISABLE) { ap_addr->sa_family = ARPHRD_ETHER; memcpy(ap_addr->sa_data, &pAdapter->MlmeAux.Bssid, ETH_ALEN); } -#endif // WPA_SUPPLICANT_SUPPORT // else { DBGPRINT(RT_DEBUG_TRACE, ("IOCTL::SIOCGIWAP(=EMPTY)\n")); @@ -990,12 +904,10 @@ int rt_ioctl_siwscan(struct net_device *dev, } -#ifdef WPA_SUPPLICANT_SUPPORT if (pAdapter->StaCfg.WpaSupplicantUP == WPA_SUPPLICANT_ENABLE) { pAdapter->StaCfg.WpaSupplicantScanCount++; } -#endif // WPA_SUPPLICANT_SUPPORT // pAdapter->StaCfg.bScanReqIsFromWebUI = TRUE; if (RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS)) @@ -1003,7 +915,6 @@ int rt_ioctl_siwscan(struct net_device *dev, do{ Now = jiffies; -#ifdef WPA_SUPPLICANT_SUPPORT if ((pAdapter->StaCfg.WpaSupplicantUP == WPA_SUPPLICANT_ENABLE) && (pAdapter->StaCfg.WpaSupplicantScanCount > 3)) { @@ -1011,7 +922,6 @@ int rt_ioctl_siwscan(struct net_device *dev, Status = NDIS_STATUS_SUCCESS; break; } -#endif // WPA_SUPPLICANT_SUPPORT // if ((OPSTATUS_TEST_FLAG(pAdapter, fOP_STATUS_MEDIA_STATE_CONNECTED)) && ((pAdapter->StaCfg.AuthMode == Ndis802_11AuthModeWPA) || @@ -1071,13 +981,10 @@ int rt_ioctl_giwscan(struct net_device *dev, return -EAGAIN; } - -#ifdef WPA_SUPPLICANT_SUPPORT if (pAdapter->StaCfg.WpaSupplicantUP == WPA_SUPPLICANT_ENABLE) { pAdapter->StaCfg.WpaSupplicantScanCount = 0; } -#endif // WPA_SUPPLICANT_SUPPORT // if (pAdapter->ScanTab.BssNr == 0) { @@ -1478,14 +1385,12 @@ int rt_ioctl_giwessid(struct net_device *dev, memcpy(essid, pAdapter->CommonCfg.Ssid, pAdapter->CommonCfg.SsidLen); } #ifdef RT2870 -#ifdef WPA_SUPPLICANT_SUPPORT // Add for RT2870 else if (pAdapter->StaCfg.WpaSupplicantUP != WPA_SUPPLICANT_DISABLE) { data->length = pAdapter->CommonCfg.SsidLen; memcpy(essid, pAdapter->CommonCfg.Ssid, pAdapter->CommonCfg.SsidLen); } -#endif // WPA_SUPPLICANT_SUPPORT // #endif // RT2870 // else {//the ANY ssid was specified @@ -1725,10 +1630,8 @@ int rt_ioctl_siwencode(struct net_device *dev, } else /* Don't complain if only change the mode */ - if(!erq->flags & IW_ENCODE_MODE) - { + if (!(erq->flags & IW_ENCODE_MODE)) return -EINVAL; - } } done: @@ -1890,14 +1793,6 @@ rt_private_get_statistics(struct net_device *dev, struct iw_request_info *info, memset(extra, 0x00, IW_PRIV_SIZE_MASK); sprintf(extra, "\n\n"); -#ifdef RALINK_ATE - if (ATE_ON(pAd)) - { - sprintf(extra+strlen(extra), "Tx success = %ld\n", (ULONG)pAd->ate.TxDoneCount); - //sprintf(extra+strlen(extra), "Tx success without retry = %ld\n", (ULONG)pAd->ate.TxDoneCount); - } - else -#endif // RALINK_ATE // { sprintf(extra+strlen(extra), "Tx success = %ld\n", (ULONG)pAd->WlanCounters.TransmittedFragmentCount.QuadPart); sprintf(extra+strlen(extra), "Tx success without retry = %ld\n", (ULONG)pAd->WlanCounters.TransmittedFragmentCount.QuadPart - (ULONG)pAd->WlanCounters.RetryCount.QuadPart); @@ -1913,31 +1808,12 @@ rt_private_get_statistics(struct net_device *dev, struct iw_request_info *info, sprintf(extra+strlen(extra), "Rx duplicate frame = %ld\n", (ULONG)pAd->WlanCounters.FrameDuplicateCount.QuadPart); sprintf(extra+strlen(extra), "False CCA (one second) = %ld\n", (ULONG)pAd->RalinkCounters.OneSecFalseCCACnt); -#ifdef RALINK_ATE - if (ATE_ON(pAd)) - { - if (pAd->ate.RxAntennaSel == 0) - { - sprintf(extra+strlen(extra), "RSSI-A = %ld\n", (LONG)(pAd->ate.LastRssi0 - pAd->BbpRssiToDbmDelta)); - sprintf(extra+strlen(extra), "RSSI-B (if available) = %ld\n", (LONG)(pAd->ate.LastRssi1 - pAd->BbpRssiToDbmDelta)); - sprintf(extra+strlen(extra), "RSSI-C (if available) = %ld\n\n", (LONG)(pAd->ate.LastRssi2 - pAd->BbpRssiToDbmDelta)); - } - else - { - sprintf(extra+strlen(extra), "RSSI = %ld\n", (LONG)(pAd->ate.LastRssi0 - pAd->BbpRssiToDbmDelta)); - } - } - else -#endif // RALINK_ATE // { sprintf(extra+strlen(extra), "RSSI-A = %ld\n", (LONG)(pAd->StaCfg.RssiSample.LastRssi0 - pAd->BbpRssiToDbmDelta)); sprintf(extra+strlen(extra), "RSSI-B (if available) = %ld\n", (LONG)(pAd->StaCfg.RssiSample.LastRssi1 - pAd->BbpRssiToDbmDelta)); sprintf(extra+strlen(extra), "RSSI-C (if available) = %ld\n\n", (LONG)(pAd->StaCfg.RssiSample.LastRssi2 - pAd->BbpRssiToDbmDelta)); } -#ifdef WPA_SUPPLICANT_SUPPORT sprintf(extra+strlen(extra), "WpaSupplicantUP = %d\n\n", pAd->StaCfg.WpaSupplicantUP); -#endif // WPA_SUPPLICANT_SUPPORT // - wrq->length = strlen(extra) + 1; // 1: size of '\0' DBGPRINT(RT_DEBUG_TRACE, ("<== rt_private_get_statistics, wrq->length = %d\n", wrq->length)); @@ -1945,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) @@ -1993,7 +1868,6 @@ void getBaInfo( return; } -#endif // DOT11_N_SUPPORT // static int rt_private_show(struct net_device *dev, struct iw_request_info *info, @@ -2039,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 @@ -2078,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); @@ -2133,16 +2003,6 @@ rt_private_show(struct net_device *dev, struct iw_request_info *info, wrq->length = strlen(extra) + 1; // 1: size of '\0' break; - -#ifdef QOS_DLS_SUPPORT - case SHOW_DLS_ENTRY_INFO: - { - Set_DlsEntryInfo_Display_Proc(pAd, NULL); - wrq->length = 0; // 1: size of '\0' - } - break; -#endif // QOS_DLS_SUPPORT // - case SHOW_CFG_VALUE: { Status = RTMPShowCfgValue(pAd, wrq->pointer, extra); @@ -2151,7 +2011,7 @@ rt_private_show(struct net_device *dev, struct iw_request_info *info, } break; default: - DBGPRINT(RT_DEBUG_TRACE, ("%s - unknow subcmd = %d\n", __FUNCTION__, subcmd)); + DBGPRINT(RT_DEBUG_TRACE, ("%s - unknow subcmd = %d\n", __func__, subcmd)); break; } @@ -2170,7 +2030,7 @@ int rt_ioctl_siwmlme(struct net_device *dev, MLME_DISASSOC_REQ_STRUCT DisAssocReq; MLME_DEAUTH_REQ_STRUCT DeAuthReq; - DBGPRINT(RT_DEBUG_TRACE, ("====> %s\n", __FUNCTION__)); + DBGPRINT(RT_DEBUG_TRACE, ("====> %s\n", __func__)); if (pMlme == NULL) return -EINVAL; @@ -2179,7 +2039,7 @@ int rt_ioctl_siwmlme(struct net_device *dev, { #ifdef IW_MLME_DEAUTH case IW_MLME_DEAUTH: - DBGPRINT(RT_DEBUG_TRACE, ("====> %s - IW_MLME_DEAUTH\n", __FUNCTION__)); + DBGPRINT(RT_DEBUG_TRACE, ("====> %s - IW_MLME_DEAUTH\n", __func__)); COPY_MAC_ADDR(DeAuthReq.Addr, pAd->CommonCfg.Bssid); DeAuthReq.Reason = pMlme->reason_code; MsgElem.MsgLen = sizeof(MLME_DEAUTH_REQ_STRUCT); @@ -2194,7 +2054,7 @@ int rt_ioctl_siwmlme(struct net_device *dev, #endif // IW_MLME_DEAUTH // #ifdef IW_MLME_DISASSOC case IW_MLME_DISASSOC: - DBGPRINT(RT_DEBUG_TRACE, ("====> %s - IW_MLME_DISASSOC\n", __FUNCTION__)); + DBGPRINT(RT_DEBUG_TRACE, ("====> %s - IW_MLME_DISASSOC\n", __func__)); COPY_MAC_ADDR(DisAssocReq.Addr, pAd->CommonCfg.Bssid); DisAssocReq.Reason = pMlme->reason_code; @@ -2208,7 +2068,7 @@ int rt_ioctl_siwmlme(struct net_device *dev, break; #endif // IW_MLME_DISASSOC // default: - DBGPRINT(RT_DEBUG_TRACE, ("====> %s - Unknow Command\n", __FUNCTION__)); + DBGPRINT(RT_DEBUG_TRACE, ("====> %s - Unknow Command\n", __func__)); break; } @@ -2241,7 +2101,7 @@ int rt_ioctl_siwauth(struct net_device *dev, else if (param->value == IW_AUTH_WPA_VERSION_WPA2) pAdapter->StaCfg.AuthMode = Ndis802_11AuthModeWPA2PSK; - DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_WPA_VERSION - param->value = %d!\n", __FUNCTION__, param->value)); + DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_WPA_VERSION - param->value = %d!\n", __func__, param->value)); break; case IW_AUTH_CIPHER_PAIRWISE: if (param->value == IW_AUTH_CIPHER_NONE) @@ -2256,9 +2116,7 @@ int rt_ioctl_siwauth(struct net_device *dev, pAdapter->StaCfg.WepStatus = Ndis802_11WEPEnabled; pAdapter->StaCfg.OrigWepStatus = pAdapter->StaCfg.WepStatus; pAdapter->StaCfg.PairCipher = Ndis802_11WEPEnabled; -#ifdef WPA_SUPPLICANT_SUPPORT pAdapter->StaCfg.IEEE8021X = FALSE; -#endif // WPA_SUPPLICANT_SUPPORT // } else if (param->value == IW_AUTH_CIPHER_TKIP) { @@ -2272,7 +2130,7 @@ int rt_ioctl_siwauth(struct net_device *dev, pAdapter->StaCfg.OrigWepStatus = pAdapter->StaCfg.WepStatus; pAdapter->StaCfg.PairCipher = Ndis802_11Encryption3Enabled; } - DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_CIPHER_PAIRWISE - param->value = %d!\n", __FUNCTION__, param->value)); + DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_CIPHER_PAIRWISE - param->value = %d!\n", __func__, param->value)); break; case IW_AUTH_CIPHER_GROUP: if (param->value == IW_AUTH_CIPHER_NONE) @@ -2292,7 +2150,7 @@ int rt_ioctl_siwauth(struct net_device *dev, { pAdapter->StaCfg.GroupCipher = Ndis802_11Encryption3Enabled; } - DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_CIPHER_GROUP - param->value = %d!\n", __FUNCTION__, param->value)); + DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_CIPHER_GROUP - param->value = %d!\n", __func__, param->value)); break; case IW_AUTH_KEY_MGMT: if (param->value == IW_AUTH_KEY_MGMT_802_1X) @@ -2300,29 +2158,23 @@ int rt_ioctl_siwauth(struct net_device *dev, if (pAdapter->StaCfg.AuthMode == Ndis802_11AuthModeWPAPSK) { pAdapter->StaCfg.AuthMode = Ndis802_11AuthModeWPA; -#ifdef WPA_SUPPLICANT_SUPPORT pAdapter->StaCfg.IEEE8021X = FALSE; -#endif // WPA_SUPPLICANT_SUPPORT // } else if (pAdapter->StaCfg.AuthMode == Ndis802_11AuthModeWPA2PSK) { pAdapter->StaCfg.AuthMode = Ndis802_11AuthModeWPA2; -#ifdef WPA_SUPPLICANT_SUPPORT pAdapter->StaCfg.IEEE8021X = FALSE; -#endif // WPA_SUPPLICANT_SUPPORT // } -#ifdef WPA_SUPPLICANT_SUPPORT else // WEP 1x pAdapter->StaCfg.IEEE8021X = TRUE; -#endif // WPA_SUPPLICANT_SUPPORT // } else if (param->value == 0) { //pAdapter->StaCfg.PortSecured = WPA_802_1X_PORT_SECURED; STA_PORT_SECURED(pAdapter); } - DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_KEY_MGMT - param->value = %d!\n", __FUNCTION__, param->value)); + DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_KEY_MGMT - param->value = %d!\n", __func__, param->value)); break; case IW_AUTH_RX_UNENCRYPTED_EAPOL: break; @@ -2335,7 +2187,7 @@ int rt_ioctl_siwauth(struct net_device *dev, pAdapter->StaCfg.PairCipher = Ndis802_11WEPDisabled; pAdapter->StaCfg.GroupCipher = Ndis802_11WEPDisabled; }*/ - DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_PRIVACY_INVOKED - param->value = %d!\n", __FUNCTION__, param->value)); + DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_PRIVACY_INVOKED - param->value = %d!\n", __func__, param->value)); break; case IW_AUTH_DROP_UNENCRYPTED: if (param->value != 0) @@ -2345,7 +2197,7 @@ int rt_ioctl_siwauth(struct net_device *dev, //pAdapter->StaCfg.PortSecured = WPA_802_1X_PORT_SECURED; STA_PORT_SECURED(pAdapter); } - DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_WPA_VERSION - param->value = %d!\n", __FUNCTION__, param->value)); + DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_WPA_VERSION - param->value = %d!\n", __func__, param->value)); break; case IW_AUTH_80211_AUTH_ALG: if (param->value & IW_AUTH_ALG_SHARED_KEY) @@ -2358,10 +2210,10 @@ int rt_ioctl_siwauth(struct net_device *dev, } else return -EINVAL; - DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_80211_AUTH_ALG - param->value = %d!\n", __FUNCTION__, param->value)); + DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_80211_AUTH_ALG - param->value = %d!\n", __func__, param->value)); break; case IW_AUTH_WPA_ENABLED: - DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_WPA_ENABLED - Driver supports WPA!(param->value = %d)\n", __FUNCTION__, param->value)); + DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_AUTH_WPA_ENABLED - Driver supports WPA!(param->value = %d)\n", __func__, param->value)); break; default: return -EOPNOTSUPP; @@ -2469,7 +2321,7 @@ int rt_ioctl_siwencodeext(struct net_device *dev, pAdapter->SharedKey[BSS0][keyIdx].CipherAlg = CIPHER_NONE; AsicRemoveSharedKeyEntry(pAdapter, 0, (UCHAR)keyIdx); NdisZeroMemory(&pAdapter->SharedKey[BSS0][keyIdx], sizeof(CIPHER_KEY)); - DBGPRINT(RT_DEBUG_TRACE, ("%s::Remove all keys!(encoding->flags = %x)\n", __FUNCTION__, encoding->flags)); + DBGPRINT(RT_DEBUG_TRACE, ("%s::Remove all keys!(encoding->flags = %x)\n", __func__, encoding->flags)); } else { @@ -2481,15 +2333,15 @@ int rt_ioctl_siwencodeext(struct net_device *dev, if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) { pAdapter->StaCfg.DefaultKeyId = keyIdx; - DBGPRINT(RT_DEBUG_TRACE, ("%s::DefaultKeyId = %d\n", __FUNCTION__, pAdapter->StaCfg.DefaultKeyId)); + DBGPRINT(RT_DEBUG_TRACE, ("%s::DefaultKeyId = %d\n", __func__, pAdapter->StaCfg.DefaultKeyId)); } switch (alg) { case IW_ENCODE_ALG_NONE: - DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_ENCODE_ALG_NONE\n", __FUNCTION__)); + DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_ENCODE_ALG_NONE\n", __func__)); break; case IW_ENCODE_ALG_WEP: - DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_ENCODE_ALG_WEP - ext->key_len = %d, keyIdx = %d\n", __FUNCTION__, ext->key_len, keyIdx)); + DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_ENCODE_ALG_WEP - ext->key_len = %d, keyIdx = %d\n", __func__, ext->key_len, keyIdx)); if (ext->key_len == MAX_WEP_KEY_SIZE) { pAdapter->SharedKey[BSS0][keyIdx].KeyLen = MAX_WEP_KEY_SIZE; @@ -2507,7 +2359,7 @@ int rt_ioctl_siwencodeext(struct net_device *dev, NdisMoveMemory(pAdapter->SharedKey[BSS0][keyIdx].Key, ext->key, ext->key_len); break; case IW_ENCODE_ALG_TKIP: - DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_ENCODE_ALG_TKIP - keyIdx = %d, ext->key_len = %d\n", __FUNCTION__, keyIdx, ext->key_len)); + DBGPRINT(RT_DEBUG_TRACE, ("%s::IW_ENCODE_ALG_TKIP - keyIdx = %d, ext->key_len = %d\n", __func__, keyIdx, ext->key_len)); if (ext->key_len == 32) { if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) @@ -2679,7 +2531,6 @@ int rt_ioctl_giwgenie(struct net_device *dev, return 0; } -#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT #ifdef SIOCSIWGENIE if (pAd->StaCfg.WpaSupplicantUP == WPA_SUPPLICANT_ENABLE) { @@ -2691,7 +2542,6 @@ int rt_ioctl_giwgenie(struct net_device *dev, } else #endif // SIOCSIWGENIE // -#endif // NATIVE_WPA_SUPPLICANT_SUPPORT // { UCHAR RSNIe = IE_WPA; @@ -2830,13 +2680,6 @@ rt_private_ioctl_bbp(struct net_device *dev, struct iw_request_info *info, if (bbpId <= 138) // edit by johnli, RF power sequence setup, add BBP R138 for ADC dynamic on/off control #endif // RT30xx // { -#ifdef RALINK_ATE - if (ATE_ON(pAdapter)) - { - ATE_BBP_IO_READ8_BY_REG_ID(pAdapter, bbpId, ®BBP); - } - else -#endif // RALINK_ATE // { RTMP_BBP_IO_READ8_BY_REG_ID(pAdapter, bbpId, ®BBP); } @@ -2867,15 +2710,6 @@ rt_private_ioctl_bbp(struct net_device *dev, struct iw_request_info *info, if (bbpId <= 138) // edit by johnli, RF power sequence setup, add BBP R138 for ADC dynamic on/off control #endif // RT30xx // { -#ifdef RALINK_ATE - if (ATE_ON(pAdapter)) - { - ATE_BBP_IO_WRITE8_BY_REG_ID(pAdapter, bbpId, bbpValue); - //Read it back for showing - ATE_BBP_IO_READ8_BY_REG_ID(pAdapter, bbpId, ®BBP); - } - else -#endif // RALINK_ATE // { RTMP_BBP_IO_WRITE8_BY_REG_ID(pAdapter, bbpId, bbpValue); //Read it back for showing @@ -2915,13 +2749,6 @@ next: { if (strlen(extra) >= (IW_PRIV_SIZE_MASK - 10)) break; -#ifdef RALINK_ATE - if (ATE_ON(pAdapter)) - { - ATE_BBP_IO_READ8_BY_REG_ID(pAdapter, bbpId, ®BBP); - } - else -#endif // RALINK_ATE // RTMP_BBP_IO_READ8_BY_REG_ID(pAdapter, bbpId, ®BBP); /* sprintf(extra+strlen(extra), "R%02d[0x%02X]:%02X ", bbpId, bbpId*2, regBBP); @@ -2968,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 { @@ -2983,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)); } @@ -3033,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) @@ -3205,27 +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 // -#ifdef WPA_SUPPLICANT_SUPPORT PNDIS_802_11_PMKID pPmkId = NULL; BOOLEAN IEEE8021xState = FALSE; BOOLEAN IEEE8021x_required_keys = FALSE; UCHAR wpa_supplicant_enable = 0; -#endif // WPA_SUPPLICANT_SUPPORT // - -#ifdef SNMP_SUPPORT - TX_RTY_CFG_STRUC tx_rty_cfg; - ULONG ShortRetryLimit, LongRetryLimit; - UCHAR ctmp; -#endif // SNMP_SUPPORT // - -#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) { @@ -3245,21 +3052,12 @@ 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)); } break; case OID_802_11_BSSID_LIST_SCAN: - #ifdef RALINK_ATE - if (ATE_ON(pAdapter)) - { - DBGPRINT(RT_DEBUG_TRACE, ("The driver is in ATE mode now\n")); - break; - } -#endif // RALINK_ATE // Now = jiffies; DBGPRINT(RT_DEBUG_TRACE, ("Set::OID_802_11_BSSID_LIST_SCAN, TxCnt = %d \n", pAdapter->RalinkCounters.LastOneSecTotalTxCount)); @@ -3361,13 +3159,6 @@ INT RTMPSetInformation( } break; case OID_802_11_BSSID: -#ifdef RALINK_ATE - if (ATE_ON(pAdapter)) - { - DBGPRINT(RT_DEBUG_TRACE, ("The driver is in ATE mode now\n")); - break; - } -#endif // RALINK_ATE // if (wrq->u.data.length != sizeof(NDIS_802_11_MAC_ADDRESS)) Status = -EINVAL; else @@ -3439,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)); } @@ -3719,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; @@ -3866,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; @@ -3885,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; @@ -3926,62 +3713,7 @@ INT RTMPSetInformation( DBGPRINT(RT_DEBUG_TRACE, ("Set::RT_OID_802_11_SET_APSD_PSM (bAPSDForcePowerSave:%d)\n", pAdapter->CommonCfg.bAPSDForcePowerSave)); } break; -#ifdef QOS_DLS_SUPPORT - case RT_OID_802_11_SET_DLS: - if (wrq->u.data.length != sizeof(ULONG)) - Status = -EINVAL; - else - { - BOOLEAN oldvalue = pAdapter->CommonCfg.bDLSCapable; - Status = copy_from_user(&pAdapter->CommonCfg.bDLSCapable, wrq->u.data.pointer, wrq->u.data.length); - if (oldvalue && !pAdapter->CommonCfg.bDLSCapable) - { - int i; - // tear down local dls table entry - for (i=0; iStaCfg.DLSEntry[i].Valid && (pAdapter->StaCfg.DLSEntry[i].Status == DLS_FINISH)) - { - pAdapter->StaCfg.DLSEntry[i].Status = DLS_NONE; - pAdapter->StaCfg.DLSEntry[i].Valid = FALSE; - RTMPSendDLSTearDownFrame(pAdapter, pAdapter->StaCfg.DLSEntry[i].MacAddr); - } - } - - // tear down peer dls table entry - for (i=MAX_NUM_OF_INIT_DLS_ENTRY; iStaCfg.DLSEntry[i].Valid && (pAdapter->StaCfg.DLSEntry[i].Status == DLS_FINISH)) - { - pAdapter->StaCfg.DLSEntry[i].Status = DLS_NONE; - pAdapter->StaCfg.DLSEntry[i].Valid = FALSE; - RTMPSendDLSTearDownFrame(pAdapter, pAdapter->StaCfg.DLSEntry[i].MacAddr); - } - } - } - - DBGPRINT(RT_DEBUG_TRACE,("Set::RT_OID_802_11_SET_DLS (=%d)\n", pAdapter->CommonCfg.bDLSCapable)); - } - break; - case RT_OID_802_11_SET_DLS_PARAM: - if (wrq->u.data.length != sizeof(RT_802_11_DLS_UI)) - Status = -EINVAL; - else - { - RT_802_11_DLS Dls; - - NdisZeroMemory(&Dls, sizeof(RT_802_11_DLS)); - RTMPMoveMemory(&Dls, wrq->u.data.pointer, sizeof(RT_802_11_DLS_UI)); - MlmeEnqueue(pAdapter, - MLME_CNTL_STATE_MACHINE, - RT_OID_802_11_SET_DLS_PARAM, - sizeof(RT_802_11_DLS), - &Dls); - DBGPRINT(RT_DEBUG_TRACE,("Set::RT_OID_802_11_SET_DLS_PARAM \n")); - } - break; -#endif // QOS_DLS_SUPPORT // case RT_OID_802_11_SET_WMM: if (wrq->u.data.length != sizeof(BOOLEAN)) Status = -EINVAL; @@ -3993,13 +3725,6 @@ INT RTMPSetInformation( break; case OID_802_11_DISASSOCIATE: -#ifdef RALINK_ATE - if (ATE_ON(pAdapter)) - { - DBGPRINT(RT_DEBUG_TRACE, ("The driver is in ATE mode now\n")); - break; - } -#endif // RALINK_ATE // // // Set NdisRadioStateOff to TRUE, instead of called MlmeRadioOff. // Later on, NDIS_802_11_BSSID_LIST_EX->NumberOfItems should be 0 @@ -4030,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; @@ -4186,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); @@ -4241,20 +3962,16 @@ INT RTMPSetInformation( // Default key for tx (shared key) if (pWepKey->KeyIndex & 0x80000000) { -#ifdef WPA_SUPPLICANT_SUPPORT // set key material and key length NdisZeroMemory(pAdapter->StaCfg.DesireSharedKey[KeyIdx].Key, 16); pAdapter->StaCfg.DesireSharedKey[KeyIdx].KeyLen = (UCHAR) pWepKey->KeyLength; NdisMoveMemory(pAdapter->StaCfg.DesireSharedKey[KeyIdx].Key, &pWepKey->KeyMaterial, pWepKey->KeyLength); pAdapter->StaCfg.DesireSharedKeyId = KeyIdx; pAdapter->StaCfg.DesireSharedKey[KeyIdx].CipherAlg = CipherAlg; -#endif // WPA_SUPPLICANT_SUPPORT // pAdapter->StaCfg.DefaultKeyId = (UCHAR) KeyIdx; } -#ifdef WPA_SUPPLICANT_SUPPORT if (pAdapter->StaCfg.PortSecured == WPA_802_1X_PORT_SECURED) -#endif // WPA_SUPPLICANT_SUPPORT { Key = pAdapter->SharedKey[BSS0][KeyIdx].Key; @@ -4275,7 +3992,6 @@ INT RTMPSetInformation( } kfree(pWepKey); break; -#ifdef WPA_SUPPLICANT_SUPPORT case OID_SET_COUNTERMEASURES: if (wrq->u.data.length != sizeof(int)) Status = -EINVAL; @@ -4409,95 +4125,6 @@ INT RTMPSetInformation( if(pPmkId) kfree(pPmkId); break; -#endif // WPA_SUPPLICANT_SUPPORT // - - - -#ifdef SNMP_SUPPORT - case OID_802_11_SHORTRETRYLIMIT: - if (wrq->u.data.length != sizeof(ULONG)) - Status = -EINVAL; - else - { - Status = copy_from_user(&ShortRetryLimit, wrq->u.data.pointer, wrq->u.data.length); - RTMP_IO_READ32(pAdapter, TX_RTY_CFG, &tx_rty_cfg.word); - tx_rty_cfg.field.ShortRtyLimit = ShortRetryLimit; - RTMP_IO_WRITE32(pAdapter, TX_RTY_CFG, tx_rty_cfg.word); - DBGPRINT(RT_DEBUG_TRACE, ("Set::OID_802_11_SHORTRETRYLIMIT (tx_rty_cfg.field.ShortRetryLimit=%d, ShortRetryLimit=%ld)\n", tx_rty_cfg.field.ShortRtyLimit, ShortRetryLimit)); - } - break; - - case OID_802_11_LONGRETRYLIMIT: - DBGPRINT(RT_DEBUG_TRACE, ("Set::OID_802_11_LONGRETRYLIMIT \n")); - if (wrq->u.data.length != sizeof(ULONG)) - Status = -EINVAL; - else - { - Status = copy_from_user(&LongRetryLimit, wrq->u.data.pointer, wrq->u.data.length); - RTMP_IO_READ32(pAdapter, TX_RTY_CFG, &tx_rty_cfg.word); - tx_rty_cfg.field.LongRtyLimit = LongRetryLimit; - RTMP_IO_WRITE32(pAdapter, TX_RTY_CFG, tx_rty_cfg.word); - DBGPRINT(RT_DEBUG_TRACE, ("Set::OID_802_11_LONGRETRYLIMIT (tx_rty_cfg.field.LongRetryLimit= %d,LongRetryLimit=%ld)\n", tx_rty_cfg.field.LongRtyLimit, LongRetryLimit)); - } - break; - - case OID_802_11_WEPDEFAULTKEYVALUE: - DBGPRINT(RT_DEBUG_TRACE, ("Set::OID_802_11_WEPDEFAULTKEYVALUE\n")); - pKey = kmalloc(wrq->u.data.length, GFP_KERNEL); - Status = copy_from_user(pKey, wrq->u.data.pointer, wrq->u.data.length); - //pKey = &WepKey; - - if ( pKey->Length != wrq->u.data.length) - { - Status = -EINVAL; - DBGPRINT(RT_DEBUG_TRACE, ("Set::OID_802_11_WEPDEFAULTKEYVALUE, Failed!!\n")); - } - KeyIdx = pKey->KeyIndex & 0x0fffffff; - DBGPRINT(RT_DEBUG_TRACE,("pKey->KeyIndex =%d, pKey->KeyLength=%d\n", pKey->KeyIndex, pKey->KeyLength)); - - // it is a shared key - if (KeyIdx > 4) - Status = -EINVAL; - else - { - pAdapter->SharedKey[BSS0][pAdapter->StaCfg.DefaultKeyId].KeyLen = (UCHAR) pKey->KeyLength; - NdisMoveMemory(&pAdapter->SharedKey[BSS0][pAdapter->StaCfg.DefaultKeyId].Key, &pKey->KeyMaterial, pKey->KeyLength); - if (pKey->KeyIndex & 0x80000000) - { - // Default key for tx (shared key) - pAdapter->StaCfg.DefaultKeyId = (UCHAR) KeyIdx; - } - //RestartAPIsRequired = TRUE; - } - break; - - - case OID_802_11_WEPDEFAULTKEYID: - DBGPRINT(RT_DEBUG_TRACE, ("Set::OID_802_11_WEPDEFAULTKEYID \n")); - - if (wrq->u.data.length != sizeof(UCHAR)) - Status = -EINVAL; - else - Status = copy_from_user(&pAdapter->StaCfg.DefaultKeyId, wrq->u.data.pointer, wrq->u.data.length); - - break; - - - case OID_802_11_CURRENTCHANNEL: - DBGPRINT(RT_DEBUG_TRACE, ("Set::OID_802_11_CURRENTCHANNEL \n")); - if (wrq->u.data.length != sizeof(UCHAR)) - Status = -EINVAL; - else - { - Status = copy_from_user(&ctmp, wrq->u.data.pointer, wrq->u.data.length); - sprintf(&ctmp,"%d", ctmp); - Set_Channel_Proc(pAdapter, &ctmp); - } - break; -#endif - - - default: DBGPRINT(RT_DEBUG_TRACE, ("Set::unknown IOCTL's subcmd = 0x%08x\n", cmd)); Status = -EOPNOTSUPP; @@ -4539,16 +4166,6 @@ INT RTMPQueryInformation( UCHAR driverVersion[8]; OID_SET_HT_PHYMODE *pHTPhyMode = NULL; - -#ifdef SNMP_SUPPORT - //for snmp, kathy - DefaultKeyIdxValue *pKeyIdxValue; - INT valueLen; - TX_RTY_CFG_STRUC tx_rty_cfg; - ULONG ShortRetryLimit, LongRetryLimit; - UCHAR tmp[64]; -#endif //SNMP - switch(cmd) { case RT_OID_DEVICE_NAME: @@ -4565,16 +4182,6 @@ INT RTMPQueryInformation( Status = -EFAULT; } break; -#ifdef RALINK_ATE - case RT_QUERY_ATE_TXDONE_COUNT: - DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_QUERY_ATE_TXDONE_COUNT \n")); - wrq->u.data.length = sizeof(UINT32); - if (copy_to_user(wrq->u.data.pointer, &pAdapter->ate.TxDoneCount, wrq->u.data.length)) - { - Status = -EFAULT; - } - break; -#endif // RALINK_ATE // case OID_802_11_BSSID_LIST: if (RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS)) { @@ -4716,14 +4323,6 @@ INT RTMPQueryInformation( Status = copy_to_user(wrq->u.data.pointer, &MediaState, wrq->u.data.length); break; case OID_802_11_BSSID: -#ifdef RALINK_ATE - if (ATE_ON(pAdapter)) - { - DBGPRINT(RT_DEBUG_TRACE, ("The driver is in ATE mode now\n")); - Status = NDIS_STATUS_RESOURCES; - break; - } -#endif // RALINK_ATE // if (INFRA_ON(pAdapter) || ADHOC_ON(pAdapter)) { Status = copy_to_user(wrq->u.data.pointer, &pAdapter->CommonCfg.Bssid, sizeof(NDIS_802_11_MAC_ADDRESS)); @@ -5061,7 +4660,6 @@ INT RTMPQueryInformation( Status = copy_to_user(wrq->u.data.pointer, &pAdapter->CommonCfg.bWmmCapable, wrq->u.data.length); DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_OID_802_11_QUERY_WMM (=%d)\n", pAdapter->CommonCfg.bWmmCapable)); break; -#ifdef WPA_SUPPLICANT_SUPPORT case RT_OID_NEW_DRIVER: { UCHAR enabled = 1; @@ -5075,8 +4673,6 @@ INT RTMPQueryInformation( Status = copy_to_user(wrq->u.data.pointer, &pAdapter->StaCfg.WpaSupplicantUP, wrq->u.data.length); DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_OID_WPA_SUPPLICANT_SUPPORT (=%d)\n", pAdapter->StaCfg.WpaSupplicantUP)); break; -#endif // WPA_SUPPLICANT_SUPPORT // - case RT_OID_DRIVER_DEVICE_NAME: DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_OID_DRIVER_DEVICE_NAME \n")); wrq->u.data.length = 16; @@ -5151,149 +4747,20 @@ INT RTMPQueryInformation( case RT_OID_QUERY_MULTIPLE_CARD_SUPPORT: wrq->u.data.length = sizeof(UCHAR); i = 0; -#ifdef MULTIPLE_CARD_SUPPORT - i = 1; -#endif // MULTIPLE_CARD_SUPPORT // if (copy_to_user(wrq->u.data.pointer, &i, wrq->u.data.length)) { Status = -EFAULT; } DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_OID_QUERY_MULTIPLE_CARD_SUPPORT(=%d) \n", i)); break; -#ifdef SNMP_SUPPORT - case RT_OID_802_11_MAC_ADDRESS: - wrq->u.data.length = MAC_ADDR_LEN; - Status = copy_to_user(wrq->u.data.pointer, &pAdapter->CurrentAddress, wrq->u.data.length); - break; - - case RT_OID_802_11_MANUFACTUREROUI: - DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_OID_802_11_MANUFACTUREROUI \n")); - wrq->u.data.length = ManufacturerOUI_LEN; - Status = copy_to_user(wrq->u.data.pointer, &pAdapter->CurrentAddress, wrq->u.data.length); - break; - - case RT_OID_802_11_MANUFACTURERNAME: - DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_OID_802_11_MANUFACTURERNAME \n")); - wrq->u.data.length = strlen(ManufacturerNAME); - Status = copy_to_user(wrq->u.data.pointer, ManufacturerNAME, wrq->u.data.length); - break; - - case RT_OID_802_11_RESOURCETYPEIDNAME: - DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_OID_802_11_RESOURCETYPEIDNAME \n")); - wrq->u.data.length = strlen(ResourceTypeIdName); - Status = copy_to_user(wrq->u.data.pointer, ResourceTypeIdName, wrq->u.data.length); - break; - - case RT_OID_802_11_PRIVACYOPTIONIMPLEMENTED: - DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_OID_802_11_PRIVACYOPTIONIMPLEMENTED \n")); - ulInfo = 1; // 1 is support wep else 2 is not support. - wrq->u.data.length = sizeof(ulInfo); - Status = copy_to_user(wrq->u.data.pointer, &ulInfo, wrq->u.data.length); - break; - - case RT_OID_802_11_POWERMANAGEMENTMODE: - DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_OID_802_11_POWERMANAGEMENTMODE \n")); - if (pAdapter->StaCfg.Psm == PSMP_ACTION) - ulInfo = 1; // 1 is power active else 2 is power save. - else - ulInfo = 2; - - wrq->u.data.length = sizeof(ulInfo); - Status = copy_to_user(wrq->u.data.pointer, &ulInfo, wrq->u.data.length); - break; - - case OID_802_11_WEPDEFAULTKEYVALUE: - DBGPRINT(RT_DEBUG_TRACE, ("Query::OID_802_11_WEPDEFAULTKEYVALUE \n")); - //KeyIdxValue.KeyIdx = pAd->PortCfg.MBSSID[pAd->IoctlIF].DefaultKeyId; - pKeyIdxValue = wrq->u.data.pointer; - DBGPRINT(RT_DEBUG_TRACE,("KeyIdxValue.KeyIdx = %d, \n",pKeyIdxValue->KeyIdx)); - valueLen = pAdapter->SharedKey[BSS0][pAdapter->StaCfg.DefaultKeyId].KeyLen; - NdisMoveMemory(pKeyIdxValue->Value, - &pAdapter->SharedKey[BSS0][pAdapter->StaCfg.DefaultKeyId].Key, - valueLen); - pKeyIdxValue->Value[valueLen]='\0'; - - wrq->u.data.length = sizeof(DefaultKeyIdxValue); - - Status = copy_to_user(wrq->u.data.pointer, pKeyIdxValue, wrq->u.data.length); - DBGPRINT(RT_DEBUG_TRACE,("DefaultKeyId = %d, total len = %d, str len=%d, KeyValue= %02x %02x %02x %02x \n", pAdapter->StaCfg.DefaultKeyId, wrq->u.data.length, pAdapter->SharedKey[BSS0][pAdapter->StaCfg.DefaultKeyId].KeyLen, - pAdapter->SharedKey[BSS0][0].Key[0], - pAdapter->SharedKey[BSS0][1].Key[0], - pAdapter->SharedKey[BSS0][2].Key[0], - pAdapter->SharedKey[BSS0][3].Key[0])); - break; - - case OID_802_11_WEPDEFAULTKEYID: - DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_OID_802_11_WEPDEFAULTKEYID \n")); - wrq->u.data.length = sizeof(UCHAR); - Status = copy_to_user(wrq->u.data.pointer, &pAdapter->StaCfg.DefaultKeyId, wrq->u.data.length); - DBGPRINT(RT_DEBUG_TRACE, ("DefaultKeyId =%d \n", pAdapter->StaCfg.DefaultKeyId)); - break; - - case RT_OID_802_11_WEPKEYMAPPINGLENGTH: - DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_OID_802_11_WEPKEYMAPPINGLENGTH \n")); - wrq->u.data.length = sizeof(UCHAR); - Status = copy_to_user(wrq->u.data.pointer, - &pAdapter->SharedKey[BSS0][pAdapter->StaCfg.DefaultKeyId].KeyLen, - wrq->u.data.length); - break; - - case OID_802_11_SHORTRETRYLIMIT: - DBGPRINT(RT_DEBUG_TRACE, ("Query::OID_802_11_SHORTRETRYLIMIT \n")); - wrq->u.data.length = sizeof(ULONG); - RTMP_IO_READ32(pAdapter, TX_RTY_CFG, &tx_rty_cfg.word); - ShortRetryLimit = tx_rty_cfg.field.ShortRtyLimit; - DBGPRINT(RT_DEBUG_TRACE, ("ShortRetryLimit =%ld, tx_rty_cfg.field.ShortRetryLimit=%d\n", ShortRetryLimit, tx_rty_cfg.field.ShortRtyLimit)); - Status = copy_to_user(wrq->u.data.pointer, &ShortRetryLimit, wrq->u.data.length); - break; - - case OID_802_11_LONGRETRYLIMIT: - DBGPRINT(RT_DEBUG_TRACE, ("Query::OID_802_11_LONGRETRYLIMIT \n")); - wrq->u.data.length = sizeof(ULONG); - RTMP_IO_READ32(pAdapter, TX_RTY_CFG, &tx_rty_cfg.word); - LongRetryLimit = tx_rty_cfg.field.LongRtyLimit; - DBGPRINT(RT_DEBUG_TRACE, ("LongRetryLimit =%ld, tx_rty_cfg.field.LongRtyLimit=%d\n", LongRetryLimit, tx_rty_cfg.field.LongRtyLimit)); - Status = copy_to_user(wrq->u.data.pointer, &LongRetryLimit, wrq->u.data.length); - break; - - case RT_OID_802_11_PRODUCTID: - DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_OID_802_11_PRODUCTID \n")); - -#ifdef RT2870 - sprintf(tmp, "%04x %04x\n", ((POS_COOKIE)pAdapter->OS_Cookie)->pUsb_Dev->descriptor.idVendor ,((POS_COOKIE)pAdapter->OS_Cookie)->pUsb_Dev->descriptor.idProduct); - -#endif // RT2870 // - wrq->u.data.length = strlen(tmp); - Status = copy_to_user(wrq->u.data.pointer, tmp, wrq->u.data.length); - break; - - case RT_OID_802_11_MANUFACTUREID: - DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_OID_802_11_MANUFACTUREID \n")); - wrq->u.data.length = strlen(ManufacturerNAME); - Status = copy_to_user(wrq->u.data.pointer, ManufacturerNAME, wrq->u.data.length); - break; - - case OID_802_11_CURRENTCHANNEL: - DBGPRINT(RT_DEBUG_TRACE, ("Query::OID_802_11_CURRENTCHANNEL \n")); - wrq->u.data.length = sizeof(UCHAR); - DBGPRINT(RT_DEBUG_TRACE, ("sizeof UCHAR=%d, channel=%d \n", sizeof(UCHAR), pAdapter->CommonCfg.Channel)); - Status = copy_to_user(wrq->u.data.pointer, &pAdapter->CommonCfg.Channel, wrq->u.data.length); - DBGPRINT(RT_DEBUG_TRACE, ("Status=%d\n", Status)); - break; -#endif //SNMP_SUPPORT case OID_802_11_BUILD_CHANNEL_EX: { UCHAR value; DBGPRINT(RT_DEBUG_TRACE, ("Query::OID_802_11_BUILD_CHANNEL_EX \n")); wrq->u.data.length = sizeof(UCHAR); -#ifdef EXT_BUILD_CHANNEL_LIST - DBGPRINT(RT_DEBUG_TRACE, ("Support EXT_BUILD_CHANNEL_LIST.\n")); - value = 1; -#else DBGPRINT(RT_DEBUG_TRACE, ("Doesn't support EXT_BUILD_CHANNEL_LIST.\n")); value = 0; -#endif // EXT_BUILD_CHANNEL_LIST // Status = copy_to_user(wrq->u.data.pointer, &value, 1); DBGPRINT(RT_DEBUG_TRACE, ("Status=%d\n", Status)); } @@ -5344,35 +4811,6 @@ INT RTMPQueryInformation( DBGPRINT(RT_DEBUG_TRACE, ("Status=%d\n", Status)); break; - -#ifdef QOS_DLS_SUPPORT - case RT_OID_802_11_QUERY_DLS: - wrq->u.data.length = sizeof(BOOLEAN); - Status = copy_to_user(wrq->u.data.pointer, &pAdapter->CommonCfg.bDLSCapable, wrq->u.data.length); - DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_OID_802_11_QUERY_DLS(=%d)\n", pAdapter->CommonCfg.bDLSCapable)); - break; - - case RT_OID_802_11_QUERY_DLS_PARAM: - { - PRT_802_11_DLS_INFO pDlsInfo = kmalloc(sizeof(RT_802_11_DLS_INFO), GFP_ATOMIC); - if (pDlsInfo == NULL) - break; - - for (i=0; iEntry[i], &pAdapter->StaCfg.DLSEntry[i], sizeof(RT_802_11_DLS_UI)); - } - - pDlsInfo->num = MAX_NUM_OF_DLS_ENTRY; - wrq->u.data.length = sizeof(RT_802_11_DLS_INFO); - Status = copy_to_user(wrq->u.data.pointer, pDlsInfo, wrq->u.data.length); - DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_OID_802_11_QUERY_DLS_PARAM\n")); - - if (pDlsInfo) - kfree(pDlsInfo); - } - break; -#endif // QOS_DLS_SUPPORT // default: DBGPRINT(RT_DEBUG_TRACE, ("Query::unknown IOCTL's subcmd = 0x%08x\n", cmd)); Status = -EOPNOTSUPP; @@ -5415,14 +4853,6 @@ INT rt28xx_sta_ioctl( //check if the interface is down if(!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_IN_USE)) { -#ifdef CONFIG_APSTA_MIXED_SUPPORT - if (wrq->u.data.pointer == NULL) - { - return Status; - } - - if (strstr(wrq->u.data.pointer, "OpMode") == NULL) -#endif // CONFIG_APSTA_MIXED_SUPPORT // { DBGPRINT(RT_DEBUG_TRACE, ("INFO::Network is down!\n")); return -ENETDOWN; @@ -5436,15 +4866,6 @@ INT rt28xx_sta_ioctl( switch(cmd) { -#ifdef RALINK_ATE -#ifdef RALINK_28xx_QA - case RTPRIV_IOCTL_ATE: - { - RtmpDoAte(pAd, wrq); - } - break; -#endif // RALINK_28xx_QA // -#endif // RALINK_ATE // case SIOCGIFHWADDR: DBGPRINT(RT_DEBUG_TRACE, ("IOCTL::SIOCGIFHWADDR\n")); memcpy(wrq->u.name, pAd->CurrentAddress, ETH_ALEN); @@ -5817,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) @@ -5880,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); @@ -5941,12 +5356,10 @@ INT Set_AuthMode_Proc( pAdapter->StaCfg.AuthMode = Ndis802_11AuthModeWPANone; else if ((strcmp(arg, "WPA2PSK") == 0) || (strcmp(arg, "wpa2psk") == 0)) pAdapter->StaCfg.AuthMode = Ndis802_11AuthModeWPA2PSK; -#ifdef WPA_SUPPLICANT_SUPPORT else if ((strcmp(arg, "WPA") == 0) || (strcmp(arg, "wpa") == 0)) pAdapter->StaCfg.AuthMode = Ndis802_11AuthModeWPA; else if ((strcmp(arg, "WPA2") == 0) || (strcmp(arg, "wpa2") == 0)) pAdapter->StaCfg.AuthMode = Ndis802_11AuthModeWPA2; -#endif // WPA_SUPPLICANT_SUPPORT // else return FALSE; @@ -6488,7 +5901,6 @@ INT Set_PSMode_Proc( return TRUE; } -#ifdef WPA_SUPPLICANT_SUPPORT /* ========================================================================== Description: @@ -6519,7 +5931,6 @@ INT Set_Wpa_Support( return TRUE; } -#endif // WPA_SUPPLICANT_SUPPORT // #ifdef DBG /* @@ -6676,13 +6087,6 @@ VOID RTMPIoctlMAC( UCHAR R66; pAdapter->BbpTuning.bEnable = FALSE; R66 = 0x26 + GET_LNA_GAIN(pAdapter); -#ifdef RALINK_ATE - if (ATE_ON(pAdapter)) - { - ATE_BBP_IO_WRITE8_BY_REG_ID(pAdapter, BBP_R66, (0x26 + GET_LNA_GAIN(pAdapter))); - } - else -#endif // RALINK_ATE // RTMP_BBP_IO_WRITE8_BY_REG_ID(pAdapter, BBP_R66, (0x26 + GET_LNA_GAIN(pAdapter))); DBGPRINT(RT_DEBUG_TRACE,("turn off R17 tuning, restore to 0x%02x\n", R66)); } @@ -6712,7 +6116,7 @@ next: file_w = filp_open(fileName, O_WRONLY|O_CREAT, 0); if (IS_ERR(file_w)) { - DBGPRINT(RT_DEBUG_TRACE, ("-->2) %s: Error %ld opening %s\n", __FUNCTION__, -PTR_ERR(file_w), fileName)); + DBGPRINT(RT_DEBUG_TRACE, ("-->2) %s: Error %ld opening %s\n", __func__, -PTR_ERR(file_w), fileName)); } else { @@ -6908,7 +6312,7 @@ next: file_w = filp_open(fileName, O_WRONLY|O_CREAT, 0); if (IS_ERR(file_w)) { - DBGPRINT(RT_DEBUG_TRACE, ("-->2) %s: Error %ld opening %s\n", __FUNCTION__, -PTR_ERR(file_w), fileName)); + DBGPRINT(RT_DEBUG_TRACE, ("-->2) %s: Error %ld opening %s\n", __func__, -PTR_ERR(file_w), fileName)); } else { @@ -7001,13 +6405,6 @@ VOID RTMPIoctlRF( // In RT2860 ATE mode, we do not load 8051 firmware. //We must access RF directly. // For RT2870 ATE mode, ATE_RF_IO_WRITE8(/READ8)_BY_REG_ID are redefined. -#ifdef RALINK_ATE - if (ATE_ON(pAdapter)) - { - ATE_RF_IO_READ8_BY_REG_ID(pAdapter, rfId, ®RF); - } - else -#endif // RALINK_ATE // // according to Andy, Gary, David require. // the command rf shall read rf register directly for dubug. // BBP_IO_READ8_BY_REG_ID(pAdapter, bbpId, ®BBP); @@ -7036,17 +6433,6 @@ VOID RTMPIoctlRF( // In RT2860 ATE mode, we do not load 8051 firmware. // We should access RF registers directly. // For RT2870 ATE mode, ATE_RF_IO_WRITE8/READ8_BY_REG_ID are redefined. -#ifdef RALINK_ATE - if (ATE_ON(pAdapter)) - { - ATE_RF_IO_READ8_BY_REG_ID(pAdapter, rfId, ®RF); - ATE_RF_IO_WRITE8_BY_REG_ID(pAdapter, (UCHAR)rfId,(UCHAR) rfValue); - //Read it back for showing - ATE_RF_IO_READ8_BY_REG_ID(pAdapter, rfId, ®RF); - sprintf(msg+strlen(msg), "R%02d[0x%02X]:%02X\n", rfId, rfId*2, regRF); - } - else -#endif // RALINK_ATE // { // according to Andy, Gary, David require. // the command RF shall read/write RF register directly for dubug. @@ -7080,17 +6466,6 @@ next: sprintf(msg, "\n"); for (rfId = 0; rfId <= 31; rfId++) { - // In RT2860 ATE mode, we do not load 8051 firmware. - // We should access RF registers directly. - // For RT2870 ATE mode, ATE_RF_IO_WRITE8/READ8_BY_REG_ID are redefined. -#ifdef RALINK_ATE - if (ATE_ON(pAdapter)) - { - ATE_RF_IO_READ8_BY_REG_ID(pAdapter, rfId, ®RF); - } - else -#endif // RALINK_ATE // - // according to Andy, Gary, David require. // the command RF shall read/write RF register directly for dubug. RT30xxReadRFRegister(pAdapter, rfId, ®RF); @@ -7101,7 +6476,7 @@ next: wrq->u.data.length = strlen(msg); if (copy_to_user(wrq->u.data.pointer, msg, wrq->u.data.length)) { - DBGPRINT(RT_DEBUG_TRACE, ("%s: copy_to_user() fail\n", __FUNCTION__)); + DBGPRINT(RT_DEBUG_TRACE, ("%s: copy_to_user() fail\n", __func__)); } } else @@ -7166,38 +6541,3 @@ INT Set_ShortRetryLimit_Proc( DBGPRINT(RT_DEBUG_TRACE, ("IF Set_ShortRetryLimit_Proc::(tx_rty_cfg=0x%x)\n", tx_rty_cfg.word)); return TRUE; } - -#ifdef EXT_BUILD_CHANNEL_LIST -INT Set_Ieee80211dClientMode_Proc( - IN PRTMP_ADAPTER pAdapter, - IN PUCHAR arg) -{ - if (simple_strtol(arg, 0, 10) == 0) - pAdapter->StaCfg.IEEE80211dClientMode = Rt802_11_D_None; - else if (simple_strtol(arg, 0, 10) == 1) - pAdapter->StaCfg.IEEE80211dClientMode = Rt802_11_D_Flexible; - else if (simple_strtol(arg, 0, 10) == 2) - pAdapter->StaCfg.IEEE80211dClientMode = Rt802_11_D_Strict; - else - return FALSE; - - DBGPRINT(RT_DEBUG_TRACE, ("Set_Ieee802dMode_Proc::(IEEEE0211dMode=%d)\n", pAdapter->StaCfg.IEEE80211dClientMode)); - return TRUE; -} -#endif // EXT_BUILD_CHANNEL_LIST // - -#ifdef CARRIER_DETECTION_SUPPORT -INT Set_CarrierDetect_Proc( - IN PRTMP_ADAPTER pAd, - IN PUCHAR arg) -{ - if (simple_strtol(arg, 0, 10) == 0) - pAd->CommonCfg.CarrierDetect.Enable = FALSE; - else - pAd->CommonCfg.CarrierDetect.Enable = TRUE; - - DBGPRINT(RT_DEBUG_TRACE, ("IF Set_CarrierDetect_Proc::(CarrierDetect.Enable=%d)\n", pAd->CommonCfg.CarrierDetect.Enable)); - return TRUE; -} -#endif // CARRIER_DETECTION_SUPPORT // -