diff options
Diffstat (limited to 'drivers/staging/vt6655/iwctl.c')
-rw-r--r-- | drivers/staging/vt6655/iwctl.c | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c index 3e59026..9de698e 100644 --- a/drivers/staging/vt6655/iwctl.c +++ b/drivers/staging/vt6655/iwctl.c @@ -64,14 +64,11 @@ static const long frequency_list[] = { 5700, 5745, 5765, 5785, 5805, 5825 }; - /*--------------------- Static Classes ----------------------------*/ - //static int msglevel =MSG_LEVEL_DEBUG; static int msglevel = MSG_LEVEL_INFO; - /*--------------------- Static Variables --------------------------*/ /*--------------------- Static Functions --------------------------*/ @@ -105,11 +102,8 @@ struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev) return &pDevice->wstats; } - - /*------------------------------------------------------------------*/ - static int iwctl_commit(struct net_device *dev, struct iw_request_info *info, void *wrq, @@ -118,7 +112,6 @@ static int iwctl_commit(struct net_device *dev, DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWCOMMIT \n"); return 0; - } /* * Wireless Handler : get protocol name @@ -149,7 +142,6 @@ int iwctl_siwscan(struct net_device *dev, PWLAN_IE_SSID pItemSSID = NULL; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWSCAN \n"); - if (pDevice->byReAssocCount > 0) { //reject scan when re-associating! //send scan event to wpa_Supplicant union iwreq_data wrqu; @@ -195,7 +187,6 @@ int iwctl_siwscan(struct net_device *dev, return 0; } - /* * Wireless Handler : get scan results */ @@ -218,7 +209,6 @@ int iwctl_giwscan(struct net_device *dev, long ldBm; char buf[MAX_WPA_IE_LEN * 2 + 30]; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSCAN \n"); if (pMgmt->eScanState == WMAC_IS_SCANNING) { @@ -348,10 +338,8 @@ int iwctl_giwscan(struct net_device *dev, wrq->length = current_ev - extra; return 0; - } - /* * Wireless Handler : set frequency or channel */ @@ -449,7 +437,6 @@ int iwctl_siwmode(struct net_device *dev, } switch (*wmode) { - case IW_MODE_ADHOC: if (pMgmt->eConfigMode != WMAC_CONFIG_IBSS_STA) { pMgmt->eConfigMode = WMAC_CONFIG_IBSS_STA; @@ -507,7 +494,6 @@ int iwctl_giwmode(struct net_device *dev, PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWMODE \n"); // If not managed, assume it's ad-hoc switch (pMgmt->eConfigMode) { @@ -530,7 +516,6 @@ int iwctl_giwmode(struct net_device *dev, return 0; } - /* * Wireless Handler : get capability range */ @@ -544,7 +529,6 @@ int iwctl_giwrange(struct net_device *dev, int i, k; unsigned char abySupportedRates[13] = {0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90}; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRANGE \n"); if (wrq->pointer) { wrq->length = sizeof(struct iw_range); @@ -591,7 +575,6 @@ int iwctl_giwrange(struct net_device *dev, range->min_frag = 256; range->max_frag = 2312; - // the encoding capabilities range->num_encoding_sizes = 3; // 64(40) bits WEP @@ -636,11 +619,9 @@ int iwctl_giwrange(struct net_device *dev, range->avg_qual.noise = 0; } - return 0; } - /* * Wireless Handler : set ap mac address */ @@ -711,7 +692,6 @@ int iwctl_giwap(struct net_device *dev, PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWAP \n"); memcpy(wrq->sa_data, pMgmt->abyCurrBSSID, 6); @@ -726,10 +706,8 @@ int iwctl_giwap(struct net_device *dev, wrq->sa_family = ARPHRD_ETHER; return 0; - } - /* * Wireless Handler : get ap list */ @@ -745,7 +723,6 @@ int iwctl_giwaplist(struct net_device *dev, PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWAPLIST \n"); // Only super-user can see AP list @@ -755,7 +732,6 @@ int iwctl_giwaplist(struct net_device *dev, } if (wrq->pointer) { - PKnownBSS pBSS = &(pMgmt->sBSSList[0]); for (ii = 0, jj = 0; ii < MAX_BSS_NUM; ii++) { @@ -781,7 +757,6 @@ int iwctl_giwaplist(struct net_device *dev, return rc; } - /* * Wireless Handler : set essid */ @@ -797,7 +772,6 @@ int iwctl_siwessid(struct net_device *dev, //2008-0409-05, <Add> by Einsn Liu unsigned char len; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWESSID \n"); pDevice->fWPA_Authened = false; if (pMgmt->eScanState == WMAC_IS_SCANNING) { @@ -890,11 +864,9 @@ int iwctl_siwessid(struct net_device *dev, pDevice->bCommit = true; } - return 0; } - /* * Wireless Handler : get essid */ @@ -904,7 +876,6 @@ int iwctl_giwessid(struct net_device *dev, struct iw_point *wrq, char *extra) { - PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PWLAN_IE_SSID pItemSSID; @@ -924,7 +895,6 @@ int iwctl_giwessid(struct net_device *dev, wrq->length = pItemSSID->len; wrq->flags = 1; // active - return 0; } @@ -943,7 +913,6 @@ int iwctl_siwrate(struct net_device *dev, int i; unsigned char abySupportedRates[13] = {0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90}; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRATE \n"); if (!(pDevice->flags & DEVICE_FLAGS_OPENED)) { rc = -EINVAL; @@ -1042,7 +1011,6 @@ int iwctl_giwrate(struct net_device *dev, brate = 0x6C; } } else { - brate = abySupportedRates[TxRate_iwconfig]; } } else brate = 0; @@ -1067,12 +1035,9 @@ int iwctl_giwrate(struct net_device *dev, wrq->fixed = true; } - return 0; } - - /* * Wireless Handler : set rts threshold */ @@ -1133,10 +1098,8 @@ int iwctl_siwfrag(struct net_device *dev, int rc = 0; int fthr = wrq->value; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWFRAG \n"); - if (wrq->disabled) fthr = 2312; if ((fthr < 256) || (fthr > 2312)) { @@ -1168,8 +1131,6 @@ int iwctl_giwfrag(struct net_device *dev, return 0; } - - /* * Wireless Handler : set retry threshold */ @@ -1181,7 +1142,6 @@ int iwctl_siwretry(struct net_device *dev, PSDevice pDevice = (PSDevice)netdev_priv(dev); int rc = 0; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRETRY \n"); if (wrq->disabled) { @@ -1204,7 +1164,6 @@ int iwctl_siwretry(struct net_device *dev, pDevice->wMaxTransmitMSDULifetime = wrq->value; } - return rc; } @@ -1234,11 +1193,9 @@ int iwctl_giwretry(struct net_device *dev, wrq->flags |= IW_RETRY_MIN; } - return 0; } - /* * Wireless Handler : set encode mode */ @@ -1280,7 +1237,6 @@ int iwctl_siwencode(struct net_device *dev, } else dwKeyIndex = 0; } else dwKeyIndex--; - // Check the size of the key if (wrq->length > WLAN_WEP232_KEYLEN) { rc = -EINVAL; @@ -1380,7 +1336,6 @@ int iwctl_siwencode(struct net_device *dev, // Send the key to the card if (wrq->length > 0) { - if (wrq->length == WLAN_WEP232_KEYLEN) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 232 bit wep key\n"); } else if (wrq->length == WLAN_WEP104_KEYLEN) { @@ -1425,7 +1380,6 @@ int iwctl_siwencode(struct net_device *dev, } // Read the flags if (wrq->flags & IW_ENCODE_DISABLED) { - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disable WEP function\n"); pMgmt->bShareKeyAlgorithm = false; pDevice->bEncryptionEnable = false; @@ -1513,7 +1467,6 @@ memcpy(extra, abyKey, WLAN_WEP232_KEYLEN); // return rc; // } - //End Modify,Einsn return 0; @@ -1580,7 +1533,6 @@ int iwctl_giwencode(struct net_device *dev, return 0; } - /* * Wireless Handler : set power mode */ @@ -1643,10 +1595,8 @@ int iwctl_giwpower(struct net_device *dev, PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int mode = pDevice->ePSMode; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWPOWER \n"); - wrq->disabled = (mode == WMAC_POWER_CAM); if (wrq->disabled) return 0; @@ -1663,7 +1613,6 @@ int iwctl_giwpower(struct net_device *dev, return 0; } - /* * Wireless Handler : get Sensitivity */ @@ -1685,7 +1634,6 @@ int iwctl_giwsens(struct net_device *dev, wrq->disabled = (wrq->value == 0); wrq->fixed = 1; - return 0; } @@ -1803,7 +1751,6 @@ int iwctl_siwauth(struct net_device *dev, return ret; } - int iwctl_giwauth(struct net_device *dev, struct iw_request_info *info, struct iw_param *wrq, @@ -1812,8 +1759,6 @@ int iwctl_giwauth(struct net_device *dev, return -EOPNOTSUPP; } - - int iwctl_siwgenie(struct net_device *dev, struct iw_request_info *info, struct iw_point *wrq, @@ -1871,7 +1816,6 @@ int iwctl_giwgenie(struct net_device *dev, return ret; } - int iwctl_siwencodeext(struct net_device *dev, struct iw_request_info *info, struct iw_point *wrq, @@ -1992,8 +1936,6 @@ error: return ret; } - - int iwctl_giwencodeext(struct net_device *dev, struct iw_request_info *info, struct iw_point *wrq, @@ -2036,18 +1978,15 @@ int iwctl_siwmlme(struct net_device *dev, } return ret; - } #endif - /*------------------------------------------------------------------*/ /* * Structures to export the Wireless Handlers */ - /* static const iw_handler iwctl_handler[] = { @@ -2173,21 +2112,17 @@ static const iw_handler iwctl_handler[] = (iw_handler) NULL, // -- hole -- }; - static const iw_handler iwctl_private_handler[] = { NULL, // SIOCIWFIRSTPRIV }; - struct iw_priv_args iwctl_private_args[] = { { IOCTL_CMD_SET, IW_PRIV_TYPE_CHAR | 1024, 0, "set"}, }; - - const struct iw_handler_def iwctl_handler_def = { .get_wireless_stats = &iwctl_get_wireless_stats, |