Commit a4fb3e78 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: checkpatch cleanup BBvCalculateParameter.

White space clean up.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 030ede1e
......@@ -731,129 +731,117 @@ void BBvCalculateParameter(struct vnt_private *pDevice, u32 cbFrameLength,
int bExtBit;
u8 byPreambleType = pDevice->byPreambleType;
cbBitCount = cbFrameLength * 8;
bExtBit = false;
switch (wRate) {
case RATE_1M :
cbUsCount = cbBitCount;
phy->signal = 0x00;
break;
case RATE_2M :
cbUsCount = cbBitCount / 2;
if (byPreambleType == 1)
phy->signal = 0x09;
else // long preamble
phy->signal = 0x01;
break;
case RATE_5M :
cbUsCount = (cbBitCount * 10) / 55;
cbTmp = (cbUsCount * 55) / 10;
if (cbTmp != cbBitCount)
cbUsCount ++;
if (byPreambleType == 1)
phy->signal = 0x0a;
else // long preamble
phy->signal = 0x02;
break;
case RATE_11M :
cbUsCount = cbBitCount / 11;
cbTmp = cbUsCount * 11;
if (cbTmp != cbBitCount) {
cbUsCount ++;
if ((cbBitCount - cbTmp) <= 3)
bExtBit = true;
}
if (byPreambleType == 1)
phy->signal = 0x0b;
else // long preamble
phy->signal = 0x03;
break;
case RATE_6M :
if(byPacketType == PK_TYPE_11A) {//11a, 5GHZ
phy->signal = 0x9b;
}
else {//11g, 2.4GHZ
phy->signal = 0x8b;
}
break;
cbBitCount = cbFrameLength * 8;
bExtBit = false;
case RATE_9M :
if(byPacketType == PK_TYPE_11A) {//11a, 5GHZ
phy->signal = 0x9f;
}
else {//11g, 2.4GHZ
phy->signal = 0x8f;
}
break;
switch (wRate) {
case RATE_1M:
cbUsCount = cbBitCount;
case RATE_12M :
if(byPacketType == PK_TYPE_11A) {//11a, 5GHZ
phy->signal = 0x9a;
}
else {//11g, 2.4GHZ
phy->signal = 0x8a;
}
break;
phy->signal = 0x00;
case RATE_18M :
if(byPacketType == PK_TYPE_11A) {//11a, 5GHZ
phy->signal = 0x9e;
}
else {//11g, 2.4GHZ
phy->signal = 0x8e;
}
break;
break;
case RATE_2M:
cbUsCount = cbBitCount / 2;
case RATE_24M :
if(byPacketType == PK_TYPE_11A) {//11a, 5GHZ
phy->signal = 0x99;
}
else {//11g, 2.4GHZ
phy->signal = 0x89;
}
break;
if (byPreambleType == 1)
phy->signal = 0x09;
else
phy->signal = 0x01;
case RATE_36M :
if(byPacketType == PK_TYPE_11A) {//11a, 5GHZ
phy->signal = 0x9d;
}
else {//11g, 2.4GHZ
phy->signal = 0x8d;
}
break;
break;
case RATE_5M:
cbUsCount = (cbBitCount * 10) / 55;
cbTmp = (cbUsCount * 55) / 10;
case RATE_48M :
if(byPacketType == PK_TYPE_11A) {//11a, 5GHZ
phy->signal = 0x98;
}
else {//11g, 2.4GHZ
phy->signal = 0x88;
}
break;
if (cbTmp != cbBitCount)
cbUsCount++;
case RATE_54M :
if (byPacketType == PK_TYPE_11A) {//11a, 5GHZ
phy->signal = 0x9c;
}
else {//11g, 2.4GHZ
phy->signal = 0x8c;
}
break;
if (byPreambleType == 1)
phy->signal = 0x0a;
else
phy->signal = 0x02;
default :
if (byPacketType == PK_TYPE_11A) {//11a, 5GHZ
phy->signal = 0x9c;
}
else {//11g, 2.4GHZ
phy->signal = 0x8c;
}
break;
}
break;
case RATE_11M:
cbUsCount = cbBitCount / 11;
cbTmp = cbUsCount * 11;
if (cbTmp != cbBitCount) {
cbUsCount++;
if ((cbBitCount - cbTmp) <= 3)
bExtBit = true;
}
if (byPreambleType == 1)
phy->signal = 0x0b;
else
phy->signal = 0x03;
break;
case RATE_6M:
if (byPacketType == PK_TYPE_11A)
phy->signal = 0x9b;
else
phy->signal = 0x8b;
break;
case RATE_9M:
if (byPacketType == PK_TYPE_11A)
phy->signal = 0x9f;
else
phy->signal = 0x8f;
break;
case RATE_12M:
if (byPacketType == PK_TYPE_11A)
phy->signal = 0x9a;
else
phy->signal = 0x8a;
break;
case RATE_18M:
if (byPacketType == PK_TYPE_11A)
phy->signal = 0x9e;
else
phy->signal = 0x8e;
break;
case RATE_24M:
if (byPacketType == PK_TYPE_11A)
phy->signal = 0x99;
else
phy->signal = 0x89;
break;
case RATE_36M:
if (byPacketType == PK_TYPE_11A)
phy->signal = 0x9d;
else
phy->signal = 0x8d;
break;
case RATE_48M:
if (byPacketType == PK_TYPE_11A)
phy->signal = 0x98;
else
phy->signal = 0x88;
break;
case RATE_54M:
if (byPacketType == PK_TYPE_11A)
phy->signal = 0x9c;
else
phy->signal = 0x8c;
break;
default:
if (byPacketType == PK_TYPE_11A)
phy->signal = 0x9c;
else
phy->signal = 0x8c;
break;
}
if (byPacketType == PK_TYPE_11B) {
phy->service = 0x00;
......
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