Staging: fix assorted typos all over the place
[safe/jmp/linux-2.6] / drivers / staging / vt6655 / ioctl.c
index ddcf504..d9a5fd2 100644 (file)
  *
  */
 
-
-#if !defined(__IOCTL_H__)
 #include "ioctl.h"
-#endif
-#if !defined(__IOCMD_H__)
 #include "iocmd.h"
-#endif
-#if !defined(__MAC_H__)
 #include "mac.h"
-#endif
-#if !defined(__CARD_H__)
 #include "card.h"
-#endif
-#if !defined(__HOSTAP_H__)
 #include "hostap.h"
-#endif
-#if !defined(__UMEM_H__)
-#include "umem.h"
-#endif
-#if !defined(__WPACTL_H__)
 #include "wpactl.h"
-#endif
-#if !defined(__RF_H__)
 #include "rf.h"
-#endif
-
 
 /*---------------------  Static Definitions -------------------------*/
 
 //static int          msglevel                =MSG_LEVEL_DEBUG;
 static int          msglevel                =MSG_LEVEL_INFO;
 
-/*---------------------  Static Functions  --------------------------*/
-
 #ifdef WPA_SM_Transtatus
     SWPAResult wpa_Result;
 #endif
 
+/*---------------------  Static Functions  --------------------------*/
 
 /*---------------------  Export Variables  --------------------------*/
 
@@ -101,7 +81,6 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
     BYTE                abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
     LONG                ldBm;
 
-
     pReq->wResult = 0;
 
     switch(pReq->wCmdCode) {
@@ -180,7 +159,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
         else if(zonetype == 0x02) { //Europe
              sZoneTypeCmd.ZoneType = ZoneType_Europe;
         }
-        else { //Unknow ZoneType
+        else { //Unknown ZoneType
                printk("Error:ZoneType[%x] Unknown ???\n",zonetype);
                 result = -EFAULT;
                break;
@@ -250,7 +229,6 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
         break;
 
     case WLAN_CMD_SET_WEP:
-
         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_WEP Key. \n");
         memset(&sWEPCmd, 0 ,sizeof(SCmdSetWEP));
         if (copy_from_user(&sWEPCmd, pReq->data, sizeof(SCmdSetWEP))) {
@@ -695,13 +673,13 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
            wpa_Result.key_mgmt = 0;
            wpa_Result.eap_type = 0;
            wpa_Result.authenticated = FALSE;
-                 pDevice->fWPA_Authened = FALSE;
+             pDevice->fWPA_Authened = FALSE;
         if (copy_from_user(&wpa_Result, pReq->data, sizeof(wpa_Result))) {
             result = -EFAULT;
                        break;
                }
 
-       if(wpa_Result.authenticated==TRUE) {
+if(wpa_Result.authenticated==TRUE) {
    #ifdef SndEvt_ToAPI
    {
      union iwreq_data      wrqu;
@@ -714,7 +692,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
      wireless_send_event(pDevice->dev, IWEVCUSTOM, &wrqu, pItemSSID->abySSID);
    }
    #endif
-         pDevice->fWPA_Authened = TRUE;           //is sucessful peer to wpa_Result.authenticated?
+         pDevice->fWPA_Authened = TRUE;           //is successful peer to wpa_Result.authenticated?
 }
 
         //printk("get private wpa_supplicant announce WPA SM\n");
@@ -728,7 +706,6 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
         break;
 #endif
 
-
     default:
         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Private command not support..\n");
     }
@@ -748,8 +725,8 @@ vConfigWEPKey (
     int ii;
 
 
-    ZERO_MEMORY(&pDevice->abyWepKey[dwKeyIndex][0], WLAN_WEPMAX_KEYLEN);
-    MEMvCopy(&pDevice->abyWepKey[dwKeyIndex][0], pbyKey, uKeyLength);
+    memset(&pDevice->abyWepKey[dwKeyIndex][0], 0, WLAN_WEPMAX_KEYLEN);
+    memcpy(&pDevice->abyWepKey[dwKeyIndex][0], pbyKey, uKeyLength);
 
     pDevice->bWepKeyAvailable[dwKeyIndex] = TRUE;
     pDevice->auWepKeyLength[dwKeyIndex] = uKeyLength;