Commit f9cf92bf authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman

staging:vt6655:wpactl: Whitespace cleanups

Neatening only.
git diff -w shows no differences.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3e28383f
......@@ -54,7 +54,7 @@ static const int frequency_list[] = {
/*--------------------- Static Variables --------------------------*/
//static int msglevel =MSG_LEVEL_DEBUG;
static int msglevel =MSG_LEVEL_INFO;
static int msglevel = MSG_LEVEL_INFO;
/*--------------------- Static Functions --------------------------*/
......@@ -70,7 +70,7 @@ static void wpadev_setup(struct net_device *dev)
dev->addr_len = ETH_ALEN;
dev->tx_queue_len = 1000;
memset(dev->broadcast,0xFF, ETH_ALEN);
memset(dev->broadcast, 0xFF, ETH_ALEN);
dev->flags = IFF_BROADCAST|IFF_MULTICAST;
}
......@@ -93,7 +93,7 @@ static int wpa_init_wpadev(PSDevice pDevice)
{
PSDevice wpadev_priv;
struct net_device *dev = pDevice->dev;
int ret=0;
int ret = 0;
pDevice->wpadev = alloc_netdev(sizeof(PSDevice), "vntwpa", wpadev_setup);
if (pDevice->wpadev == NULL)
......@@ -199,9 +199,9 @@ int wpa_set_wpadev(PSDevice pDevice, int val)
*
*/
int wpa_set_keys(PSDevice pDevice, void *ctx, bool fcpfkernel)
int wpa_set_keys(PSDevice pDevice, void *ctx, bool fcpfkernel)
{
struct viawget_wpa_param *param=ctx;
struct viawget_wpa_param *param = ctx;
PSMgmtObject pMgmt = pDevice->pMgmt;
unsigned long dwKeyIndex = 0;
unsigned char abyKey[MAX_KEY_LEN];
......@@ -225,14 +225,14 @@ int wpa_set_wpadev(PSDevice pDevice, int val)
pDevice->byKeyIndex = 0;
pDevice->bTransmitKey = false;
KeyvRemoveAllWEPKey(&(pDevice->sKey), pDevice->PortOffset);
for (uu=0; uu<MAX_KEY_TABLE; uu++) {
for (uu = 0; uu < MAX_KEY_TABLE; uu++) {
MACvDisableKeyEntry(pDevice->PortOffset, uu);
}
return ret;
}
//spin_unlock_irq(&pDevice->lock);
if(param->u.wpa_key.key && fcpfkernel) {
if (param->u.wpa_key.key && fcpfkernel) {
memcpy(&abyKey[0], param->u.wpa_key.key, param->u.wpa_key.key_len);
}
else {
......@@ -242,7 +242,7 @@ int wpa_set_wpadev(PSDevice pDevice, int val)
spin_lock_irq(&pDevice->lock);
return -EINVAL;
}
spin_lock_irq(&pDevice->lock);
spin_lock_irq(&pDevice->lock);
}
dwKeyIndex = (unsigned long)(param->u.wpa_key.key_index);
......@@ -273,7 +273,7 @@ spin_lock_irq(&pDevice->lock);
}
//spin_unlock_irq(&pDevice->lock);
if(param->u.wpa_key.seq && fcpfkernel) {
if (param->u.wpa_key.seq && fcpfkernel) {
memcpy(&abySeq[0], param->u.wpa_key.seq, param->u.wpa_key.seq_len);
}
else {
......@@ -283,11 +283,11 @@ spin_lock_irq(&pDevice->lock);
spin_lock_irq(&pDevice->lock);
return -EINVAL;
}
spin_lock_irq(&pDevice->lock);
}
spin_lock_irq(&pDevice->lock);
}
if (param->u.wpa_key.seq_len > 0) {
for (ii = 0 ; ii < param->u.wpa_key.seq_len ; ii++) {
for (ii = 0; ii < param->u.wpa_key.seq_len; ii++) {
if (ii < 4)
LODWORD(KeyRSC) |= (abySeq[ii] << (ii * 8));
else
......@@ -372,7 +372,7 @@ spin_lock_irq(&pDevice->lock);
(unsigned char *)abyKey,
byKeyDecMode,
pDevice->PortOffset,
pDevice->byLocalID) == true) ) {
pDevice->byLocalID) == true)) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "GROUP Key Assign.\n");
} else {
......@@ -437,7 +437,7 @@ spin_lock_irq(&pDevice->lock);
pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[byKeyIndex][2],
pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[byKeyIndex][3],
pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[byKeyIndex][4]
);
);
*/
return ret;
......@@ -475,7 +475,7 @@ static int wpa_set_wpa(PSDevice pDevice,
/*
/*
* Description:
* set disassociate
*
......@@ -528,7 +528,7 @@ static int wpa_set_scan(PSDevice pDevice,
spin_lock_irq(&pDevice->lock);
BSSvClearBSSList((void *)pDevice, pDevice->bLinkPass);
bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, NULL);
bScheduleCommand((void *)pDevice, WLAN_CMD_BSSID_SCAN, NULL);
spin_unlock_irq(&pDevice->lock);
return ret;
......@@ -639,17 +639,17 @@ static int wpa_get_scan(PSDevice pDevice,
for (ii = 0; ii < MAX_BSS_NUM; ii++) {
for(jj=0;jj<MAX_BSS_NUM-ii-1;jj++) {
for (jj = 0; jj < MAX_BSS_NUM - ii - 1; jj++) {
if((pMgmt->sBSSList[jj].bActive!=true) ||
if ((pMgmt->sBSSList[jj].bActive != true) ||
((pMgmt->sBSSList[jj].uRSSI>pMgmt->sBSSList[jj+1].uRSSI) &&(pMgmt->sBSSList[jj+1].bActive!=false))) {
((pMgmt->sBSSList[jj].uRSSI > pMgmt->sBSSList[jj + 1].uRSSI) && (pMgmt->sBSSList[jj + 1].bActive != false))) {
memcpy(ptempBSS,&pMgmt->sBSSList[jj],sizeof(KnownBSS));
memcpy(ptempBSS, &pMgmt->sBSSList[jj], sizeof(KnownBSS));
memcpy(&pMgmt->sBSSList[jj],&pMgmt->sBSSList[jj+1],sizeof(KnownBSS));
memcpy(&pMgmt->sBSSList[jj], &pMgmt->sBSSList[jj + 1], sizeof(KnownBSS));
memcpy(&pMgmt->sBSSList[jj+1],ptempBSS,sizeof(KnownBSS));
memcpy(&pMgmt->sBSSList[jj + 1], ptempBSS, sizeof(KnownBSS));
}
......@@ -667,7 +667,7 @@ static int wpa_get_scan(PSDevice pDevice,
// pMgmt->sBSSList[ii].uRSSI);
#endif
#endif
//******mike:bubble sort by stronger RSSI*****//
......@@ -691,7 +691,7 @@ static int wpa_get_scan(PSDevice pDevice,
}
scan_buf = (struct viawget_scan_result *)pBuf;
pBSS = &(pMgmt->sBSSList[0]);
for (ii = 0, jj = 0; ii < MAX_BSS_NUM ; ii++) {
for (ii = 0, jj = 0; ii < MAX_BSS_NUM; ii++) {
pBSS = &(pMgmt->sBSSList[ii]);
if (pBSS->bActive) {
if (jj >= count)
......@@ -716,7 +716,7 @@ static int wpa_get_scan(PSDevice pDevice,
memcpy(scan_buf->rsn_ie, pBSS->byRSNIE, pBSS->wRSNLen);
}
scan_buf = (struct viawget_scan_result *)((unsigned char *)scan_buf + sizeof(struct viawget_scan_result));
jj ++;
jj++;
}
}
......@@ -757,7 +757,7 @@ static int wpa_set_associate(PSDevice pDevice,
unsigned char abyNullAddr[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
unsigned char abyWPAIE[64];
int ret = 0;
bool bWepEnabled=false;
bool bWepEnabled = false;
// set key type & algorithm
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pairwise_suite = %d\n", param->u.wpa_associate.pairwise_suite);
......@@ -790,10 +790,10 @@ static int wpa_set_associate(PSDevice pDevice,
// set bssid
if (memcmp(param->u.wpa_associate.bssid, &abyNullAddr[0], 6) != 0)
memcpy(pMgmt->abyDesireBSSID, param->u.wpa_associate.bssid, 6);
else
{
bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, pItemSSID->abySSID);
}
else
{
bScheduleCommand((void *)pDevice, WLAN_CMD_BSSID_SCAN, pItemSSID->abySSID);
}
if (param->u.wpa_associate.wpa_ie_len == 0) {
if (param->u.wpa_associate.auth_alg & AUTH_ALG_SHARED_KEY)
......@@ -824,7 +824,7 @@ else
case CIPHER_WEP40:
case CIPHER_WEP104:
pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
bWepEnabled=true;
bWepEnabled = true;
break;
case CIPHER_NONE:
if (param->u.wpa_associate.group_suite == CIPHER_CCMP)
......@@ -844,7 +844,7 @@ else
pMgmt->bShareKeyAlgorithm = true;
}
else if (pMgmt->eAuthenMode == WMAC_AUTH_OPEN) {
if(!bWepEnabled) pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled;
if (!bWepEnabled) pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled;
else pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
//pMgmt->eAuthenMode = WMAC_AUTH_OPEN;
//pMgmt->bShareKeyAlgorithm = false; //20080717-06,<Modify> by chester//Fix Open mode, WEP encryption
......@@ -856,8 +856,8 @@ else
pDevice->bEncryptionEnable = true;
else
pDevice->bEncryptionEnable = false;
if (!((pMgmt->eAuthenMode == WMAC_AUTH_SHAREKEY) ||
((pMgmt->eAuthenMode == WMAC_AUTH_OPEN) && (bWepEnabled==true))) ) //DavidWang //20080717-06,<Modify> by chester//Not to initial WEP
if (!((pMgmt->eAuthenMode == WMAC_AUTH_SHAREKEY) ||
((pMgmt->eAuthenMode == WMAC_AUTH_OPEN) && (bWepEnabled == true)))) //DavidWang //20080717-06,<Modify> by chester//Not to initial WEP
KeyvInitTable(&pDevice->sKey, pDevice->PortOffset);
spin_lock_irq(&pDevice->lock);
pDevice->bLinkPass = false;
......@@ -866,21 +866,21 @@ if (!((pMgmt->eAuthenMode == WMAC_AUTH_SHAREKEY) ||
netif_stop_queue(pDevice->dev);
//20080701-02,<Add> by Mike Liu
/*******search if ap_scan=2 ,which is associating request in hidden ssid mode ****/
{
{
PKnownBSS pCurr = NULL;
pCurr = BSSpSearchBSSList(pDevice,
pMgmt->abyDesireBSSID,
pMgmt->abyDesireSSID,
pMgmt->eConfigPHYMode
);
);
if (pCurr == NULL){
if (pCurr == NULL) {
printk("wpa_set_associate---->hidden mode site survey before associate.......\n");
bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID);
bScheduleCommand((void *)pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID);
}
}
}
/****************************************************************/
bScheduleCommand((void *) pDevice, WLAN_CMD_SSID, NULL);
bScheduleCommand((void *)pDevice, WLAN_CMD_SSID, NULL);
spin_unlock_irq(&pDevice->lock);
return ret;
......
......@@ -42,7 +42,7 @@
typedef enum { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP } wpa_alg;
typedef enum { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP,
CIPHER_WEP104 } wpa_cipher;
typedef enum { KEY_MGMT_802_1X, KEY_MGMT_CCKM,KEY_MGMT_PSK, KEY_MGMT_NONE,
typedef enum { KEY_MGMT_802_1X, KEY_MGMT_CCKM, KEY_MGMT_PSK, KEY_MGMT_NONE,
KEY_MGMT_802_1X_NO_WPA, KEY_MGMT_WPA_NONE } wpa_key_mgmt;
#define AUTH_ALG_OPEN_SYSTEM 0x01
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment