Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281178
b: refs/heads/master
c: f001d7e
h: refs/heads/master
v: v3
  • Loading branch information
Marcos Paulo de Souza authored and Greg Kroah-Hartman committed Nov 30, 2011
1 parent 133af68 commit 498ce90
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 46 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6318237691e2526823b88e9a49456a42c794a0af
refs/heads/master: f001d7e28c2e66a789fc73f08e9fcbc175ac5971
59 changes: 14 additions & 45 deletions trunk/drivers/staging/vt6656/baseband.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,30 +932,8 @@ BBvCaculateParameter (
void
BBvSetAntennaMode (PSDevice pDevice, BYTE byAntennaMode)
{
//{{ RobertYu: 20041124, ABG Mode, VC1/VC2 define, make the ANT_A, ANT_B inverted
/*if ( (pDevice->byRFType == RF_MAXIM2829) ||
(pDevice->byRFType == RF_UW2452) ||
(pDevice->byRFType == RF_AIROHA7230) ) { // RobertYu: 20041210, 20050104
switch (byAntennaMode) {
case ANT_TXA:
byAntennaMode = ANT_TXB;
break;
case ANT_TXB:
byAntennaMode = ANT_TXA;
break;
case ANT_RXA:
byAntennaMode = ANT_RXB;
break;
case ANT_RXB:
byAntennaMode = ANT_RXA;
break;
}
}*/

switch (byAntennaMode) {
case ANT_TXA:
break;
case ANT_TXB:
break;
case ANT_RXA:
Expand Down Expand Up @@ -1249,8 +1227,7 @@ void BBvLoopbackOff (PSDevice pDevice)
// Set the CR33 Bit2 to disable internal Loopback.
ControlvReadByte (pDevice, MESSAGE_REQUEST_BBREG, 0x21, &byData);//CR33
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x21, (BYTE)(byData & 0xFE));//CR33
}
else { // OFDM
} else { /* OFDM */
ControlvReadByte (pDevice, MESSAGE_REQUEST_BBREG, 0x9A, &byData);//CR154
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x9A, (BYTE)(byData & 0xFE));//CR154
}
Expand All @@ -1277,19 +1254,16 @@ BBvSetShortSlotTime (PSDevice pDevice)
{
BYTE byBBVGA=0;

if (pDevice->bShortSlotTime) {
if (pDevice->bShortSlotTime)
pDevice->byBBRxConf &= 0xDF;//1101 1111
} else {
else
pDevice->byBBRxConf |= 0x20;//0010 0000
}

ControlvReadByte (pDevice, MESSAGE_REQUEST_BBREG, 0xE7, &byBBVGA);
if (byBBVGA == pDevice->abyBBVGA[0]) {
if (byBBVGA == pDevice->abyBBVGA[0])
pDevice->byBBRxConf |= 0x20;//0010 0000
}

ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x0A, pDevice->byBBRxConf);

}


Expand All @@ -1299,13 +1273,11 @@ void BBvSetVGAGainOffset(PSDevice pDevice, BYTE byData)
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0xE7, byData);

// patch for 3253B0 Baseband with Cardbus module
if (byData == pDevice->abyBBVGA[0]) {
pDevice->byBBRxConf |= 0x20;//0010 0000
} else if (pDevice->bShortSlotTime) {
pDevice->byBBRxConf &= 0xDF;//1101 1111
} else {
pDevice->byBBRxConf |= 0x20;//0010 0000
}
if (pDevice->bShortSlotTime)
pDevice->byBBRxConf &= 0xDF; /* 1101 1111 */
else
pDevice->byBBRxConf |= 0x20; /* 0010 0000 */

ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x0A, pDevice->byBBRxConf);//CR10
}

Expand Down Expand Up @@ -1365,15 +1337,14 @@ static unsigned long s_ulGetLowSQ3(PSDevice pDevice)
unsigned long ulMaxPacket;

ulMaxPacket = pDevice->aulPktNum[RATE_54M];
if ( pDevice->aulPktNum[RATE_54M] != 0 ) {
if (pDevice->aulPktNum[RATE_54M] != 0)
ulSQ3 = pDevice->aulSQ3Val[RATE_54M] / pDevice->aulPktNum[RATE_54M];
}
for ( ii=RATE_48M;ii>=RATE_6M;ii-- ) {
if ( pDevice->aulPktNum[ii] > ulMaxPacket ) {

for (ii = RATE_48M; ii >= RATE_6M; ii--)
if (pDevice->aulPktNum[ii] > ulMaxPacket) {
ulMaxPacket = pDevice->aulPktNum[ii];
ulSQ3 = pDevice->aulSQ3Val[ii] / pDevice->aulPktNum[ii];
}
}

return ulSQ3;
}
Expand All @@ -1392,7 +1363,7 @@ static unsigned long s_ulGetRatio(PSDevice pDevice)
ulRatio = (ulPacketNum * 1000 / pDevice->uDiversityCnt);
ulRatio += TOP_RATE_54M;
}
for ( ii=RATE_48M;ii>=RATE_1M;ii-- ) {
for (ii = RATE_48M; ii >= RATE_1M; ii--)
if ( pDevice->aulPktNum[ii] > ulMaxPacket ) {
ulPacketNum = 0;
for ( jj=RATE_54M;jj>=ii;jj--)
Expand All @@ -1402,8 +1373,6 @@ static unsigned long s_ulGetRatio(PSDevice pDevice)
ulMaxPacket = pDevice->aulPktNum[ii];
}

}

return ulRatio;
}

Expand Down

0 comments on commit 498ce90

Please sign in to comment.