staging: winbond: mds.c: Fixed all checkpatch's errors

Just fixed all checkpatch's errors but not the warinings.

Signed-off-by: Victor Rosales <victorhrosales@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Victor Rosales 2010-09-19 17:53:00 -03:00 committed by Greg Kroah-Hartman
parent 0fe212f7e3
commit a1b0925293
1 changed files with 81 additions and 90 deletions

View File

@ -49,8 +49,7 @@ static void Mds_DurationSet(struct wbsoft_priv *adapter, struct wb35_descriptor
/****************************************** /******************************************
* Set RTS/CTS mechanism * Set RTS/CTS mechanism
******************************************/ ******************************************/
if (!boGroupAddr) if (!boGroupAddr) {
{
/* NOTE : If the protection mode is enabled and the MSDU will be fragmented, /* NOTE : If the protection mode is enabled and the MSDU will be fragmented,
* the tx rates of MPDUs will all be DSSS rates. So it will not use * the tx rates of MPDUs will all be DSSS rates. So it will not use
* CTS-to-self in this case. CTS-To-self will only be used when without * CTS-to-self in this case. CTS-To-self will only be used when without
@ -60,20 +59,16 @@ static void Mds_DurationSet(struct wbsoft_priv *adapter, struct wb35_descriptor
if (BodyLen >= CURRENT_RTS_THRESHOLD) if (BodyLen >= CURRENT_RTS_THRESHOLD)
RTS_on = true; /* Using RTS */ RTS_on = true; /* Using RTS */
else else {
{ if (pT01->T01_modulation_type) { /* Is using OFDM */
if( pT01->T01_modulation_type ) /* Is using OFDM */
{
if (CURRENT_PROTECT_MECHANISM) /* Is using protect */ if (CURRENT_PROTECT_MECHANISM) /* Is using protect */
CTS_on = true; /* Using CTS */ CTS_on = true; /* Using CTS */
} }
} }
} }
if( RTS_on || CTS_on ) if (RTS_on || CTS_on) {
{ if (pT01->T01_modulation_type) { /* Is using OFDM */
if( pT01->T01_modulation_type) /* Is using OFDM */
{
/* CTS duration /* CTS duration
* 2 SIFS + DATA transmit time + 1 ACK * 2 SIFS + DATA transmit time + 1 ACK
* ACK Rate : 24 Mega bps * ACK Rate : 24 Mega bps
@ -82,9 +77,7 @@ static void Mds_DurationSet(struct wbsoft_priv *adapter, struct wb35_descriptor
2*PREAMBLE_PLUS_SIGNAL_PLUS_SIGNALEXTENSION + 2*PREAMBLE_PLUS_SIGNAL_PLUS_SIGNALEXTENSION +
((BodyLen*8 + 22 + Rate*4 - 1)/(Rate*4))*Tsym + ((BodyLen*8 + 22 + Rate*4 - 1)/(Rate*4))*Tsym +
((112 + 22 + 95)/96)*Tsym; ((112 + 22 + 95)/96)*Tsym;
} } else { /* DSSS */
else /* DSSS */
{
/* CTS duration /* CTS duration
* 2 SIFS + DATA transmit time + 1 ACK * 2 SIFS + DATA transmit time + 1 ACK
* Rate : ?? Mega bps * Rate : ?? Mega bps
@ -98,19 +91,15 @@ static void Mds_DurationSet(struct wbsoft_priv *adapter, struct wb35_descriptor
DEFAULT_SIFSTIME*2); DEFAULT_SIFSTIME*2);
} }
if( RTS_on ) if (RTS_on) {
{ if (pT01->T01_modulation_type) { /* Is using OFDM */
if( pT01->T01_modulation_type ) /* Is using OFDM */
{
/* CTS + 1 SIFS + CTS duration /* CTS + 1 SIFS + CTS duration
* CTS Rate : 24 Mega bps * CTS Rate : 24 Mega bps
* CTS frame length = 14 bytes */ * CTS frame length = 14 bytes */
Duration += (DEFAULT_SIFSTIME + Duration += (DEFAULT_SIFSTIME +
PREAMBLE_PLUS_SIGNAL_PLUS_SIGNALEXTENSION + PREAMBLE_PLUS_SIGNAL_PLUS_SIGNALEXTENSION +
((112 + 22 + 95)/96)*Tsym); ((112 + 22 + 95)/96)*Tsym);
} } else {
else
{
/* CTS + 1 SIFS + CTS duration /* CTS + 1 SIFS + CTS duration
* CTS Rate : ?? Mega bps * CTS Rate : ?? Mega bps
* CTS frame length = 14 bytes */ * CTS frame length = 14 bytes */
@ -134,15 +123,12 @@ static void Mds_DurationSet(struct wbsoft_priv *adapter, struct wb35_descriptor
******************************************/ ******************************************/
if (boGroupAddr) if (boGroupAddr)
Duration = 0; Duration = 0;
else else {
{ for (i = pDes->FragmentCount-1; i > 0; i--) {
for( i=pDes->FragmentCount-1; i>0; i-- )
{
NextBodyLen = (u16)pNextT00->T00_frame_length; NextBodyLen = (u16)pNextT00->T00_frame_length;
NextBodyLen += 4; /* CRC */ NextBodyLen += 4; /* CRC */
if( pT01->T01_modulation_type ) if (pT01->T01_modulation_type) {
{
/* OFDM /* OFDM
* data transmit time + 3 SIFS + 2 ACK * data transmit time + 3 SIFS + 2 ACK
* Rate : ??Mega bps * Rate : ??Mega bps
@ -151,9 +137,7 @@ static void Mds_DurationSet(struct wbsoft_priv *adapter, struct wb35_descriptor
Duration += (((NextBodyLen*8 + 22 + Rate*4 - 1)/(Rate*4)) * Tsym + Duration += (((NextBodyLen*8 + 22 + Rate*4 - 1)/(Rate*4)) * Tsym +
(((2*14)*8 + 22 + 95)/96)*Tsym + (((2*14)*8 + 22 + 95)/96)*Tsym +
DEFAULT_SIFSTIME*3); DEFAULT_SIFSTIME*3);
} } else {
else
{
/* DSSS /* DSSS
* data transmit time + 2 ACK + 3 SIFS * data transmit time + 2 ACK + 3 SIFS
* Rate : ??Mega bps * Rate : ??Mega bps
@ -184,8 +168,7 @@ static void Mds_DurationSet(struct wbsoft_priv *adapter, struct wb35_descriptor
/******************************************* /*******************************************
* Fill the last fragment descriptor * Fill the last fragment descriptor
*******************************************/ *******************************************/
if( pT01->T01_modulation_type ) if (pT01->T01_modulation_type) {
{
/* OFDM /* OFDM
* 1 SIFS + 1 ACK * 1 SIFS + 1 ACK
* Rate : 24 Mega bps * Rate : 24 Mega bps
@ -193,9 +176,7 @@ static void Mds_DurationSet(struct wbsoft_priv *adapter, struct wb35_descriptor
Duration = PREAMBLE_PLUS_SIGNAL_PLUS_SIGNALEXTENSION; Duration = PREAMBLE_PLUS_SIGNAL_PLUS_SIGNALEXTENSION;
/* The Tx rate of ACK use 24M */ /* The Tx rate of ACK use 24M */
Duration += (((112 + 22 + 95)/96)*Tsym + DEFAULT_SIFSTIME); Duration += (((112 + 22 + 95)/96)*Tsym + DEFAULT_SIFSTIME);
} } else {
else
{
/* DSSS /* DSSS
* 1 ACK + 1 SIFS * 1 ACK + 1 SIFS
* Rate : ?? Mega bps * Rate : ?? Mega bps
@ -289,9 +270,7 @@ static u16 Mds_BodyCopy(struct wbsoft_priv *adapter, struct wb35_descriptor *pDe
pMds->MicWriteAddress[pMds->MicWriteIndex] = buffer - pMds->MicAdd; pMds->MicWriteAddress[pMds->MicWriteIndex] = buffer - pMds->MicAdd;
pMds->MicWriteSize[pMds->MicWriteIndex] = pMds->MicAdd; pMds->MicWriteSize[pMds->MicWriteIndex] = pMds->MicAdd;
pMds->MicAdd = 0; pMds->MicAdd = 0;
} } else if (SizeLeft < 8) { /* 931130.5.p */
else if( SizeLeft < 8 ) /* 931130.5.p */
{
pMds->MicAdd = SizeLeft; pMds->MicAdd = SizeLeft;
pMds->MicWriteAddress[pMds->MicWriteIndex] = buffer - (8 - SizeLeft); pMds->MicWriteAddress[pMds->MicWriteIndex] = buffer - (8 - SizeLeft);
pMds->MicWriteSize[pMds->MicWriteIndex] = 8 - SizeLeft; pMds->MicWriteSize[pMds->MicWriteIndex] = 8 - SizeLeft;
@ -383,18 +362,30 @@ static void Mds_HeaderCopy(struct wbsoft_priv *adapter, struct wb35_descriptor *
pMds->TxRate[pDes->Descriptor_ID][i] = ctmp1; /* backup the ta rate and fall back rate */ pMds->TxRate[pDes->Descriptor_ID][i] = ctmp1; /* backup the ta rate and fall back rate */
if( ctmp1 == 108) ctmp2 = 7; if (ctmp1 == 108)
else if( ctmp1 == 96 ) ctmp2 = 6; /* Rate convert for USB */ ctmp2 = 7;
else if( ctmp1 == 72 ) ctmp2 = 5; else if (ctmp1 == 96)
else if( ctmp1 == 48 ) ctmp2 = 4; ctmp2 = 6; /* Rate convert for USB */
else if( ctmp1 == 36 ) ctmp2 = 3; else if (ctmp1 == 72)
else if( ctmp1 == 24 ) ctmp2 = 2; ctmp2 = 5;
else if( ctmp1 == 18 ) ctmp2 = 1; else if (ctmp1 == 48)
else if( ctmp1 == 12 ) ctmp2 = 0; ctmp2 = 4;
else if( ctmp1 == 22 ) ctmp2 = 3; else if (ctmp1 == 36)
else if( ctmp1 == 11 ) ctmp2 = 2; ctmp2 = 3;
else if( ctmp1 == 4 ) ctmp2 = 1; else if (ctmp1 == 24)
else ctmp2 = 0; /* if( ctmp1 == 2 ) or default */ ctmp2 = 2;
else if (ctmp1 == 18)
ctmp2 = 1;
else if (ctmp1 == 12)
ctmp2 = 0;
else if (ctmp1 == 22)
ctmp2 = 3;
else if (ctmp1 == 11)
ctmp2 = 2;
else if (ctmp1 == 4)
ctmp2 = 1;
else
ctmp2 = 0; /* if( ctmp1 == 2 ) or default */
if (i == 0) if (i == 0)
pT01->T01_transmit_rate = ctmp2; pT01->T01_transmit_rate = ctmp2;