aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/vt6656/iwctl.c148
1 files changed, 74 insertions, 74 deletions
diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
index 3249a017f3d..9b7d7522868 100644
--- a/drivers/staging/vt6656/iwctl.c
+++ b/drivers/staging/vt6656/iwctl.c
@@ -70,7 +70,7 @@ struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev)
70 pDevice->wstats.status = pDevice->eOPMode; 70 pDevice->wstats.status = pDevice->eOPMode;
71 if(pDevice->scStatistic.LinkQuality > 100) 71 if(pDevice->scStatistic.LinkQuality > 100)
72 pDevice->scStatistic.LinkQuality = 100; 72 pDevice->scStatistic.LinkQuality = 100;
73 pDevice->wstats.qual.qual =(BYTE) pDevice->scStatistic.LinkQuality; 73 pDevice->wstats.qual.qual =(BYTE)pDevice->scStatistic.LinkQuality;
74 RFvRSSITodBm(pDevice, (BYTE)(pDevice->uCurrRSSI), &ldBm); 74 RFvRSSITodBm(pDevice, (BYTE)(pDevice->uCurrRSSI), &ldBm);
75 pDevice->wstats.qual.level = ldBm; 75 pDevice->wstats.qual.level = ldBm;
76 pDevice->wstats.qual.noise = 0; 76 pDevice->wstats.qual.noise = 0;
@@ -128,7 +128,7 @@ int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info,
128 128
129 spin_lock_irq(&pDevice->lock); 129 spin_lock_irq(&pDevice->lock);
130 130
131 BSSvClearBSSList((void *) pDevice, pDevice->bLinkPass); 131 BSSvClearBSSList((void *)pDevice, pDevice->bLinkPass);
132 132
133//mike add: active scan OR passive scan OR desire_ssid scan 133//mike add: active scan OR passive scan OR desire_ssid scan
134 if(wrq->length == sizeof(struct iw_scan_req)) { 134 if(wrq->length == sizeof(struct iw_scan_req)) {
@@ -146,7 +146,7 @@ int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info,
146 pMgmt->eScanType = WMAC_SCAN_PASSIVE; 146 pMgmt->eScanType = WMAC_SCAN_PASSIVE;
147 PRINT_K("SIOCSIWSCAN:[desired_ssid=%s,len=%d]\n",((PWLAN_IE_SSID)abyScanSSID)->abySSID, 147 PRINT_K("SIOCSIWSCAN:[desired_ssid=%s,len=%d]\n",((PWLAN_IE_SSID)abyScanSSID)->abySSID,
148 ((PWLAN_IE_SSID)abyScanSSID)->len); 148 ((PWLAN_IE_SSID)abyScanSSID)->len);
149 bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, abyScanSSID); 149 bScheduleCommand((void *)pDevice, WLAN_CMD_BSSID_SCAN, abyScanSSID);
150 spin_unlock_irq(&pDevice->lock); 150 spin_unlock_irq(&pDevice->lock);
151 151
152 return 0; 152 return 0;
@@ -160,7 +160,7 @@ int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info,
160 } 160 }
161 161
162 pMgmt->eScanType = WMAC_SCAN_PASSIVE; 162 pMgmt->eScanType = WMAC_SCAN_PASSIVE;
163 bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, NULL); 163 bScheduleCommand((void *)pDevice, WLAN_CMD_BSSID_SCAN, NULL);
164 spin_unlock_irq(&pDevice->lock); 164 spin_unlock_irq(&pDevice->lock);
165 165
166 return 0; 166 return 0;
@@ -330,8 +330,8 @@ int iwctl_siwfreq(struct net_device *dev, struct iw_request_info *info,
330 330
331 // If setting by frequency, convert to a channel 331 // If setting by frequency, convert to a channel
332 if((wrq->e == 1) && 332 if((wrq->e == 1) &&
333 (wrq->m >= (int) 2.412e8) && 333 (wrq->m >= (int)2.412e8) &&
334 (wrq->m <= (int) 2.487e8)) { 334 (wrq->m <= (int)2.487e8)) {
335 int f = wrq->m / 100000; 335 int f = wrq->m / 100000;
336 int c = 0; 336 int c = 0;
337 while((c < 14) && (f != frequency_list[c])) 337 while((c < 14) && (f != frequency_list[c]))
@@ -483,7 +483,7 @@ void iwctl_giwmode(struct net_device *dev, struct iw_request_info *info,
483void iwctl_giwrange(struct net_device *dev, struct iw_request_info *info, 483void iwctl_giwrange(struct net_device *dev, struct iw_request_info *info,
484 struct iw_point *wrq, char *extra) 484 struct iw_point *wrq, char *extra)
485{ 485{
486 struct iw_range *range = (struct iw_range *) extra; 486 struct iw_range *range = (struct iw_range *)extra;
487 int i; 487 int i;
488 int k; 488 int k;
489 BYTE abySupportedRates[13] = { 489 BYTE abySupportedRates[13] = {
@@ -761,12 +761,12 @@ int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info,
761 761
762 if (pCurr == NULL){ 762 if (pCurr == NULL){
763 PRINT_K("SIOCSIWESSID:hidden ssid site survey before associate.......\n"); 763 PRINT_K("SIOCSIWESSID:hidden ssid site survey before associate.......\n");
764 vResetCommandTimer((void *) pDevice); 764 vResetCommandTimer((void *)pDevice);
765 pMgmt->eScanType = WMAC_SCAN_ACTIVE; 765 pMgmt->eScanType = WMAC_SCAN_ACTIVE;
766 bScheduleCommand((void *) pDevice, 766 bScheduleCommand((void *)pDevice,
767 WLAN_CMD_BSSID_SCAN, 767 WLAN_CMD_BSSID_SCAN,
768 pMgmt->abyDesireSSID); 768 pMgmt->abyDesireSSID);
769 bScheduleCommand((void *) pDevice, 769 bScheduleCommand((void *)pDevice,
770 WLAN_CMD_SSID, 770 WLAN_CMD_SSID,
771 pMgmt->abyDesireSSID); 771 pMgmt->abyDesireSSID);
772 } 772 }
@@ -781,12 +781,12 @@ int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info,
781 } 781 }
782 if(uSameBssidNum >= 2) { //hit: desired AP is in hidden ssid mode!!! 782 if(uSameBssidNum >= 2) { //hit: desired AP is in hidden ssid mode!!!
783 PRINT_K("SIOCSIWESSID:hidden ssid directly associate.......\n"); 783 PRINT_K("SIOCSIWESSID:hidden ssid directly associate.......\n");
784 vResetCommandTimer((void *) pDevice); 784 vResetCommandTimer((void *)pDevice);
785 pMgmt->eScanType = WMAC_SCAN_PASSIVE; //this scan type,you'll submit scan result! 785 pMgmt->eScanType = WMAC_SCAN_PASSIVE; //this scan type,you'll submit scan result!
786 bScheduleCommand((void *) pDevice, 786 bScheduleCommand((void *)pDevice,
787 WLAN_CMD_BSSID_SCAN, 787 WLAN_CMD_BSSID_SCAN,
788 pMgmt->abyDesireSSID); 788 pMgmt->abyDesireSSID);
789 bScheduleCommand((void *) pDevice, 789 bScheduleCommand((void *)pDevice,
790 WLAN_CMD_SSID, 790 WLAN_CMD_SSID,
791 pMgmt->abyDesireSSID); 791 pMgmt->abyDesireSSID);
792 } 792 }
@@ -1272,11 +1272,11 @@ int iwctl_siwpower(struct net_device *dev, struct iw_request_info *info,
1272 } 1272 }
1273 if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) { 1273 if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) {
1274 pDevice->ePSMode = WMAC_POWER_FAST; 1274 pDevice->ePSMode = WMAC_POWER_FAST;
1275 PSvEnablePowerSaving((void *) pDevice, pMgmt->wListenInterval); 1275 PSvEnablePowerSaving((void *)pDevice, pMgmt->wListenInterval);
1276 1276
1277 } else if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_PERIOD) { 1277 } else if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_PERIOD) {
1278 pDevice->ePSMode = WMAC_POWER_FAST; 1278 pDevice->ePSMode = WMAC_POWER_FAST;
1279 PSvEnablePowerSaving((void *) pDevice, pMgmt->wListenInterval); 1279 PSvEnablePowerSaving((void *)pDevice, pMgmt->wListenInterval);
1280 } 1280 }
1281 switch (wrq->flags & IW_POWER_MODE) { 1281 switch (wrq->flags & IW_POWER_MODE) {
1282 case IW_POWER_UNICAST_R: 1282 case IW_POWER_UNICAST_R:
@@ -1533,7 +1533,7 @@ int iwctl_siwencodeext(struct net_device *dev, struct iw_request_info *info,
1533 if (buf == NULL) 1533 if (buf == NULL)
1534 return -ENOMEM; 1534 return -ENOMEM;
1535 memset(buf, 0, blen); 1535 memset(buf, 0, blen);
1536 param = (struct viawget_wpa_param *) buf; 1536 param = (struct viawget_wpa_param *)buf;
1537 1537
1538//recover alg_name 1538//recover alg_name
1539 switch (ext->alg) { 1539 switch (ext->alg) {
@@ -1653,7 +1653,7 @@ int iwctl_siwmlme(struct net_device *dev, struct iw_request_info *info,
1653 case IW_MLME_DISASSOC: 1653 case IW_MLME_DISASSOC:
1654 if(pDevice->bLinkPass == TRUE){ 1654 if(pDevice->bLinkPass == TRUE){
1655 PRINT_K("iwctl_siwmlme--->send DISASSOCIATE\n"); 1655 PRINT_K("iwctl_siwmlme--->send DISASSOCIATE\n");
1656 bScheduleCommand((void *) pDevice, 1656 bScheduleCommand((void *)pDevice,
1657 WLAN_CMD_DISASSOCIATE, 1657 WLAN_CMD_DISASSOCIATE,
1658 NULL); 1658 NULL);
1659 } 1659 }
@@ -1667,62 +1667,62 @@ int iwctl_siwmlme(struct net_device *dev, struct iw_request_info *info,
1667#endif 1667#endif
1668 1668
1669static const iw_handler iwctl_handler[] = { 1669static const iw_handler iwctl_handler[] = {
1670 (iw_handler) NULL, /* SIOCSIWCOMMIT */ 1670 (iw_handler)NULL, /* SIOCSIWCOMMIT */
1671 (iw_handler) NULL, // SIOCGIWNAME 1671 (iw_handler)NULL, // SIOCGIWNAME
1672 (iw_handler) NULL, // SIOCSIWNWID 1672 (iw_handler)NULL, // SIOCSIWNWID
1673 (iw_handler) NULL, // SIOCGIWNWID 1673 (iw_handler)NULL, // SIOCGIWNWID
1674 (iw_handler) NULL, // SIOCSIWFREQ 1674 (iw_handler)NULL, // SIOCSIWFREQ
1675 (iw_handler) NULL, // SIOCGIWFREQ 1675 (iw_handler)NULL, // SIOCGIWFREQ
1676 (iw_handler) NULL, // SIOCSIWMODE 1676 (iw_handler)NULL, // SIOCSIWMODE
1677 (iw_handler) NULL, // SIOCGIWMODE 1677 (iw_handler)NULL, // SIOCGIWMODE
1678 (iw_handler) NULL, // SIOCSIWSENS 1678 (iw_handler)NULL, // SIOCSIWSENS
1679 (iw_handler) NULL, // SIOCGIWSENS 1679 (iw_handler)NULL, // SIOCGIWSENS
1680 (iw_handler) NULL, // SIOCSIWRANGE 1680 (iw_handler)NULL, // SIOCSIWRANGE
1681 (iw_handler) iwctl_giwrange, // SIOCGIWRANGE 1681 (iw_handler)iwctl_giwrange, // SIOCGIWRANGE
1682 (iw_handler) NULL, // SIOCSIWPRIV 1682 (iw_handler)NULL, // SIOCSIWPRIV
1683 (iw_handler) NULL, // SIOCGIWPRIV 1683 (iw_handler)NULL, // SIOCGIWPRIV
1684 (iw_handler) NULL, // SIOCSIWSTATS 1684 (iw_handler)NULL, // SIOCSIWSTATS
1685 (iw_handler) NULL, // SIOCGIWSTATS 1685 (iw_handler)NULL, // SIOCGIWSTATS
1686 (iw_handler) NULL, // SIOCSIWSPY 1686 (iw_handler)NULL, // SIOCSIWSPY
1687 (iw_handler) NULL, // SIOCGIWSPY 1687 (iw_handler)NULL, // SIOCGIWSPY
1688 (iw_handler) NULL, // -- hole -- 1688 (iw_handler)NULL, // -- hole --
1689 (iw_handler) NULL, // -- hole -- 1689 (iw_handler)NULL, // -- hole --
1690 (iw_handler) NULL, // SIOCSIWAP 1690 (iw_handler)NULL, // SIOCSIWAP
1691 (iw_handler) NULL, // SIOCGIWAP 1691 (iw_handler)NULL, // SIOCGIWAP
1692 (iw_handler) NULL, // -- hole -- 0x16 1692 (iw_handler)NULL, // -- hole -- 0x16
1693 (iw_handler) NULL, // SIOCGIWAPLIST 1693 (iw_handler)NULL, // SIOCGIWAPLIST
1694 (iw_handler) iwctl_siwscan, // SIOCSIWSCAN 1694 (iw_handler)iwctl_siwscan, // SIOCSIWSCAN
1695 (iw_handler) iwctl_giwscan, // SIOCGIWSCAN 1695 (iw_handler)iwctl_giwscan, // SIOCGIWSCAN
1696 (iw_handler) NULL, // SIOCSIWESSID 1696 (iw_handler)NULL, // SIOCSIWESSID
1697 (iw_handler) NULL, // SIOCGIWESSID 1697 (iw_handler)NULL, // SIOCGIWESSID
1698 (iw_handler) NULL, // SIOCSIWNICKN 1698 (iw_handler)NULL, // SIOCSIWNICKN
1699 (iw_handler) NULL, // SIOCGIWNICKN 1699 (iw_handler)NULL, // SIOCGIWNICKN
1700 (iw_handler) NULL, // -- hole -- 1700 (iw_handler)NULL, // -- hole --
1701 (iw_handler) NULL, // -- hole -- 1701 (iw_handler)NULL, // -- hole --
1702 (iw_handler) NULL, // SIOCSIWRATE 0x20 1702 (iw_handler)NULL, // SIOCSIWRATE 0x20
1703 (iw_handler) NULL, // SIOCGIWRATE 1703 (iw_handler)NULL, // SIOCGIWRATE
1704 (iw_handler) NULL, // SIOCSIWRTS 1704 (iw_handler)NULL, // SIOCSIWRTS
1705 (iw_handler) NULL, // SIOCGIWRTS 1705 (iw_handler)NULL, // SIOCGIWRTS
1706 (iw_handler) NULL, // SIOCSIWFRAG 1706 (iw_handler)NULL, // SIOCSIWFRAG
1707 (iw_handler) NULL, // SIOCGIWFRAG 1707 (iw_handler)NULL, // SIOCGIWFRAG
1708 (iw_handler) NULL, // SIOCSIWTXPOW 1708 (iw_handler)NULL, // SIOCSIWTXPOW
1709 (iw_handler) NULL, // SIOCGIWTXPOW 1709 (iw_handler)NULL, // SIOCGIWTXPOW
1710 (iw_handler) NULL, // SIOCSIWRETRY 1710 (iw_handler)NULL, // SIOCSIWRETRY
1711 (iw_handler) NULL, // SIOCGIWRETRY 1711 (iw_handler)NULL, // SIOCGIWRETRY
1712 (iw_handler) NULL, // SIOCSIWENCODE 1712 (iw_handler)NULL, // SIOCSIWENCODE
1713 (iw_handler) NULL, // SIOCGIWENCODE 1713 (iw_handler)NULL, // SIOCGIWENCODE
1714 (iw_handler) NULL, // SIOCSIWPOWER 1714 (iw_handler)NULL, // SIOCSIWPOWER
1715 (iw_handler) NULL, // SIOCGIWPOWER 1715 (iw_handler)NULL, // SIOCGIWPOWER
1716 (iw_handler) NULL, // -- hole -- 1716 (iw_handler)NULL, // -- hole --
1717 (iw_handler) NULL, // -- hole -- 1717 (iw_handler)NULL, // -- hole --
1718 (iw_handler) NULL, // SIOCSIWGENIE 1718 (iw_handler)NULL, // SIOCSIWGENIE
1719 (iw_handler) NULL, // SIOCGIWGENIE 1719 (iw_handler)NULL, // SIOCGIWGENIE
1720 (iw_handler) NULL, // SIOCSIWAUTH 1720 (iw_handler)NULL, // SIOCSIWAUTH
1721 (iw_handler) NULL, // SIOCGIWAUTH 1721 (iw_handler)NULL, // SIOCGIWAUTH
1722 (iw_handler) NULL, // SIOCSIWENCODEEXT 1722 (iw_handler)NULL, // SIOCSIWENCODEEXT
1723 (iw_handler) NULL, // SIOCGIWENCODEEXT 1723 (iw_handler)NULL, // SIOCGIWENCODEEXT
1724 (iw_handler) NULL, // SIOCSIWPMKSA 1724 (iw_handler)NULL, // SIOCSIWPMKSA
1725 (iw_handler) NULL, // -- hole -- 1725 (iw_handler)NULL, // -- hole --
1726}; 1726};
1727 1727
1728static const iw_handler iwctl_private_handler[] = { 1728static const iw_handler iwctl_private_handler[] = {
@@ -1740,7 +1740,7 @@ const struct iw_handler_def iwctl_handler_def = {
1740 .num_standard = sizeof(iwctl_handler)/sizeof(iw_handler), 1740 .num_standard = sizeof(iwctl_handler)/sizeof(iw_handler),
1741 .num_private = 0, 1741 .num_private = 0,
1742 .num_private_args = 0, 1742 .num_private_args = 0,
1743 .standard = (iw_handler *) iwctl_handler, 1743 .standard = (iw_handler *)iwctl_handler,
1744 .private = NULL, 1744 .private = NULL,
1745 .private_args = NULL, 1745 .private_args = NULL,
1746}; 1746};