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

staging: vt6656: BBvCalculateParameter remove camel case

Camel case changes
pDevice, cbFrameLength, wRate, byPacketType, cbBitCount, cbUsCount
cbTmp, bExtBit, byPreambleType

->

priv, frame_length, tx_rate, pkt_type, bit_count, count,
tmp,  ext_bit, preamble_type
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a4fb3e78
...@@ -710,9 +710,9 @@ unsigned int BBuGetFrameTime(u8 preamble_type, u8 pkt_type, ...@@ -710,9 +710,9 @@ unsigned int BBuGetFrameTime(u8 preamble_type, u8 pkt_type,
* *
* Parameters: * Parameters:
* In: * In:
* pDevice - Device Structure * priv - Device Structure
* cbFrameLength - Tx Frame Length * frame_length - Tx Frame Length
* wRate - Tx Rate * tx_rate - Tx Rate
* Out: * Out:
* struct vnt_phy_field *phy * struct vnt_phy_field *phy
* - pointer to Phy Length field * - pointer to Phy Length field
...@@ -722,135 +722,135 @@ unsigned int BBuGetFrameTime(u8 preamble_type, u8 pkt_type, ...@@ -722,135 +722,135 @@ unsigned int BBuGetFrameTime(u8 preamble_type, u8 pkt_type,
* Return Value: none * Return Value: none
* *
*/ */
void BBvCalculateParameter(struct vnt_private *pDevice, u32 cbFrameLength, void BBvCalculateParameter(struct vnt_private *priv, u32 frame_length,
u16 wRate, u8 byPacketType, struct vnt_phy_field *phy) u16 tx_rate, u8 pkt_type, struct vnt_phy_field *phy)
{ {
u32 cbBitCount; u32 bit_count;
u32 cbUsCount = 0; u32 count = 0;
u32 cbTmp; u32 tmp;
int bExtBit; int ext_bit;
u8 byPreambleType = pDevice->byPreambleType; u8 preamble_type = priv->byPreambleType;
cbBitCount = cbFrameLength * 8; bit_count = frame_length * 8;
bExtBit = false; ext_bit = false;
switch (wRate) { switch (tx_rate) {
case RATE_1M: case RATE_1M:
cbUsCount = cbBitCount; count = bit_count;
phy->signal = 0x00; phy->signal = 0x00;
break; break;
case RATE_2M: case RATE_2M:
cbUsCount = cbBitCount / 2; count = bit_count / 2;
if (byPreambleType == 1) if (preamble_type == 1)
phy->signal = 0x09; phy->signal = 0x09;
else else
phy->signal = 0x01; phy->signal = 0x01;
break; break;
case RATE_5M: case RATE_5M:
cbUsCount = (cbBitCount * 10) / 55; count = (bit_count * 10) / 55;
cbTmp = (cbUsCount * 55) / 10; tmp = (count * 55) / 10;
if (cbTmp != cbBitCount) if (tmp != bit_count)
cbUsCount++; count++;
if (byPreambleType == 1) if (preamble_type == 1)
phy->signal = 0x0a; phy->signal = 0x0a;
else else
phy->signal = 0x02; phy->signal = 0x02;
break; break;
case RATE_11M: case RATE_11M:
cbUsCount = cbBitCount / 11; count = bit_count / 11;
cbTmp = cbUsCount * 11; tmp = count * 11;
if (cbTmp != cbBitCount) { if (tmp != bit_count) {
cbUsCount++; count++;
if ((cbBitCount - cbTmp) <= 3) if ((bit_count - tmp) <= 3)
bExtBit = true; ext_bit = true;
} }
if (byPreambleType == 1) if (preamble_type == 1)
phy->signal = 0x0b; phy->signal = 0x0b;
else else
phy->signal = 0x03; phy->signal = 0x03;
break; break;
case RATE_6M: case RATE_6M:
if (byPacketType == PK_TYPE_11A) if (pkt_type == PK_TYPE_11A)
phy->signal = 0x9b; phy->signal = 0x9b;
else else
phy->signal = 0x8b; phy->signal = 0x8b;
break; break;
case RATE_9M: case RATE_9M:
if (byPacketType == PK_TYPE_11A) if (pkt_type == PK_TYPE_11A)
phy->signal = 0x9f; phy->signal = 0x9f;
else else
phy->signal = 0x8f; phy->signal = 0x8f;
break; break;
case RATE_12M: case RATE_12M:
if (byPacketType == PK_TYPE_11A) if (pkt_type == PK_TYPE_11A)
phy->signal = 0x9a; phy->signal = 0x9a;
else else
phy->signal = 0x8a; phy->signal = 0x8a;
break; break;
case RATE_18M: case RATE_18M:
if (byPacketType == PK_TYPE_11A) if (pkt_type == PK_TYPE_11A)
phy->signal = 0x9e; phy->signal = 0x9e;
else else
phy->signal = 0x8e; phy->signal = 0x8e;
break; break;
case RATE_24M: case RATE_24M:
if (byPacketType == PK_TYPE_11A) if (pkt_type == PK_TYPE_11A)
phy->signal = 0x99; phy->signal = 0x99;
else else
phy->signal = 0x89; phy->signal = 0x89;
break; break;
case RATE_36M: case RATE_36M:
if (byPacketType == PK_TYPE_11A) if (pkt_type == PK_TYPE_11A)
phy->signal = 0x9d; phy->signal = 0x9d;
else else
phy->signal = 0x8d; phy->signal = 0x8d;
break; break;
case RATE_48M: case RATE_48M:
if (byPacketType == PK_TYPE_11A) if (pkt_type == PK_TYPE_11A)
phy->signal = 0x98; phy->signal = 0x98;
else else
phy->signal = 0x88; phy->signal = 0x88;
break; break;
case RATE_54M: case RATE_54M:
if (byPacketType == PK_TYPE_11A) if (pkt_type == PK_TYPE_11A)
phy->signal = 0x9c; phy->signal = 0x9c;
else else
phy->signal = 0x8c; phy->signal = 0x8c;
break; break;
default: default:
if (byPacketType == PK_TYPE_11A) if (pkt_type == PK_TYPE_11A)
phy->signal = 0x9c; phy->signal = 0x9c;
else else
phy->signal = 0x8c; phy->signal = 0x8c;
break; break;
} }
if (byPacketType == PK_TYPE_11B) { if (pkt_type == PK_TYPE_11B) {
phy->service = 0x00; phy->service = 0x00;
if (bExtBit) if (ext_bit)
phy->service |= 0x80; phy->service |= 0x80;
phy->len = cpu_to_le16((u16)cbUsCount); phy->len = cpu_to_le16((u16)count);
} else { } else {
phy->service = 0x00; phy->service = 0x00;
phy->len = cpu_to_le16((u16)cbFrameLength); phy->len = cpu_to_le16((u16)frame_length);
} }
} }
......
...@@ -91,8 +91,8 @@ struct vnt_phy_field { ...@@ -91,8 +91,8 @@ struct vnt_phy_field {
unsigned int BBuGetFrameTime(u8 preamble_type, u8 pkt_type, unsigned int BBuGetFrameTime(u8 preamble_type, u8 pkt_type,
unsigned int frame_length, u16 tx_rate); unsigned int frame_length, u16 tx_rate);
void BBvCalculateParameter(struct vnt_private *, u32 cbFrameLength, void BBvCalculateParameter(struct vnt_private *, u32 frame_length,
u16 wRate, u8 byPacketType, struct vnt_phy_field *); u16 tx_rate, u8 pkt_type, struct vnt_phy_field *);
/* timer for antenna diversity */ /* timer for antenna diversity */
......
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