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