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

staging: vt6656: iwctl: Fix up variable declarations (whitespace and 'one-per-line')

Ensure that we have only one variable declaration per line and for
each of those lines we have one space between type and variable name
and if there's assignment, then we have one space on each side of the
equals sign (and no more than 80 characters per line).
Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bb6ec004
...@@ -60,7 +60,7 @@ static const long frequency_list[] = { ...@@ -60,7 +60,7 @@ static const long frequency_list[] = {
5700, 5745, 5765, 5785, 5805, 5825 5700, 5745, 5765, 5785, 5805, 5825
}; };
static int msglevel =MSG_LEVEL_INFO; static int msglevel = MSG_LEVEL_INFO;
struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev) struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev)
{ {
...@@ -172,12 +172,15 @@ int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info, ...@@ -172,12 +172,15 @@ int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info,
int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info, int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra) struct iw_point *wrq, char *extra)
{ {
int ii, jj, kk; int ii;
int jj;
int kk;
PSDevice pDevice = (PSDevice)netdev_priv(dev); PSDevice pDevice = (PSDevice)netdev_priv(dev);
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
PKnownBSS pBSS; PKnownBSS pBSS;
PWLAN_IE_SSID pItemSSID; PWLAN_IE_SSID pItemSSID;
PWLAN_IE_SUPP_RATES pSuppRates, pExtSuppRates; PWLAN_IE_SUPP_RATES pSuppRates;
PWLAN_IE_SUPP_RATES pExtSuppRates;
char *current_ev = extra; char *current_ev = extra;
char *end_buf = extra + IW_SCAN_MAX_DATA; char *end_buf = extra + IW_SCAN_MAX_DATA;
char *current_val = NULL; char *current_val = NULL;
...@@ -481,8 +484,12 @@ void iwctl_giwrange(struct net_device *dev, struct iw_request_info *info, ...@@ -481,8 +484,12 @@ void iwctl_giwrange(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra) struct iw_point *wrq, char *extra)
{ {
struct iw_range *range = (struct iw_range *) extra; struct iw_range *range = (struct iw_range *) extra;
int i,k; int i;
BYTE abySupportedRates[13]= {0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90}; int k;
BYTE abySupportedRates[13] = {
0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48,
0x60, 0x6C, 0x90
};
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRANGE\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRANGE\n");
if (wrq->pointer) { if (wrq->pointer) {
...@@ -579,7 +586,7 @@ int iwctl_siwap(struct net_device *dev, struct iw_request_info *info, ...@@ -579,7 +586,7 @@ int iwctl_siwap(struct net_device *dev, struct iw_request_info *info,
PSDevice pDevice = (PSDevice)netdev_priv(dev); PSDevice pDevice = (PSDevice)netdev_priv(dev);
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
int rc = 0; int rc = 0;
BYTE ZeroBSSID[WLAN_BSSID_LEN]={0x00,0x00,0x00,0x00,0x00,0x00}; BYTE ZeroBSSID[WLAN_BSSID_LEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
PRINT_K(" SIOCSIWAP \n"); PRINT_K(" SIOCSIWAP \n");
...@@ -596,7 +603,8 @@ int iwctl_siwap(struct net_device *dev, struct iw_request_info *info, ...@@ -596,7 +603,8 @@ int iwctl_siwap(struct net_device *dev, struct iw_request_info *info,
//mike add: if desired AP is hidden ssid(there are two same BSSID in list), //mike add: if desired AP is hidden ssid(there are two same BSSID in list),
// then ignore,because you don't known which one to be connect with?? // then ignore,because you don't known which one to be connect with??
{ {
unsigned int ii, uSameBssidNum = 0; unsigned ii;
unsigned uSameBssidNum = 0;
for (ii = 0; ii < MAX_BSS_NUM; ii++) { for (ii = 0; ii < MAX_BSS_NUM; ii++) {
if (pMgmt->sBSSList[ii].bActive && if (pMgmt->sBSSList[ii].bActive &&
!compare_ether_addr(pMgmt->sBSSList[ii].abyBSSID, !compare_ether_addr(pMgmt->sBSSList[ii].abyBSSID,
...@@ -647,7 +655,9 @@ int iwctl_giwap(struct net_device *dev, struct iw_request_info *info, ...@@ -647,7 +655,9 @@ int iwctl_giwap(struct net_device *dev, struct iw_request_info *info,
int iwctl_giwaplist(struct net_device *dev, struct iw_request_info *info, int iwctl_giwaplist(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra) struct iw_point *wrq, char *extra)
{ {
int ii,jj, rc = 0; int ii;
int jj;
int rc = 0;
struct sockaddr sock[IW_MAX_AP]; struct sockaddr sock[IW_MAX_AP];
struct iw_quality qual[IW_MAX_AP]; struct iw_quality qual[IW_MAX_AP];
PSDevice pDevice = (PSDevice)netdev_priv(dev); PSDevice pDevice = (PSDevice)netdev_priv(dev);
...@@ -741,7 +751,8 @@ int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info, ...@@ -741,7 +751,8 @@ int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info,
{ {
PKnownBSS pCurr = NULL; PKnownBSS pCurr = NULL;
BYTE abyTmpDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; BYTE abyTmpDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
unsigned int ii, uSameBssidNum = 0; unsigned ii;
unsigned uSameBssidNum = 0;
memcpy(abyTmpDesireSSID,pMgmt->abyDesireSSID,sizeof(abyTmpDesireSSID)); memcpy(abyTmpDesireSSID,pMgmt->abyDesireSSID,sizeof(abyTmpDesireSSID));
pCurr = BSSpSearchBSSList(pDevice, pCurr = BSSpSearchBSSList(pDevice,
...@@ -830,7 +841,10 @@ int iwctl_siwrate(struct net_device *dev, struct iw_request_info *info, ...@@ -830,7 +841,10 @@ int iwctl_siwrate(struct net_device *dev, struct iw_request_info *info,
int rc = 0; int rc = 0;
u8 brate = 0; u8 brate = 0;
int i; int i;
BYTE abySupportedRates[13]= {0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90}; BYTE abySupportedRates[13] = {
0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48,
0x60, 0x6C, 0x90
};
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRATE \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRATE \n");
...@@ -910,8 +924,12 @@ void iwctl_giwrate(struct net_device *dev, struct iw_request_info *info, ...@@ -910,8 +924,12 @@ void iwctl_giwrate(struct net_device *dev, struct iw_request_info *info,
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRATE \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRATE \n");
{ {
BYTE abySupportedRates[13]= {0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90}; BYTE abySupportedRates[13] = {
0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30,
0x48, 0x60, 0x6C, 0x90
};
int brate = 0; int brate = 0;
if (pDevice->uConnectionRate < 13) { if (pDevice->uConnectionRate < 13) {
brate = abySupportedRates[pDevice->uConnectionRate]; brate = abySupportedRates[pDevice->uConnectionRate];
}else { }else {
...@@ -1082,7 +1100,9 @@ int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info, ...@@ -1082,7 +1100,9 @@ int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info,
PSDevice pDevice = (PSDevice)netdev_priv(dev); PSDevice pDevice = (PSDevice)netdev_priv(dev);
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
DWORD dwKeyIndex = (DWORD)(wrq->flags & IW_ENCODE_INDEX); DWORD dwKeyIndex = (DWORD)(wrq->flags & IW_ENCODE_INDEX);
int ii,uu, rc = 0; int ii;
int uu;
int rc = 0;
int index = (wrq->flags & IW_ENCODE_INDEX); int index = (wrq->flags & IW_ENCODE_INDEX);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWENCODE \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWENCODE \n");
...@@ -1183,7 +1203,7 @@ int iwctl_giwencode(struct net_device *dev, struct iw_request_info *info, ...@@ -1183,7 +1203,7 @@ int iwctl_giwencode(struct net_device *dev, struct iw_request_info *info,
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
char abyKey[WLAN_WEP232_KEYLEN]; char abyKey[WLAN_WEP232_KEYLEN];
unsigned int index = (unsigned int)(wrq->flags & IW_ENCODE_INDEX); unsigned index = (unsigned)(wrq->flags & IW_ENCODE_INDEX);
PSKeyItem pKey = NULL; PSKeyItem pKey = NULL;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWENCODE\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWENCODE\n");
...@@ -1334,9 +1354,9 @@ int iwctl_siwauth(struct net_device *dev, struct iw_request_info *info, ...@@ -1334,9 +1354,9 @@ int iwctl_siwauth(struct net_device *dev, struct iw_request_info *info,
{ {
PSDevice pDevice = (PSDevice)netdev_priv(dev); PSDevice pDevice = (PSDevice)netdev_priv(dev);
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
int ret=0; int ret = 0;
static int wpa_version=0; //must be static to save the last value,einsn liu static int wpa_version = 0; //must be static to save the last value,einsn liu
static int pairwise=0; static int pairwise = 0;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWAUTH \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWAUTH \n");
switch (wrq->flags & IW_AUTH_INDEX) { switch (wrq->flags & IW_AUTH_INDEX) {
...@@ -1441,7 +1461,7 @@ int iwctl_siwgenie(struct net_device *dev, struct iw_request_info *info, ...@@ -1441,7 +1461,7 @@ int iwctl_siwgenie(struct net_device *dev, struct iw_request_info *info,
{ {
PSDevice pDevice = (PSDevice)netdev_priv(dev); PSDevice pDevice = (PSDevice)netdev_priv(dev);
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
int ret=0; int ret = 0;
if(wrq->length){ if(wrq->length){
if ((wrq->length < 2) || (extra[1]+2 != wrq->length)) { if ((wrq->length < 2) || (extra[1]+2 != wrq->length)) {
...@@ -1472,7 +1492,7 @@ int iwctl_giwgenie(struct net_device *dev, struct iw_request_info *info, ...@@ -1472,7 +1492,7 @@ int iwctl_giwgenie(struct net_device *dev, struct iw_request_info *info,
{ {
PSDevice pDevice = (PSDevice)netdev_priv(dev); PSDevice pDevice = (PSDevice)netdev_priv(dev);
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
int ret=0; int ret = 0;
int space = wrq->length; int space = wrq->length;
wrq->length = 0; wrq->length = 0;
...@@ -1498,14 +1518,16 @@ int iwctl_siwencodeext(struct net_device *dev, struct iw_request_info *info, ...@@ -1498,14 +1518,16 @@ int iwctl_siwencodeext(struct net_device *dev, struct iw_request_info *info,
//original member //original member
wpa_alg alg_name; wpa_alg alg_name;
u8 addr[6]; u8 addr[6];
int key_idx, set_tx=0; int key_idx;
int set_tx=0;
u8 seq[IW_ENCODE_SEQ_MAX_SIZE]; u8 seq[IW_ENCODE_SEQ_MAX_SIZE];
u8 key[64]; u8 key[64];
size_t seq_len=0,key_len=0; size_t seq_len = 0;
size_t key_len = 0;
u8 *buf; u8 *buf;
size_t blen; size_t blen;
u8 key_array[64]; u8 key_array[64];
int ret=0; int ret = 0;
PRINT_K("SIOCSIWENCODEEXT...... \n"); PRINT_K("SIOCSIWENCODEEXT...... \n");
...@@ -1647,8 +1669,7 @@ int iwctl_siwmlme(struct net_device *dev, struct iw_request_info *info, ...@@ -1647,8 +1669,7 @@ int iwctl_siwmlme(struct net_device *dev, struct iw_request_info *info,
#endif #endif
static const iw_handler iwctl_handler[] = static const iw_handler iwctl_handler[] = {
{
(iw_handler) NULL, /* SIOCSIWCOMMIT */ (iw_handler) NULL, /* SIOCSIWCOMMIT */
(iw_handler) NULL, // SIOCGIWNAME (iw_handler) NULL, // SIOCGIWNAME
(iw_handler) NULL, // SIOCSIWNWID (iw_handler) NULL, // SIOCSIWNWID
...@@ -1707,8 +1728,7 @@ static const iw_handler iwctl_handler[] = ...@@ -1707,8 +1728,7 @@ static const iw_handler iwctl_handler[] =
(iw_handler) NULL, // -- hole -- (iw_handler) NULL, // -- hole --
}; };
static const iw_handler iwctl_private_handler[] = static const iw_handler iwctl_private_handler[] = {
{
NULL, // SIOCIWFIRSTPRIV NULL, // SIOCIWFIRSTPRIV
}; };
...@@ -1718,8 +1738,7 @@ struct iw_priv_args iwctl_private_args[] = { ...@@ -1718,8 +1738,7 @@ struct iw_priv_args iwctl_private_args[] = {
"set"}, "set"},
}; };
const struct iw_handler_def iwctl_handler_def = const struct iw_handler_def iwctl_handler_def = {
{
.get_wireless_stats = &iwctl_get_wireless_stats, .get_wireless_stats = &iwctl_get_wireless_stats,
.num_standard = sizeof(iwctl_handler)/sizeof(iw_handler), .num_standard = sizeof(iwctl_handler)/sizeof(iw_handler),
.num_private = 0, .num_private = 0,
......
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