Commit 48746d7f authored by Jesper Juhl's avatar Jesper Juhl Committed by Greg Kroah-Hartman

staging: vt6656: iwctl: Fix indentation

Fix indentation for the entire files to use tabs rather than spaces
and also make sure everything is indented to the proper depth
according to context.
Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 921cd68b
......@@ -58,7 +58,7 @@ static const long frequency_list[] = {
5035, 5040, 5045, 5055, 5060, 5080, 5170, 5180, 5190, 5200, 5210, 5220, 5230, 5240,
5260, 5280, 5300, 5320, 5500, 5520, 5540, 5560, 5580, 5600, 5620, 5640, 5660, 5680,
5700, 5745, 5765, 5785, 5805, 5825
};
};
static int msglevel =MSG_LEVEL_INFO;
......@@ -111,20 +111,20 @@ int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info,
PRINT_K(" SIOCSIWSCAN \n");
if (pMgmt->eScanState == WMAC_IS_SCANNING) {
if (pMgmt->eScanState == WMAC_IS_SCANNING) {
// In scanning..
PRINT_K("SIOCSIWSCAN(overlap??)-->In scanning...\n");
return -EAGAIN;
}
if(pDevice->byReAssocCount > 0) { //reject scan when re-associating!
if(pDevice->byReAssocCount > 0) { //reject scan when re-associating!
//send scan event to wpa_Supplicant
union iwreq_data wrqu;
PRINT_K("wireless_send_event--->SIOCGIWSCAN(scan done)\n");
memset(&wrqu, 0, sizeof(wrqu));
wireless_send_event(pDevice->dev, SIOCGIWSCAN, &wrqu, NULL);
return 0;
}
}
spin_lock_irq(&pDevice->lock);
......@@ -708,10 +708,10 @@ int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info,
memset(pMgmt->abyDesireSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
memset(pMgmt->abyDesireBSSID, 0xFF,6);
PRINT_K("set essid to 'any' \n");
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
//Unknown desired AP,so here need not associate??
return 0;
#endif
#endif
} else {
// Set the SSID
memset(pMgmt->abyDesireSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
......@@ -785,7 +785,7 @@ int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info,
}
return 0;
}
#endif
#endif
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set essid = %s \n", pItemSSID->abySSID);
}
......@@ -1463,7 +1463,7 @@ int iwctl_siwgenie(struct net_device *dev, struct iw_request_info *info,
pMgmt->wWPAIELen = 0;
}
out://not completely ...not necessary in wpa_supplicant 0.5.8
out://not completely ...not necessary in wpa_supplicant 0.5.8
return ret;
}
......@@ -1507,17 +1507,17 @@ int iwctl_siwencodeext(struct net_device *dev, struct iw_request_info *info,
u8 key_array[64];
int ret=0;
PRINT_K("SIOCSIWENCODEEXT...... \n");
PRINT_K("SIOCSIWENCODEEXT...... \n");
blen = sizeof(*param);
buf = kmalloc((int)blen, (int)GFP_KERNEL);
if (buf == NULL)
blen = sizeof(*param);
buf = kmalloc((int)blen, (int)GFP_KERNEL);
if (buf == NULL)
return -ENOMEM;
memset(buf, 0, blen);
param = (struct viawget_wpa_param *) buf;
memset(buf, 0, blen);
param = (struct viawget_wpa_param *) buf;
//recover alg_name
switch (ext->alg) {
switch (ext->alg) {
case IW_ENCODE_ALG_NONE:
alg_name = WPA_ALG_NONE;
break;
......@@ -1540,7 +1540,7 @@ switch (ext->alg) {
//recover key_idx
key_idx = (wrq->flags&IW_ENCODE_INDEX) - 1;
//recover set_tx
if(ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY)
if(ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY)
set_tx = 1;
//recover seq,seq_len
if(ext->ext_flags & IW_ENCODE_EXT_RX_SEQ_VALID) {
......@@ -1548,12 +1548,12 @@ if(ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY)
memcpy(seq, ext->rx_seq, seq_len);
}
//recover key,key_len
if(ext->key_len) {
if(ext->key_len) {
key_len=ext->key_len;
memcpy(key, &ext->key[0], key_len);
}
memset(key_array, 0, 64);
if ( key_len > 0) {
memset(key_array, 0, 64);
if ( key_len > 0) {
memcpy(key_array, key, key_len);
if (key_len == 32) {
// notice ! the oder
......@@ -1563,18 +1563,18 @@ if ( key_len > 0) {
}
/**************Translate iw_encode_ext to viawget_wpa_param****************/
memcpy(param->addr, addr, ETH_ALEN);
param->u.wpa_key.alg_name = (int)alg_name;
param->u.wpa_key.set_tx = set_tx;
param->u.wpa_key.key_index = key_idx;
param->u.wpa_key.key_len = key_len;
param->u.wpa_key.key = (u8 *)key_array;
param->u.wpa_key.seq = (u8 *)seq;
param->u.wpa_key.seq_len = seq_len;
memcpy(param->addr, addr, ETH_ALEN);
param->u.wpa_key.alg_name = (int)alg_name;
param->u.wpa_key.set_tx = set_tx;
param->u.wpa_key.key_index = key_idx;
param->u.wpa_key.key_len = key_len;
param->u.wpa_key.key = (u8 *)key_array;
param->u.wpa_key.seq = (u8 *)seq;
param->u.wpa_key.seq_len = seq_len;
//****set if current action is Network Manager count??
//****this method is so foolish,but there is no other way???
if(param->u.wpa_key.alg_name == WPA_ALG_NONE) {
if(param->u.wpa_key.alg_name == WPA_ALG_NONE) {
if(param->u.wpa_key.key_index ==0) {
pDevice->bwextstep0 = TRUE;
}
......@@ -1591,7 +1591,7 @@ if(param->u.wpa_key.alg_name == WPA_ALG_NONE) {
pDevice->bwextstep3 = TRUE;
}
}
if(pDevice->bwextstep3 == TRUE) {
if(pDevice->bwextstep3 == TRUE) {
PRINT_K("SIOCSIWENCODEEXT:Enable WPA WEXT SUPPORT!!!!!\n");
pDevice->bwextstep0 = FALSE;
pDevice->bwextstep1 = FALSE;
......@@ -1607,7 +1607,7 @@ if(pDevice->bwextstep3 == TRUE) {
spin_unlock_irq(&pDevice->lock);
error:
kfree(param);
kfree(param);
return ret;
}
......@@ -1713,7 +1713,7 @@ static const iw_handler iwctl_private_handler[] =
};
struct iw_priv_args iwctl_private_args[] = {
{ IOCTL_CMD_SET,
{ IOCTL_CMD_SET,
IW_PRIV_TYPE_CHAR | 1024, 0,
"set"},
};
......
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