aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6655/ioctl.c
diff options
context:
space:
mode:
authorJim Lieb <lieb@canonical.com>2009-07-30 13:27:21 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-15 15:02:07 -0400
commit7e809a9b10ab5ee985e23dea537e0236f026d1ca (patch)
tree450b5cda1963436a6202cc88661875e6250753b0 /drivers/staging/vt6655/ioctl.c
parentd899d403862863cf2230432e18e7b294a517fd96 (diff)
Staging: vt6655 textual cleanup in prep for driver merge
The vt6655 and vt6656 drivers are from a common origin but have drifted apart with minor textual differences. There are two changes: s/DEVICE_PRT/DBG_PRT/g and s/byPktTyp/byPktType/g This significantly reduces the differences between the two file sets in preparation to merging the common code. A few whitespace and text bits were also adjusted. Signed-off-by: Jim Lieb <lieb@canonical.com> Cc: Forest Bond <forest@alittletooquiet.net> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/vt6655/ioctl.c')
-rw-r--r--drivers/staging/vt6655/ioctl.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/drivers/staging/vt6655/ioctl.c b/drivers/staging/vt6655/ioctl.c
index 4869107a2bc..ddcf504cef5 100644
--- a/drivers/staging/vt6655/ioctl.c
+++ b/drivers/staging/vt6655/ioctl.c
@@ -108,7 +108,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
108 108
109 case WLAN_CMD_BSS_SCAN: 109 case WLAN_CMD_BSS_SCAN:
110 110
111 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_BSS_SCAN..begin \n"); 111 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_BSS_SCAN..begin \n");
112 if (copy_from_user(&sScanCmd, pReq->data, sizeof(SCmdScan))) { 112 if (copy_from_user(&sScanCmd, pReq->data, sizeof(SCmdScan))) {
113 result = -EFAULT; 113 result = -EFAULT;
114 break; 114 break;
@@ -214,31 +214,31 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
214 memcpy(pMgmt->abyDesireSSID, pItemSSID, pItemSSID->len + WLAN_IEHDR_LEN); 214 memcpy(pMgmt->abyDesireSSID, pItemSSID, pItemSSID->len + WLAN_IEHDR_LEN);
215 if (sJoinCmd.wBSSType == ADHOC) { 215 if (sJoinCmd.wBSSType == ADHOC) {
216 pMgmt->eConfigMode = WMAC_CONFIG_IBSS_STA; 216 pMgmt->eConfigMode = WMAC_CONFIG_IBSS_STA;
217 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ioct set to adhoc mode\n"); 217 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ioct set to adhoc mode\n");
218 } 218 }
219 else { 219 else {
220 pMgmt->eConfigMode = WMAC_CONFIG_ESS_STA; 220 pMgmt->eConfigMode = WMAC_CONFIG_ESS_STA;
221 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ioct set to STA mode\n"); 221 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ioct set to STA mode\n");
222 } 222 }
223 if (sJoinCmd.bPSEnable == TRUE) { 223 if (sJoinCmd.bPSEnable == TRUE) {
224 pDevice->ePSMode = WMAC_POWER_FAST; 224 pDevice->ePSMode = WMAC_POWER_FAST;
225// pDevice->ePSMode = WMAC_POWER_MAX; 225// pDevice->ePSMode = WMAC_POWER_MAX;
226 pMgmt->wListenInterval = 2; 226 pMgmt->wListenInterval = 2;
227 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Power Saving On\n"); 227 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Power Saving On\n");
228 } 228 }
229 else { 229 else {
230 pDevice->ePSMode = WMAC_POWER_CAM; 230 pDevice->ePSMode = WMAC_POWER_CAM;
231 pMgmt->wListenInterval = 1; 231 pMgmt->wListenInterval = 1;
232 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Power Saving Off \n"); 232 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Power Saving Off \n");
233 } 233 }
234 234
235 if (sJoinCmd.bShareKeyAuth == TRUE){ 235 if (sJoinCmd.bShareKeyAuth == TRUE){
236 pMgmt->bShareKeyAlgorithm = TRUE; 236 pMgmt->bShareKeyAlgorithm = TRUE;
237 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Share Key \n"); 237 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Share Key \n");
238 } 238 }
239 else { 239 else {
240 pMgmt->bShareKeyAlgorithm = FALSE; 240 pMgmt->bShareKeyAlgorithm = FALSE;
241 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Open System \n"); 241 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Open System \n");
242 } 242 }
243 pDevice->uChannel = sJoinCmd.uChannel; 243 pDevice->uChannel = sJoinCmd.uChannel;
244 netif_stop_queue(pDevice->dev); 244 netif_stop_queue(pDevice->dev);
@@ -251,7 +251,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
251 251
252 case WLAN_CMD_SET_WEP: 252 case WLAN_CMD_SET_WEP:
253 253
254 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_WEP Key. \n"); 254 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_WEP Key. \n");
255 memset(&sWEPCmd, 0 ,sizeof(SCmdSetWEP)); 255 memset(&sWEPCmd, 0 ,sizeof(SCmdSetWEP));
256 if (copy_from_user(&sWEPCmd, pReq->data, sizeof(SCmdSetWEP))) { 256 if (copy_from_user(&sWEPCmd, pReq->data, sizeof(SCmdSetWEP))) {
257 result = -EFAULT; 257 result = -EFAULT;
@@ -261,7 +261,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
261 pDevice->bEncryptionEnable = FALSE; 261 pDevice->bEncryptionEnable = FALSE;
262 pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled; 262 pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled;
263 MACvDisableDefaultKey(pDevice->PortOffset); 263 MACvDisableDefaultKey(pDevice->PortOffset);
264 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WEP function disable. \n"); 264 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WEP function disable. \n");
265 break; 265 break;
266 } 266 }
267 267
@@ -293,7 +293,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
293 break; 293 break;
294 294
295 case WLAN_CMD_GET_LINK: 295 case WLAN_CMD_GET_LINK:
296 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_GET_LINK status. \n"); 296 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_GET_LINK status. \n");
297 297
298 memset(sLinkStatus.abySSID, 0 , WLAN_SSID_MAXLEN + 1); 298 memset(sLinkStatus.abySSID, 0 , WLAN_SSID_MAXLEN + 1);
299 299
@@ -314,7 +314,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
314 memcpy(sLinkStatus.abySSID, pItemSSID->abySSID, pItemSSID->len); 314 memcpy(sLinkStatus.abySSID, pItemSSID->abySSID, pItemSSID->len);
315 memcpy(sLinkStatus.abyBSSID, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN); 315 memcpy(sLinkStatus.abyBSSID, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN);
316 sLinkStatus.uLinkRate = pMgmt->sNodeDBTable[0].wTxDataRate; 316 sLinkStatus.uLinkRate = pMgmt->sNodeDBTable[0].wTxDataRate;
317 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Link Success ! \n"); 317 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Link Success ! \n");
318 } 318 }
319 else { 319 else {
320 sLinkStatus.bLink = FALSE; 320 sLinkStatus.bLink = FALSE;
@@ -409,7 +409,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
409 break; 409 break;
410 case WLAN_CMD_STOP_MAC: 410 case WLAN_CMD_STOP_MAC:
411 411
412 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_STOP_MAC\n"); 412 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_STOP_MAC\n");
413 netif_stop_queue(pDevice->dev); 413 netif_stop_queue(pDevice->dev);
414 414
415 spin_lock_irq(&pDevice->lock); 415 spin_lock_irq(&pDevice->lock);
@@ -430,7 +430,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
430 430
431 case WLAN_CMD_START_MAC: 431 case WLAN_CMD_START_MAC:
432 432
433 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_START_MAC\n"); 433 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_START_MAC\n");
434 434
435 if (pDevice->bMACSuspend == TRUE) { 435 if (pDevice->bMACSuspend == TRUE) {
436 if (pDevice->bRadioOff == TRUE) 436 if (pDevice->bRadioOff == TRUE)
@@ -444,7 +444,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
444 444
445 case WLAN_CMD_SET_HOSTAPD: 445 case WLAN_CMD_SET_HOSTAPD:
446 446
447 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_HOSTAPD\n"); 447 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_HOSTAPD\n");
448 448
449 if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) { 449 if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) {
450 result = -EFAULT; 450 result = -EFAULT;
@@ -452,7 +452,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
452 }; 452 };
453 if (sValue.dwValue == 1) { 453 if (sValue.dwValue == 1) {
454 if (hostap_set_hostapd(pDevice, 1, 1) == 0){ 454 if (hostap_set_hostapd(pDevice, 1, 1) == 0){
455 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable HOSTAP\n"); 455 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable HOSTAP\n");
456 } 456 }
457 else { 457 else {
458 result = -EFAULT; 458 result = -EFAULT;
@@ -461,19 +461,19 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
461 } 461 }
462 else { 462 else {
463 hostap_set_hostapd(pDevice, 0, 1); 463 hostap_set_hostapd(pDevice, 0, 1);
464 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disable HOSTAP\n"); 464 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disable HOSTAP\n");
465 } 465 }
466 466
467 break; 467 break;
468 468
469 case WLAN_CMD_SET_HOSTAPD_STA: 469 case WLAN_CMD_SET_HOSTAPD_STA:
470 470
471 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_HOSTAPD_STA\n"); 471 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_HOSTAPD_STA\n");
472 472
473 break; 473 break;
474 case WLAN_CMD_SET_802_1X: 474 case WLAN_CMD_SET_802_1X:
475 475
476 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_802_1X\n"); 476 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_802_1X\n");
477 if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) { 477 if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) {
478 result = -EFAULT; 478 result = -EFAULT;
479 break; 479 break;
@@ -481,11 +481,11 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
481 481
482 if (sValue.dwValue == 1) { 482 if (sValue.dwValue == 1) {
483 pDevice->bEnable8021x = TRUE; 483 pDevice->bEnable8021x = TRUE;
484 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable 802.1x\n"); 484 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable 802.1x\n");
485 } 485 }
486 else { 486 else {
487 pDevice->bEnable8021x = FALSE; 487 pDevice->bEnable8021x = FALSE;
488 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disable 802.1x\n"); 488 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disable 802.1x\n");
489 } 489 }
490 490
491 break; 491 break;
@@ -493,7 +493,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
493 493
494 case WLAN_CMD_SET_HOST_WEP: 494 case WLAN_CMD_SET_HOST_WEP:
495 495
496 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_HOST_WEP\n"); 496 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_HOST_WEP\n");
497 if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) { 497 if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) {
498 result = -EFAULT; 498 result = -EFAULT;
499 break; 499 break;
@@ -501,29 +501,29 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
501 501
502 if (sValue.dwValue == 1) { 502 if (sValue.dwValue == 1) {
503 pDevice->bEnableHostWEP = TRUE; 503 pDevice->bEnableHostWEP = TRUE;
504 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable HostWEP\n"); 504 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable HostWEP\n");
505 } 505 }
506 else { 506 else {
507 pDevice->bEnableHostWEP = FALSE; 507 pDevice->bEnableHostWEP = FALSE;
508 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disable HostWEP\n"); 508 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disable HostWEP\n");
509 } 509 }
510 510
511 break; 511 break;
512 512
513 case WLAN_CMD_SET_WPA: 513 case WLAN_CMD_SET_WPA:
514 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_WPA\n"); 514 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_WPA\n");
515 515
516 if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) { 516 if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) {
517 result = -EFAULT; 517 result = -EFAULT;
518 break; 518 break;
519 }; 519 };
520 if (sValue.dwValue == 1) { 520 if (sValue.dwValue == 1) {
521 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "up wpadev\n"); 521 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "up wpadev\n");
522 memcpy(pDevice->wpadev->dev_addr, pDevice->dev->dev_addr, U_ETHER_ADDR_LEN); 522 memcpy(pDevice->wpadev->dev_addr, pDevice->dev->dev_addr, U_ETHER_ADDR_LEN);
523 pDevice->bWPADEVUp = TRUE; 523 pDevice->bWPADEVUp = TRUE;
524 } 524 }
525 else { 525 else {
526 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "close wpadev\n"); 526 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "close wpadev\n");
527 pDevice->bWPADEVUp = FALSE; 527 pDevice->bWPADEVUp = FALSE;
528 } 528 }
529 529
@@ -531,7 +531,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
531 531
532 case WLAN_CMD_AP_START: 532 case WLAN_CMD_AP_START:
533 533
534 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_AP_START\n"); 534 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_AP_START\n");
535 if (pDevice->bRadioOff == TRUE) { 535 if (pDevice->bRadioOff == TRUE) {
536 CARDbRadioPowerOn(pDevice); 536 CARDbRadioPowerOn(pDevice);
537 vMgrTimerInit(pDevice); 537 vMgrTimerInit(pDevice);
@@ -545,10 +545,10 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
545 545
546 if (sStartAPCmd.wBSSType == AP) { 546 if (sStartAPCmd.wBSSType == AP) {
547 pMgmt->eConfigMode = WMAC_CONFIG_AP; 547 pMgmt->eConfigMode = WMAC_CONFIG_AP;
548 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ioct set to AP mode\n"); 548 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ioct set to AP mode\n");
549 } 549 }
550 else { 550 else {
551 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ioct BSS type not set to AP mode\n"); 551 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ioct BSS type not set to AP mode\n");
552 result = -EFAULT; 552 result = -EFAULT;
553 break; 553 break;
554 } 554 }
@@ -578,11 +578,11 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
578 578
579 if (sStartAPCmd.bShareKeyAuth == TRUE){ 579 if (sStartAPCmd.bShareKeyAuth == TRUE){
580 pMgmt->bShareKeyAlgorithm = TRUE; 580 pMgmt->bShareKeyAlgorithm = TRUE;
581 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Share Key \n"); 581 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Share Key \n");
582 } 582 }
583 else { 583 else {
584 pMgmt->bShareKeyAlgorithm = FALSE; 584 pMgmt->bShareKeyAlgorithm = FALSE;
585 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Open System \n"); 585 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Open System \n");
586 } 586 }
587 memcpy(pMgmt->abyIBSSSuppRates, abySuppRates, 6); 587 memcpy(pMgmt->abyIBSSSuppRates, abySuppRates, 6);
588 588
@@ -606,7 +606,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
606 pMgmt->abyIBSSSuppRates[3] |= BIT7; 606 pMgmt->abyIBSSSuppRates[3] |= BIT7;
607 } 607 }
608 608
609 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Support Rate= %x %x %x %x\n", 609 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Support Rate= %x %x %x %x\n",
610 pMgmt->abyIBSSSuppRates[2], 610 pMgmt->abyIBSSSuppRates[2],
611 pMgmt->abyIBSSSuppRates[3], 611 pMgmt->abyIBSSSuppRates[3],
612 pMgmt->abyIBSSSuppRates[4], 612 pMgmt->abyIBSSSuppRates[4],
@@ -664,7 +664,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
664 pNodeList->sNodeList[jj].byKeyIndex = pNode->byKeyIndex; 664 pNodeList->sNodeList[jj].byKeyIndex = pNode->byKeyIndex;
665 pNodeList->sNodeList[jj].wWepKeyLength = pNode->uWepKeyLength; 665 pNodeList->sNodeList[jj].wWepKeyLength = pNode->uWepKeyLength;
666 memcpy(&(pNodeList->sNodeList[jj].abyWepKey[0]), &(pNode->abyWepKey[0]), WEP_KEYMAXLEN); 666 memcpy(&(pNodeList->sNodeList[jj].abyWepKey[0]), &(pNode->abyWepKey[0]), WEP_KEYMAXLEN);
667 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "key= %2.2X:%2.2X:%2.2X:%2.2X:%2.2X\n", 667 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "key= %2.2X:%2.2X:%2.2X:%2.2X:%2.2X\n",
668 pNodeList->sNodeList[jj].abyWepKey[0], 668 pNodeList->sNodeList[jj].abyWepKey[0],
669 pNodeList->sNodeList[jj].abyWepKey[1], 669 pNodeList->sNodeList[jj].abyWepKey[1],
670 pNodeList->sNodeList[jj].abyWepKey[2], 670 pNodeList->sNodeList[jj].abyWepKey[2],
@@ -730,7 +730,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
730 730
731 731
732 default: 732 default:
733 DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Private command not support..\n"); 733 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Private command not support..\n");
734 } 734 }
735 735
736 return result; 736 return result;