]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/staging/vt6655/hostap.c
Merge tag 'arm64-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas...
[karo-tx-linux.git] / drivers / staging / vt6655 / hostap.c
index 71e50568f1d38ac16843042a8bc0581a2e2406e2..8417c2f2c6cfdbf2208a039b626b60ce56524134 100644 (file)
@@ -53,12 +53,8 @@ static int msglevel = MSG_LEVEL_INFO;
 
 /*---------------------  Static Functions  --------------------------*/
 
-
-
-
 /*---------------------  Export Variables  --------------------------*/
 
-
 /*
  * Description:
  *      register net_device (AP) for hostap deamon
@@ -135,7 +131,6 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
 
 static int hostap_disable_hostapd(PSDevice pDevice, int rtnl_locked)
 {
-
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: disabling hostapd mode\n", pDevice->dev->name);
 
        if (pDevice->apdev && pDevice->apdev->name && pDevice->apdev->name[0]) {
@@ -161,7 +156,6 @@ static int hostap_disable_hostapd(PSDevice pDevice, int rtnl_locked)
        return 0;
 }
 
-
 /*
  * Description:
  *      Set enable/disable hostapd mode
@@ -192,7 +186,6 @@ int vt6655_hostap_set_hostapd(PSDevice pDevice, int val, int rtnl_locked)
                return hostap_disable_hostapd(pDevice, rtnl_locked);
 }
 
-
 /*
  * Description:
  *      remove station function supported for hostap deamon
@@ -211,7 +204,6 @@ static int hostap_remove_sta(PSDevice pDevice,
 {
        unsigned int uNodeIndex;
 
-
        if (BSSDBbIsSTAInNodeDB(pDevice->pMgmt, param->sta_addr, &uNodeIndex)) {
                BSSvRemoveOneNode(pDevice, uNodeIndex);
        } else {
@@ -239,7 +231,6 @@ static int hostap_add_sta(PSDevice pDevice,
        PSMgmtObject    pMgmt = pDevice->pMgmt;
        unsigned int uNodeIndex;
 
-
        if (!BSSDBbIsSTAInNodeDB(pMgmt, param->sta_addr, &uNodeIndex)) {
                BSSvCreateOneNode((PSDevice)pDevice, &uNodeIndex);
        }
@@ -373,8 +364,6 @@ static int hostap_set_flags_sta(PSDevice pDevice,
        return 0;
 }
 
-
-
 /*
  * Description:
  *      set generic element (wpa ie)
@@ -393,8 +382,6 @@ static int hostap_set_generic_element(PSDevice pDevice,
 {
        PSMgmtObject    pMgmt = pDevice->pMgmt;
 
-
-
        memcpy(pMgmt->abyWPAIE,
               param->u.generic_elem.data,
               param->u.generic_elem.len
@@ -472,7 +459,6 @@ static int hostap_set_encryption(PSDevice pDevice,
        bool bKeyTableFull = false;
        unsigned short wKeyCtl = 0;
 
-
        param->u.crypt.err = 0;
 /*
   if (param_len !=
@@ -484,7 +470,6 @@ static int hostap_set_encryption(PSDevice pDevice,
        if (param->u.crypt.alg > WPA_ALG_CCMP)
                return -EINVAL;
 
-
        if ((param->u.crypt.idx > 3) || (param->u.crypt.key_len > MAX_KEY_LEN)) {
                param->u.crypt.err = HOSTAP_CRYPT_ERR_KEY_SET_FAILED;
                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " HOSTAP_CRYPT_ERR_KEY_SET_FAILED\n");
@@ -507,7 +492,6 @@ static int hostap_set_encryption(PSDevice pDevice,
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " hostap_set_encryption: alg %d \n", param->u.crypt.alg);
 
        if (param->u.crypt.alg == WPA_ALG_NONE) {
-
                if (pMgmt->sNodeDBTable[iNodeIndex].bOnFly == true) {
                        if (KeybRemoveKey(&(pDevice->sKey),
                                          param->sta_addr,
@@ -549,7 +533,6 @@ static int hostap_set_encryption(PSDevice pDevice,
        }
 
        if (param->u.crypt.alg == WPA_ALG_WEP) {
-
                if ((pDevice->bEnable8021x == false) || (iNodeIndex == 0)) {
                        KeybSetDefaultKey(&(pDevice->sKey),
                                          dwKeyIndex & ~(BIT30 | USE_KEYRSC),
@@ -572,7 +555,6 @@ static int hostap_set_encryption(PSDevice pDevice,
                                       KEY_CTL_WEP,
                                       pDevice->PortOffset,
                                       pDevice->byLocalID) == true) {
-
                                pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true;
 
                        } else {
@@ -618,7 +600,6 @@ static int hostap_set_encryption(PSDevice pDevice,
                pMgmt->byCSSGK = KEY_CTL_CCMP;
        }
 
-
        if (iNodeIndex == 0) {
                KeybSetDefaultKey(&(pDevice->sKey),
                                  dwKeyIndex,
@@ -641,7 +622,6 @@ static int hostap_set_encryption(PSDevice pDevice,
                               byKeyDecMode,
                               pDevice->PortOffset,
                               pDevice->byLocalID) == true) {
-
                        pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true;
 
                } else {
@@ -683,8 +663,6 @@ static int hostap_set_encryption(PSDevice pDevice,
        return ret;
 }
 
-
-
 /*
  * Description:
  *      get each stations encryption key
@@ -707,7 +685,6 @@ static int hostap_get_encryption(PSDevice pDevice,
        int     ii;
        int     iNodeIndex = 0;
 
-
        param->u.crypt.err = 0;
 
        if (is_broadcast_ether_addr(param->sta_addr)) {
@@ -728,7 +705,6 @@ static int hostap_get_encryption(PSDevice pDevice,
        return ret;
 }
 
-
 /*
  * Description:
  *      vt6655_hostap_ioctl main function supported for hostap deamon.
@@ -837,7 +813,6 @@ int vt6655_hostap_ioctl(PSDevice pDevice, struct iw_point *p)
                break;
        }
 
-
        if ((ret == 0) && ap_ioctl) {
                if (copy_to_user(p->pointer, param, p->length)) {
                        ret = -EFAULT;
@@ -850,4 +825,3 @@ out:
 
        return ret;
 }
-