Commit 3cef1a2e authored by Nandini Hanumanthagowda's avatar Nandini Hanumanthagowda Committed by Greg Kroah-Hartman

staging: vt6656: fixed indentation and unnecessary space errors

Fixed the indentation errors and removed unnecessary space
warnings to comply with coding style
Signed-off-by: default avatarNandini Hanumanthagowda <nandu.hgowda@gmail.com>
Reviewed-by: default avatarLisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2467635e
......@@ -44,9 +44,9 @@
#include "rf.h"
/* static int msglevel = MSG_LEVEL_DEBUG; */
static int msglevel =MSG_LEVEL_INFO;
const u8 acbyIERate[MAX_RATE] =
{0x02, 0x04, 0x0B, 0x16, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C};
static int msglevel = MSG_LEVEL_INFO;
const u8 acbyIERate[MAX_RATE] = {0x02, 0x04, 0x0B, 0x16, 0x0C, 0x12, 0x18,
0x24, 0x30, 0x48, 0x60, 0x6C};
#define AUTORATE_TXOK_CNT 0x0400
#define AUTORATE_TXFAIL_CNT 0x0064
......@@ -97,17 +97,14 @@ void s_vResetCounter(PKnownNodeDB psNodeDBTable)
* Return Value: RateIdx
*
-*/
u16
RATEwGetRateIdx(
u8 byRate
)
u16 RATEwGetRateIdx(u8 byRate)
{
u16 ii;
/* erase BasicRate flag */
byRate = byRate & 0x7F;
for (ii = 0; ii < MAX_RATE; ii ++) {
for (ii = 0; ii < MAX_RATE; ii++) {
if (acbyIERate[ii] == byRate)
return ii;
}
......@@ -168,7 +165,9 @@ void RATEvParseMaxRate(struct vnt_private *pDevice,
* pDevice->byTopOFDMBasicRate
*/
CARDbAddBasicRate((void *)pDevice, RATEwGetRateIdx(byRate));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate AddBasicRate: %d\n", RATEwGetRateIdx(byRate));
DBG_PRT(MSG_LEVEL_DEBUG,
KERN_INFO"ParseMaxRate AddBasicRate: %d\n",
RATEwGetRateIdx(byRate));
}
byRate = (u8)(pItemRates->abyRates[ii]&0x7F);
if (byHighSuppRate == 0)
......@@ -185,7 +184,7 @@ void RATEvParseMaxRate(struct vnt_private *pDevice,
if (uExtRateLen > WLAN_RATES_MAXLEN)
uExtRateLen = WLAN_RATES_MAXLEN;
for (ii = 0; ii < uExtRateLen ; ii++) {
for (ii = 0; ii < uExtRateLen; ii++) {
byRate = (u8)(pItemExtRates->abyRates[ii]);
/* select highest basic rate */
if (WLAN_MGMT_IS_BASICRATE(pItemExtRates->abyRates[ii])) {
......@@ -194,7 +193,9 @@ void RATEvParseMaxRate(struct vnt_private *pDevice,
* pDevice->byTopOFDMBasicRate
*/
CARDbAddBasicRate((void *)pDevice, RATEwGetRateIdx(byRate));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate AddBasicRate: %d\n", RATEwGetRateIdx(byRate));
DBG_PRT(MSG_LEVEL_DEBUG,
KERN_INFO"ParseMaxRate AddBasicRate: %d\n",
RATEwGetRateIdx(byRate));
}
byRate = (u8)(pItemExtRates->abyRates[ii]&0x7F);
if (byHighSuppRate == 0)
......@@ -204,7 +205,8 @@ void RATEvParseMaxRate(struct vnt_private *pDevice,
*pwSuppRate |= (1<<RATEwGetRateIdx(byRate));
/* DBG_PRN_GRP09(("ParseMaxRate : HighSuppRate: %d, %X\n",
RATEwGetRateIdx(byRate), byRate)); */
* RATEwGetRateIdx(byRate), byRate));
*/
}
}
......@@ -216,7 +218,7 @@ void RATEvParseMaxRate(struct vnt_private *pDevice,
*pbyTopCCKRate = pDevice->byTopCCKBasicRate;
*pbyTopOFDMRate = pDevice->byTopOFDMBasicRate;
*pwMaxSuppRate = RATEwGetRateIdx(byHighSuppRate);
if ((pDevice->byPacketType==PK_TYPE_11B) || (pDevice->byPacketType==PK_TYPE_11GB))
if ((pDevice->byPacketType == PK_TYPE_11B) || (pDevice->byPacketType == PK_TYPE_11GB))
*pwMaxBasicRate = pDevice->byTopCCKBasicRate;
else
*pwMaxBasicRate = pDevice->byTopOFDMBasicRate;
......@@ -287,8 +289,8 @@ void RATEvTxRateFallBack(struct vnt_private *pDevice,
}
for (ii = 0; ii <= psNodeDBTable->wTxDataRate; ii++) {
if ( (psNodeDBTable->uTxOk[ii] != 0) ||
(psNodeDBTable->uTxFail[ii] != 0) ) {
if ((psNodeDBTable->uTxOk[ii] != 0) ||
(psNodeDBTable->uTxFail[ii] != 0)) {
dwThroughputTbl[ii] *= psNodeDBTable->uTxOk[ii];
if (ii < RATE_11M) {
psNodeDBTable->uTxFail[ii] *= 4;
......@@ -303,8 +305,8 @@ void RATEvTxRateFallBack(struct vnt_private *pDevice,
wIdxDownRate = psNodeDBTable->wTxDataRate;
for (ii = psNodeDBTable->wTxDataRate; ii > 0;) {
ii--;
if ( (dwThroughputTbl[ii] > dwThroughput) &&
(bAutoRate[ii]==true) ) {
if ((dwThroughputTbl[ii] > dwThroughput) &&
(bAutoRate[ii] == true)) {
dwThroughput = dwThroughputTbl[ii];
wIdxDownRate = (u16) ii;
}
......@@ -312,7 +314,7 @@ void RATEvTxRateFallBack(struct vnt_private *pDevice,
psNodeDBTable->wTxDataRate = wIdxDownRate;
if (psNodeDBTable->uTxOk[MAX_RATE]) {
if (psNodeDBTable->uTxOk[MAX_RATE] >
(psNodeDBTable->uTxFail[MAX_RATE] * 4) ) {
(psNodeDBTable->uTxFail[MAX_RATE] * 4)) {
psNodeDBTable->wTxDataRate = wIdxUpRate;
}
} else { /* adhoc, if uTxOk(total) == 0 & uTxFail(total) == 0 */
......@@ -324,7 +326,7 @@ void RATEvTxRateFallBack(struct vnt_private *pDevice,
if (psNodeDBTable->wTxDataRate <= RATE_11M)
psNodeDBTable->wTxDataRate = RATE_6M;
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"uTxOk[MAX_RATE] %d, uTxFail[MAX_RATE]:%d\n",(int)psNodeDBTable->uTxOk[MAX_RATE], (int)psNodeDBTable->uTxFail[MAX_RATE]);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"uTxOk[MAX_RATE] %d, uTxFail[MAX_RATE]:%d\n", (int)psNodeDBTable->uTxOk[MAX_RATE], (int)psNodeDBTable->uTxFail[MAX_RATE]);
s_vResetCounter(psNodeDBTable);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Rate: %d, U:%d, D:%d\n", (int)psNodeDBTable->wTxDataRate, (int)wIdxUpRate, (int)wIdxDownRate);
return;
......@@ -343,12 +345,8 @@ void RATEvTxRateFallBack(struct vnt_private *pDevice,
* Return Value: None
*
-*/
u8
RATEuSetIE (
PWLAN_IE_SUPP_RATES pSrcRates,
PWLAN_IE_SUPP_RATES pDstRates,
unsigned int uRateLen
)
u8 RATEuSetIE(PWLAN_IE_SUPP_RATES pSrcRates, PWLAN_IE_SUPP_RATES pDstRates,
unsigned int uRateLen)
{
unsigned int ii, uu, uRateCnt = 0;
......@@ -361,11 +359,10 @@ RATEuSetIE (
for (ii = 0; ii < uRateLen; ii++) {
for (uu = 0; uu < pSrcRates->len; uu++) {
if ((pSrcRates->abyRates[uu] & 0x7F) == acbyIERate[ii]) {
pDstRates->abyRates[uRateCnt ++] = pSrcRates->abyRates[uu];
pDstRates->abyRates[uRateCnt++] = pSrcRates->abyRates[uu];
break;
}
}
}
return (u8)uRateCnt;
}
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